object size confusion

Ian Lance Taylor iant@google.com
Fri Jun 18 09:11:00 GMT 2010


kevin diggs <diggskevin38@gmail.com> writes:

> I am trying to build gcc 4.1.2 from a source RPM (Yellowdog Linux 6.1
> I think) on a 64-bit powerpc machine (G5). It is not working. I think
> the source rpm only builds correctly on a 32-bit machine. It keeps
> trying to find stuff in .../32/... that is not there.

You may need to install the 32-bit development environment.  It's
often a separate package on 64-bit distros.

> Also, before I
> started hacking on the spec file it was building the compiler as a
> 64-bit program. Now it can't seem to find libsupc++.a. That is not
> correct, right? xgcc also defaulted to building things in 64-bit (with
> no -m64 option). Generally that is wrong too?

I don't know what your spec file looks like, but if you build a native
compiler on a 64-bit machine it will normally build 64-bit code by
default.

>   i) Is the compiler ever built as a 64-bit program itself?

Yes.

>  ii) "Normally" the compiler should default to producing 32-bit
> objects, right (irregardless of what size machine the compiler itself
> was built on)?

Not really.  If you don't pass an explicit --target option when you
run configure, the compiler will normally generate native code for
your machine.  If you are on a 64-bit machine, the compiler will
generate 64-bit code by default.

> iii) What is the difference between directories ".../64/..." and
> ".../lib64/..."? Is it a convention? Should I see one or the other?

Different GNU/Linux distros have made different choices in this area.
I don't think there is any right answer to these questions.  I odn't
know anything about Yellowdog Linux.

Ian



More information about the Gcc-help mailing list