This is the mail archive of the gcc-help@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: gcc 4.4.1 under Solaris 10 Ultrasparc - build problems


Greg Ryan wrote:

I have been unsuccessful building gcc 4.4.1 on a Sparc Enterprise T5120
running Solaris 10.  Having not built any Solaris versions of gcc for
many years, I'd appreciate any pointers this group might have.

This Sun system comes with gcc version 4.0.4 (gccfss).

Starting with gmp-4.3.1, I was able to successfully build and check the
package with the preinstalled gcc.  Similarly, mpfr-2.4.1 successfully
built and checked with this compiler.

Producing new gmp and mpfr versions for GCC can happen in two ways :


1. one wants to do this one at a time, building, installing and testing
   these before doing the same with bare GCC

2. building all these at the same time during the GCC build

You choosed the first way. When your target,'sparc-sun-solaris2.10', is
a 'bi-arch' target, the 32-bit host/target being the default, you should
build 32-bit versions of gmp and mpfr because the GCC binaries would be
32-bit as default.

On to gcc 4.4.1, I ran the configure with:

../configure CC='gcc -m64'

This causes the 32-bit default being overridden...


Was the installed gcc-4.0.4 a 64-bit default one?  Why it produced 64-bit
versions for gmp and mpfr?

Without the 'gcc -m64' configure complained that GMP and MPFR weren't in place
as the configure test attempted a 32 built compile.

Of course it did... If you would like to have a 64-bit GCC which produces 64-bit binaries as default and 32-bit binaries with '-m32', then I think your target should be 'sparc64-sun-solaris2.10' or 'sparcv9-sun-solaris2.10'. But then maybe the 'lib's must contain 64 stuff and 'lib/sparcv7's must contain 32-bit stuff... What does your '/usr/lib' have? Have you '/usr/lib' and '/usr/lib/sparcv9' or '/usr/lib' and '/usr/lib/sparcv7' ?

Without any '--build=something --host=something --target=something' used
in the GCC configure, the 'something's will be guessed... These guesses
now told that you have a 32-bit opsys now, is that so?

The most easy route could have been the way '2', to symlink the gmp and
mpfr sources to the GCC sources, something like :

[root@Dell gcc-4.4.1]# ls -l gmp mpfr
lrwxrwxrwx 1 root root 12 2009-04-28 16:40 gmp -> ../gmp-4.2.4
lrwxrwxrwx 1 root root 13 2009-04-28 16:40 mpfr -> ../mpfr-2.4.0

Ie unpacking the gcc-4.4.1, gmp and mpfr sources into a common 'src'
directory and then letting the gmp and mpfr sources being seen in the
main gcc-4.4.1 src directory...


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