public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* building gcc 4.0.0 on Solaris
@ 2005-04-27 15:27 Dimitri Papadopoulos-Orfanos
  2005-04-30 19:18 ` Eric Botcazou
  2005-05-03 18:54 ` James E Wilson
  0 siblings, 2 replies; 24+ messages in thread
From: Dimitri Papadopoulos-Orfanos @ 2005-04-27 15:27 UTC (permalink / raw)
  To: gcc

Hi,

I'm attempting to build gcc 4.0.0 on Solaris. I have been unable to 
build gcc or at least some of its components since the release of gcc 3.4.

Here are a few details on my system:
  - Solaris 8 7/01
  - Sun's as/ld
    as: Sun WorkShop 6 99/08/18
    ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.286
  - GNU binutils 2.15

I've tried two approaches.


1) Using Sun's as/ld. I build gcc this way:
    	cd /tmp
    	gtar xjf ~/gcc-4.0.0.tar.bz2
    	mkdir gcc
    	cd gcc
    	setenv CONFIG_SHELL /bin/ksh
    	/tmp/gcc-4.0.0/configure \
    		--prefix=/usr/local/gcc-4.0.0
    	gmake bootstrap

The build fails with the following message:
ld: fatal: relocation error: R_SPARC_DISP32:
file .libs/libstdc++.lax/libsupc++convenience.a/vterminate.o:
symbol <unknown>: offset 0xfccd33ad is non-aligned

I've searched Google for this error and came across similar error 
messages without finding a solution:
http://gcc.gnu.org/ml/gcc-prs/2003-03/msg00497.html

Any clues?



2) Using GNU binutils. I build gcc this way:
    	cd /tmp
    	gtar xjf ~/gcc-4.0.0.tar.bz2
    	mkdir gcc
    	cd gcc
    	setenv CONFIG_SHELL /bin/ksh
    	/tmp/gcc-4.0.0/configure \
    		--prefix=/usr/local/gcc-4.0.0 \
    		--with-as=/usr/local/binutils/bin/as \
    		--with-ld=/usr/local/binutils/bin/ld
    	gmake bootstrap

The build fails while compiling the Java libraries with gcj. No error 
message appears because the oputput of gcj is discarded by the build 
system. Running the last command line manually, I get the following 
error message:
/tmp/GCC/gcc/gcj [...] -o java/lang/StrictMath.o
/tmp/ccMGENqa.s: Assembler messages:
/tmp/ccMGENqa.s:10374: Error: Illegal operands:
There are only 32 single precision f registers; [0-31]

I've found out this is a known issue with the current GNU binutils 
package. See for example:
http://lists.freebsd.org/pipermail/freebsd-sparc64/2005-March/002879.html
As far as I can understand, it's not possible to build gcc 4.0.0 and gcc 
3.4.* using GNU binutils with current release 2.15 of GNU binutils. One 
has to use the CVS sources or at least one file.

Would it be possible to document this requirement in the platform pages?
http://gcc.gnu.org/install/specific.html#sparc-sun-solaris2



Speaking of the sparc-sun-solaris2* platform, I read:
	GCC 3.4 changed the default debugging format from STABS
	to DWARF-2 for 32-bit code on Solaris 7 and later. If you
	are using the Sun assembler, this change apparently runs
	afoul of Sun bug 4910101, for which (as of 2004-05-23)
	there is no fix. A symptom of the problem is that you
	cannot compile C++ programs like groff 1.19.1 without
	getting messages similar to the following:
	ld: warning: relocation error: R_SPARC_UA32: ...
	  external symbolic relocation against non-allocatable
	  section
	  .debug_info cannot be processed at runtime:
	  relocation ignored.
	To work around this problem, compile with -gstabs+
	instead of plain -g

I had a look at Sun Online Support and found:
	Bug ID: 4910101
	Synopsis: fbe needs a way to reference section labels
	Category: compiler
	Subcategory: assembler-x86
	Description:
	The bug was first found with the -misalign flag, but the
	real bug is because the code is being passed through the
	assembler.
	Integrated in releases: k2_dev
	Summary: fbe needs a way to reference section labels

Therefore :
1) This seems to be x86-specific, so I would suggest moving this 
paragraph from sparc-sun-solaris2* to i?86-*-solaris2*
2) It looks like there is a fix, however I don't know what k2_dev is, 
maybe this is an internal development version and the fix has not been 
relesed yet.

--
Dimitri Papadopoulos

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-05-12  6:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-27 15:27 building gcc 4.0.0 on Solaris Dimitri Papadopoulos-Orfanos
2005-04-30 19:18 ` Eric Botcazou
2005-05-02 12:18   ` Dimitri Papadopoulos-Orfanos
2005-05-02 13:14     ` Eric Botcazou
2005-05-11 12:03       ` Dimitri Papadopoulos-Orfanos
2005-05-03 18:54 ` James E Wilson
2005-05-08  8:46   ` Eric Botcazou
2005-05-12  6:13     ` James E Wilson
2005-05-12 10:51       ` Eric Botcazou
2005-05-09 16:35   ` Dimitri Papadopoulos-Orfanos
2005-05-10  9:43     ` Dimitri Papadopoulos-Orfanos
2005-05-10 10:41       ` Eric Botcazou
2005-05-10 11:57         ` Dimitri Papadopoulos-Orfanos
2005-05-10 12:04           ` Eric Botcazou
2005-05-10 12:22             ` Dimitri Papadopoulos-Orfanos
2005-05-10 12:56           ` Dimitri Papadopoulos-Orfanos
2005-05-10 13:06             ` Eric Botcazou
2005-05-10 13:06             ` Eric Botcazou
2005-05-10 13:36               ` Dimitri Papadopoulos-Orfanos
2005-05-10 18:00                 ` Eric Botcazou
2005-05-10 18:02                   ` Dimitri Papadopoulos-Orfanos
2005-05-10 18:05                     ` Karel Gardas
2005-05-10 18:55                       ` Dimitri Papadopoulos-Orfanos
2005-05-10 19:19                         ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).