changeset 94350:b9ab74ff03b7

Additional redefinitions for GNU/Linux.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 25 Apr 2008 14:30:52 +0000
parents d6a3ab4960a7
children 33d8aec6fa97
files src/m/sparc.h
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/m/sparc.h	Fri Apr 25 14:30:32 2008 +0000
+++ b/src/m/sparc.h	Fri Apr 25 14:30:52 2008 +0000
@@ -81,6 +81,19 @@
 
 #ifdef __arch64__		/* GCC, 64-bit ABI.  */
 #define BITS_PER_LONG 64
+#ifdef __linux__
+#undef START_FILES
+#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
+
+/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
+   The reason is that some functions in libgcc.a call functions from libc.a,
+   and some libc.a functions need functions from libgcc.a.  Since most
+   versions of ld are one-pass linkers, we need to mention -lgcc twice,
+   or else we risk getting unresolved externals.  */
+#undef LIB_STANDARD
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
+#endif
+
 #ifndef _LP64
 #define _LP64			/* Done on Alpha -- not sure if it
 				   should be here.  -- fx */