This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

PATCH: Fix building N64 libffi.so with gcc on IRIX 6.5


This change

2009-12-25  Frank Everdij <f.p.x.everdij@tudelft.nl>
[...]
	* src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
	since they are Linux/GNU Assembler specific.

broke the N64 libffi.so build on mips-sgi-irix6.5:

ld64: FATAL   45 : Non-PIC (src/mips/.libs/n32.o) used in shared/call_shared link.
collect2: ld returned 4 exit status
make[7]: *** [libffi.la] Error 1

.abicalls was introduced in 2005 to fix just that error (PR
libgcj/21943).  I'm now checking for __GNUC__ instead of linux here,
since GCC on IRIX 5/6 requires gas, which supports both, and Linux uses
gas anyway.

The patch allowed the bootstrap to continue.

Ok for mainline?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.

Index: src/mips/n32.S
===================================================================
--- src/mips/n32.S	(revision 155613)
+++ src/mips/n32.S	(working copy)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   n32.S - Copyright (c) 1996, 1998, 2005  Red Hat, Inc.
+   n32.S - Copyright (c) 1996, 1998, 2005, 2007, 2009, 2010  Red Hat, Inc.
    
    MIPS Foreign Function Interface 
 
@@ -40,7 +40,7 @@
 
 #define SIZEOF_FRAME	( 8 * FFI_SIZEOF_ARG )
 
-#ifdef linux
+#ifdef __GNUC__
 	.abicalls
 #endif
 	.text
@@ -529,7 +529,7 @@
 .LFE2:	
 	.end	ffi_closure_N32
 
-#ifdef linux
+#ifdef __GNUC__
         .section        .eh_frame,"aw",@progbits
 .Lframe1:
         .4byte  .LECIE1-.LSCIE1		# length
@@ -586,6 +586,6 @@
 	.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
 	.align	EH_FRAME_ALIGN
 .LEFDE3:
-#endif /* linux */	
+#endif /* __GNUC__ */	
 	
 #endif


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