fix gcc startfiles for shared builds

This commit is contained in:
Kevin Lange 2014-03-23 21:23:18 -07:00
parent c7414e579f
commit 03964e3ba7

View File

@ -12,7 +12,7 @@ diff -rupN original/config.sub new/config.sub
diff -rupN original/gcc/config/toaru.h new/gcc/config/toaru.h
--- original/gcc/config/toaru.h 1969-12-31 18:00:00.000000000 -0600
+++ new/gcc/config/toaru.h 2011-04-24 19:51:58.000000000 -0500
@@ -0,0 +1,17 @@
@@ -0,0 +1,20 @@
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
@ -23,10 +23,13 @@ diff -rupN original/gcc/config/toaru.h new/gcc/config/toaru.h
+ } while (0);
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
+#define STARTFILE_SPEC "%{!shared: %{!pg:crt0.o%s}} crti.o%s %{!shared:crtbegin.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
+#define ENDFILE_SPEC "%{!shared:crtend.o%s} crtn.o%s"
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{shared:-shared} %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld.so}}}"
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf(stderr, " (i386 toaru)");