This is the mail archive of the gcc@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]

Re: sparc g++ fails "Hello world!"




On Sun, 16 Dec 2001, Sean Callanan wrote:
> The short version of this story is that a carefully bootstrapped g++ on a 
> new LFS partition (g++ 3.0.2, glibc 2.2.4) creates binaries that have bus 
> errors. If you are interested, here's the legend that goes along with it.

What binutils?

> # sparc-linux-g++ -o test-c++ test.cc
> # ./test-c++
> Bus error
> #

This is sympomatic of either a) an assembler that does not correctly
generate R_SPARC_UA32 relocs, or b) a glibc that does not correctly
intepret them.

Since you have glibc 2.2.4 I'd guess the former.  Try binutils 2.11.2.  (A
more thorough diagnosis can be gotten from "readelf -r" on a failing
executable.)

(And for the record, I think this requirement is clearly stated in 
http://gcc.gnu.org/install/specific.html#sparc-*-linux*
though that doc may not have made it into the 3.0.2 release.)

Jeff


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