diff options
-rwxr-xr-x | Toolchain/BuildIt.sh | 2 | ||||
-rw-r--r-- | Toolchain/Patches/gcc.patch | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 1c3dbf9ed5..2c252a379a 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -100,6 +100,7 @@ pushd "$DIR/Build/" "$DIR"/Tarballs/binutils-2.33.1/configure --prefix="$PREFIX" \ --target="$TARGET" \ --with-sysroot="$SYSROOT" \ + --enable-shared \ --disable-nls || exit 1 make -j "$MAKEJOBS" || exit 1 make install || exit 1 @@ -111,6 +112,7 @@ pushd "$DIR/Build/" --with-sysroot="$SYSROOT" \ --disable-nls \ --with-newlib \ + --enable-shared \ --enable-languages=c,c++ || exit 1 echo "XXX build gcc and libgcc" diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index d460f533ab..cfe7a4a360 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -137,10 +137,10 @@ index 000000000..24b29c3da +#define PTRDIFF_TYPE "long int" diff --git a/gcc/config/serenity.h b/gcc/config/serenity.h new file mode 100644 -index 000000000..60ebec583 +index 000000000..925c88dd6 --- /dev/null +++ b/gcc/config/serenity.h -@@ -0,0 +1,28 @@ +@@ -0,0 +1,31 @@ +/* Useful if you wish to make target-specific GCC changes. */ +#undef TARGET_SERENITY +#define TARGET_SERENITY 1 @@ -158,6 +158,9 @@ index 000000000..60ebec583 +/* Files that are linked after user code. */ +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "crtend.o%s crtn.o%s" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic}}}" + +/* Additional predefined macros. */ +#undef TARGET_OS_CPP_BUILTINS |