sparc g++ fails "Hello world!"
Jeff Sturm
jsturm@one-point.com
Sun Dec 16 09:01:00 GMT 2001
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
More information about the Gcc
mailing list