Dennis Gilmore a63192
--- emacs-22.1.50/src/m/sparc.h.old	2008-02-11 01:26:36.000000000 -0600
Dennis Gilmore a63192
+++ emacs-22.1.50/src/m/sparc.h	2008-02-11 09:12:09.000000000 -0600
Dennis Gilmore a63192
@@ -93,6 +93,19 @@
Dennis Gilmore a63192
 
Dennis Gilmore a63192
 #ifdef __arch64__		/* GCC, 64-bit ABI.  */
Dennis Gilmore a63192
 #define BITS_PER_LONG 64
Dennis Gilmore a63192
+#ifdef __linux__
Dennis Gilmore a63192
+#undef START_FILES
Dennis Gilmore a63192
+#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
Dennis Gilmore a63192
+
Dennis Gilmore a63192
+/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
Dennis Gilmore a63192
+   The reason is that some functions in libgcc.a call functions from libc.a,
Dennis Gilmore a63192
+   and some libc.a functions need functions from libgcc.a.  Since most
Dennis Gilmore a63192
+   versions of ld are one-pass linkers, we need to mention -lgcc twice,
Dennis Gilmore a63192
+   or else we risk getting unresolved externals.  */
Dennis Gilmore a63192
+#undef LIB_STANDARD
Dennis Gilmore a63192
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
Dennis Gilmore a63192
+#endif
Dennis Gilmore a63192
+
Dennis Gilmore a63192
 #ifndef _LP64
Dennis Gilmore a63192
 #define _LP64			/* Done on Alpha -- not sure if it
Dennis Gilmore a63192
 				   should be here.  -- fx */