Compare commits
No commits in common. "ae49c29c75b0d84313fd24abfb8bd929fd10a07f" and "ba9cf30e670669c42c36ced062a429dcde9ae5e3" have entirely different histories.
ae49c29c75
...
ba9cf30e67
16
Rsconscript
16
Rsconscript
@ -69,18 +69,6 @@ class Image < Builder
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class CheckThreadLocal < Builder
|
|
||||||
def run(options)
|
|
||||||
map_file = File.binread(@sources.first)
|
|
||||||
if map_file =~ /\.(tdata|tbss)\b/
|
|
||||||
$stderr.puts "Error: found thread-local data in #{@sources.first}"
|
|
||||||
false
|
|
||||||
else
|
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class FontGen < Builder
|
class FontGen < Builder
|
||||||
def run(options)
|
def run(options)
|
||||||
if @command
|
if @command
|
||||||
@ -100,7 +88,6 @@ end
|
|||||||
|
|
||||||
hulk_env = env "hulk", use: %w[ldc2 x86_64-elf-gcc] do |env|
|
hulk_env = env "hulk", use: %w[ldc2 x86_64-elf-gcc] do |env|
|
||||||
env.add_builder(FontGen)
|
env.add_builder(FontGen)
|
||||||
env.add_builder(CheckThreadLocal)
|
|
||||||
env.FontGen("^/src/hulk/kfont.d", "font/Hack-Regular.ttf",
|
env.FontGen("^/src/hulk/kfont.d", "font/Hack-Regular.ttf",
|
||||||
"fontgen" => fontgen_env.expand("^/fontgen"))
|
"fontgen" => fontgen_env.expand("^/fontgen"))
|
||||||
env["sources"] = glob("src/hulk/**/*.d")
|
env["sources"] = glob("src/hulk/**/*.d")
|
||||||
@ -115,7 +102,6 @@ hulk_env = env "hulk", use: %w[ldc2 x86_64-elf-gcc] do |env|
|
|||||||
env["OBJCOPY"] = "x86_64-elf-objcopy"
|
env["OBJCOPY"] = "x86_64-elf-objcopy"
|
||||||
env.Program("^/hulk.elf", "${sources}")
|
env.Program("^/hulk.elf", "${sources}")
|
||||||
env.produces("^/hulk.elf", "^/hulk.elf.map")
|
env.produces("^/hulk.elf", "^/hulk.elf.map")
|
||||||
env.CheckThreadLocal(:hulk_map_check, "^/hulk.elf.map")
|
|
||||||
env.depends("^/hulk.elf", "src/hulk/hulk.ld")
|
env.depends("^/hulk.elf", "src/hulk/hulk.ld")
|
||||||
env["SIZE"] = "x86_64-elf-size"
|
env["SIZE"] = "x86_64-elf-size"
|
||||||
env.Size("^/hulk.size", "^/hulk.elf")
|
env.Size("^/hulk.size", "^/hulk.elf")
|
||||||
@ -132,7 +118,6 @@ end
|
|||||||
|
|
||||||
hello_env = env "hello", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
|
hello_env = env "hello", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
|
||||||
env.add_builder(Image)
|
env.add_builder(Image)
|
||||||
env.add_builder(CheckThreadLocal)
|
|
||||||
env.add_builder(HulkBinObj)
|
env.add_builder(HulkBinObj)
|
||||||
env["sources"] = glob("src/hello/**/*.d")
|
env["sources"] = glob("src/hello/**/*.d")
|
||||||
env["sources"] += glob("uefi-d/source/**/*.d")
|
env["sources"] += glob("uefi-d/source/**/*.d")
|
||||||
@ -148,7 +133,6 @@ hello_env = env "hello", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
|
|||||||
env["OBJDUMP"] = "x86_64-w64-mingw32-objdump"
|
env["OBJDUMP"] = "x86_64-w64-mingw32-objdump"
|
||||||
env.Program("^/HOS.EFI", "${sources}")
|
env.Program("^/HOS.EFI", "${sources}")
|
||||||
env.produces("^/HOS.EFI", "^/HOS.EFI.map")
|
env.produces("^/HOS.EFI", "^/HOS.EFI.map")
|
||||||
env.CheckThreadLocal(:hos_map_check, "^/HOS.EFI.map")
|
|
||||||
env["SIZE"] = "x86_64-w64-mingw32-size"
|
env["SIZE"] = "x86_64-w64-mingw32-size"
|
||||||
env.Size("^/HOS.size", "^/HOS.EFI")
|
env.Size("^/HOS.size", "^/HOS.EFI")
|
||||||
env.Disassemble("^/HOS.txt", "^/HOS.EFI")
|
env.Disassemble("^/HOS.txt", "^/HOS.EFI")
|
||||||
|
@ -88,8 +88,8 @@ size_t writef(string s, va_list args, ch_out_fn ch_out)
|
|||||||
*/
|
*/
|
||||||
private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn ch_out)
|
private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn ch_out)
|
||||||
{
|
{
|
||||||
static __gshared const(char)[16] hex_chars_lower = "0123456789abcdef";
|
static __gshared string hex_chars_lower = "0123456789abcdef";
|
||||||
static __gshared const(char)[16] hex_chars_upper = "0123456789ABCDEF";
|
static __gshared string hex_chars_upper = "0123456789ABCDEF";
|
||||||
static __gshared char[16] buf;
|
static __gshared char[16] buf;
|
||||||
size_t i;
|
size_t i;
|
||||||
do
|
do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user