mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
Toolchain+LibC: Fix usage of crt files
We now configure the gcc spec files to use a different crt files for static & PIE binaries. This relieves us from the need to explicitly specify the desired crt0 file in cmake scripts.
This commit is contained in:
parent
6990d62977
commit
bbedd320b5
9 changed files with 32 additions and 20 deletions
|
@ -115,7 +115,7 @@ diff -ruN a/gcc/config/serenity.h b/gcc/config/serenity.h
|
|||
+/* Files that are linked before user code.
|
||||
+ The %s tells GCC to look for these files in the library directory. */
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared|pie:crtbeginS.o%s; :crtbegin.o%s}"
|
||||
+#define STARTFILE_SPEC "%{static:crt0.o%s} crti.o%s %{!static: %{!fbuilding-libgcc:crt0_shared.o%s}} %{shared|pie:crtbeginS.o%s; :crtbegin.o%s}"
|
||||
+
|
||||
+/* Files that are linked after user code. */
|
||||
+#undef ENDFILE_SPEC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue