diff options
author | Itamar <itamar8910@gmail.com> | 2020-10-10 17:29:36 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-14 23:05:53 +0100 |
commit | b1c1d7661f51e04b733a77eadc416a0479721e18 (patch) | |
tree | 286be3cd0ba4604be56d24f05914d998d72ff2f6 /Toolchain | |
parent | 9ca1a0731f3074265bbbc0402b4021ba2685b994 (diff) | |
download | serenity-b1c1d7661f51e04b733a77eadc416a0479721e18.zip |
Toolchain: Configure the path to the dynamic linker
Diffstat (limited to 'Toolchain')
-rw-r--r-- | Toolchain/Patches/gcc.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index 8e2dd8342a..0db4682b89 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -121,14 +121,14 @@ index 000000000..2692b8e57 +/* 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:crtbeginS.o%s; :crtbegin.o%s}" ++#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared|pie:crtbeginS.o%s; :crtbegin.o%s}" + +/* Files that are linked after user code. */ +#undef ENDFILE_SPEC -+#define ENDFILE_SPEC "%{shared:crtendS.o%s; :crtend.o%s} crtn.o%s" ++#define ENDFILE_SPEC "%{shared|pie:crtendS.o%s; :crtend.o%s} crtn.o%s" + +#undef LINK_SPEC -+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic}}}" ++#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic} -dynamic-linker /usr/lib/Loader.so}}" + +/* Additional predefined macros. */ +#undef TARGET_OS_CPP_BUILTINS |