[patch] fix bootstrap on i?86-apple-darwin with libjava

Andreas Tobler toa@pop.agri.ch
Sun Feb 25 13:35:00 GMT 2007


Hello,

the current repository is broken for libjava builds on i?86-apple-darwin*.
This patch http://gcc.gnu.org/ml/gcc-cvs/2007-02/msg00599.html uncovered 
a problem with symbol_stubs on i?86-apple-darwin*. We get the following 
error with the current svn:

/usr/bin/ld: java/.libs/lang.o has external relocation entries in 
non-writable section (__TEXT,__text) for symbols:
java::lang::Class* java::lang::Class::forName(java::lang::String*, 
java::lang::Class*)

With the help from Andrew P. and the existing sources in rs6000.c I come 
up with the attached fix.

I have tested it on i686-apple-darwin. Complete bootstrap possible and 
so far no visible regressions. A x86_64-apple-darwin build/test is 
underway. Although, the libjava part does not build there due to a 
linker bug. But I will test and compare the gcc c tests.

I'd appreciate any comment from non i?86-apple-darwin testers if the 
patch does not break the situation there. I do not have the possibility 
to test on such a platform.

If everything passes and no negative comments are coming in, ok for trunk ?

Thanks,
Andreas

2007-02-24  Andreas Tobler  <a.tobler@schweiz.org>

	* config/i386/i386.c (output_pic_addr_const): For SYMBOL_REF add a
	check for TARGET_MACHO to see if we need a stub.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i386-4.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070225/f1cfa853/attachment.ksh>


More information about the Gcc-patches mailing list