This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: i686 to c3-2 crosstool build fails on setjmp


Dan Kegel wrote:
Try making that one-line patch!  If you haven't ever made a patch,
see http://kegel.com/academy/opensource.html#patches

That's the bit I *can* do!


Okay, the attached patch fixed the crosstool build for me and successfully compiled various user-space packages.

I presume this issue would affect more than just c3-2 targets?

I'll let you know when I get round to doing a full build and testing the result on target hardware.

Patch attached. Please improve the description as necessary!

Simon.
--
Simon Poole
www.appliancestudio.com

This patch fixes glibc-2.3.3 cross-build using gcc-3.4.2 built with:
	--with-arch=c3-2 --enable-cxx-flags=-march=c3-2
	
The failure looked like this:
../sysdeps/i386/elf/setjmp.S: Assembler messages:
../sysdeps/i386/elf/setjmp.S:63: Error: junk at end of line, first unrecognized character is `1'
../sysdeps/i386/elf/setjmp.S:64: Error: junk at end of line, first unrecognized character is `1'
../sysdeps/i386/elf/setjmp.S:65: Error: junk at end of line, first unrecognized character is `1'
../sysdeps/i386/elf/setjmp.S:66: Error: unrecognized symbol type ""
../sysdeps/i386/elf/setjmp.S:66: Error: junk at end of line, first unrecognized character is `1'
../sysdeps/i386/elf/setjmp.S:67: Error: junk at end of line, first unrecognized character is `1'
../sysdeps/i386/elf/setjmp.S:70: Error: expected comma after name `' in .size directive 

and was caused by __i686 being defined as `1'.	

--- glibc-2.3.3/sysdeps/unix/sysv/linux/i386/sysdep.h.old	2004-11-02 12:19:03.649352896 +0000
+++ glibc-2.3.3/sysdeps/unix/sysv/linux/i386/sysdep.h	2004-11-02 12:19:35.288543008 +0000
@@ -64,6 +64,9 @@
 # define SYSCALL_ERROR_LABEL syscall_error
 #endif
 
+/* gcc-3.4.2 seems to expand __i686 as a predefined preprocessor symbol, which we don't want here */
+#undef __i686
+
 #undef	PSEUDO
 #define	PSEUDO(name, syscall_name, args)				      \
   .text;								      \

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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