This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.4 PATCH: Don't generate #line directives for .S files and IRIX 6 O32 ABI


Even after fixing the O32 ABI support in libffi

	http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00412.html

which caused libffi/src/mips/n32.s to become empty when building with
-mabi=32, the native O32 linker still segfaulted when linking libffi.so.
Removing n32.o from the command line avoids this.  It turns out that the
#line directives from preprocessing n32.S let the native O32 assembler
create an object file that causes the linker crash.  As in the Solaris
2/x86 configuration, this can be avoided by passing -P.  The patch below
does this and allows the O32 libffi to build correctly.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Thu Oct  2 19:24:42 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/mips/iris6.h (CPP_SPEC): Define.

Index: iris6.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris6.h,v
retrieving revision 1.69
diff -u -p -r1.69 iris6.h
--- iris6.h	27 Sep 2003 04:48:25 -0000	1.69
+++ iris6.h	6 Oct 2003 18:51:27 -0000
@@ -57,6 +57,11 @@ Boston, MA 02111-1307, USA.  */
 #undef SUBTARGET_CC1_SPEC
 #define SUBTARGET_CC1_SPEC ""
 
+/* #line directives let the O32 assembler create object files that cause the
+   O32 linker to crash.  */
+#undef CPP_SPEC
+#define CPP_SPEC "%{mabi=32: %{.S:-P}} %(cpp_subtarget)"
+
 /* We must pass -D_LONGLONG always, even when -ansi is used, because IRIX 6
    system header files require it.  This is OK, because gcc never warns
    when long long is used in system header files.  Alternatively, we can


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]