Jim Wilson wrote:
Poor Yorick wrote:
I'm trying to build 64-bit gcc-4.2.2 on Solaris 9, but I keep getting
32-bit files in the build. I've tried various values for --host,
--target, CFLAGS, and LDFLAGS, but no joy.
Telling what target names you have already tried would be quite
obligatory...
I've looked around the documentation, and back through a couple of years of the
mailing list without luck. Could someone please clue me in on how to
tell gcc to be 64-bit?
Looking around the obvious 'gcc/config.gcc' for the available target
names would be wise... If one cannot guess what the right target name
could be, here one sees what target name templates one could try...
I don't have a sparc machine here, but I believe most sparc-solaris
builds support both 32-bit and 64-bit code. You get 64-bit code with
-m64 and 32-bit code with -m32. So yes, you will have 32-bit files in
the build even when building a gcc that emits 64-bit code. This isn't a
problem.
Traditionally using a 'sparc-solaris2.x' target name has resulted to
a 32-bit default, 64-bit optional (with '-m64') compiler.
If you want 64-bit code only, you can configure for
sparc64-sun-solaris2.10 (or whatever Solaris version you have) and also
specify --disable-multilibs to turn off support for the 32-bit libraries.
Furhermore using a 'sparcv9-solaris2.x' target name has resulted to
a 64-bit default, 32-bit optional (with '-m32') compiler.
You might need to be more specific about what you want here. You want a
gcc compiled as 64-bit code or a gcc that emits 64-bit code or both?
And checking the 'gcc/config.gcc' before configuring would be highly
recommended! The 'sparc64-<something>' has been the '<cpu>-<something>'
template for Linux, *BSD etc. other opsyses when requiring a 64-bit
default toolchain... Maybe the earlier 'sparcv9' has now been changed
to 'sparc64' with '-solaris2.x' too...