[build] Move init to its own target

In order to allow -fpic and -fpie in the user target, move init to it's
own target -- it needs its own special build rules to make it loadable
by boot.
This commit is contained in:
Justin C. Miller
2023-07-31 00:16:02 -07:00
parent 21916ab869
commit bbe27c6b53
8 changed files with 66 additions and 21 deletions

View File

@@ -5,11 +5,6 @@ ccflags: [
"--target=x86_64-jsix-elf",
"-fno-omit-frame-pointer",
"-fno-stack-protector",
"-fpic",
"-fpie",
"-g3",
"-ggdb",
"-fvisibility=hidden",
"-fvisibility-inlines-hidden",
@@ -19,7 +14,10 @@ ccflags: [
"-U__linux",
"-U__linux__",
"--sysroot='${source_root}/sysroot'" ]
"--sysroot='${source_root}/sysroot'",
"-fpic"
]
cxxflags: [
@@ -28,7 +26,6 @@ cxxflags: [
]
ldflags: [
"-g",
"-m", "elf_x86_64",
"--sysroot='${source_root}/sysroot'",
"--no-eh-frame-hdr",
@@ -36,6 +33,5 @@ ldflags: [
"-z", "separate-code",
"-lc++", "-lc++abi", "-lunwind",
"--no-dependent-libraries",
"--dynamic-linker", "/tools/ld.so",
]