mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
Toolchain: Allow building shared objects
Here goes a small first step towards dynamic linking.
This commit is contained in:
parent
2b9c9bf663
commit
4a0fb34eb8
2 changed files with 7 additions and 2 deletions
|
@ -100,6 +100,7 @@ pushd "$DIR/Build/"
|
||||||
"$DIR"/Tarballs/binutils-2.33.1/configure --prefix="$PREFIX" \
|
"$DIR"/Tarballs/binutils-2.33.1/configure --prefix="$PREFIX" \
|
||||||
--target="$TARGET" \
|
--target="$TARGET" \
|
||||||
--with-sysroot="$SYSROOT" \
|
--with-sysroot="$SYSROOT" \
|
||||||
|
--enable-shared \
|
||||||
--disable-nls || exit 1
|
--disable-nls || exit 1
|
||||||
make -j "$MAKEJOBS" || exit 1
|
make -j "$MAKEJOBS" || exit 1
|
||||||
make install || exit 1
|
make install || exit 1
|
||||||
|
@ -111,6 +112,7 @@ pushd "$DIR/Build/"
|
||||||
--with-sysroot="$SYSROOT" \
|
--with-sysroot="$SYSROOT" \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
|
--enable-shared \
|
||||||
--enable-languages=c,c++ || exit 1
|
--enable-languages=c,c++ || exit 1
|
||||||
|
|
||||||
echo "XXX build gcc and libgcc"
|
echo "XXX build gcc and libgcc"
|
||||||
|
|
|
@ -137,10 +137,10 @@ index 000000000..24b29c3da
|
||||||
+#define PTRDIFF_TYPE "long int"
|
+#define PTRDIFF_TYPE "long int"
|
||||||
diff --git a/gcc/config/serenity.h b/gcc/config/serenity.h
|
diff --git a/gcc/config/serenity.h b/gcc/config/serenity.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..60ebec583
|
index 000000000..925c88dd6
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gcc/config/serenity.h
|
+++ b/gcc/config/serenity.h
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,31 @@
|
||||||
+/* Useful if you wish to make target-specific GCC changes. */
|
+/* Useful if you wish to make target-specific GCC changes. */
|
||||||
+#undef TARGET_SERENITY
|
+#undef TARGET_SERENITY
|
||||||
+#define TARGET_SERENITY 1
|
+#define TARGET_SERENITY 1
|
||||||
|
@ -159,6 +159,9 @@ index 000000000..60ebec583
|
||||||
+#undef ENDFILE_SPEC
|
+#undef ENDFILE_SPEC
|
||||||
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
+#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. */
|
+/* Additional predefined macros. */
|
||||||
+#undef TARGET_OS_CPP_BUILTINS
|
+#undef TARGET_OS_CPP_BUILTINS
|
||||||
+#define TARGET_OS_CPP_BUILTINS() \
|
+#define TARGET_OS_CPP_BUILTINS() \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue