Bootstraping gcc-4.6.1 with Sun Studio on Solaris 9

Maciej Bliziński maciej@opencsw.org
Mon Aug 15 15:46:00 GMT 2011


2011/8/15 Marc Glisse <marc.glisse@inria.fr>:
>>> libtool doesn't seem to have noticed you are not using gcc/linux.
>>
>> Is there a standard way to tell it that?
>
> Well, it works for me:
> /bin/bash ./libtool --tag=CC --tag=disable-static --mode=link cc -g -module
> -bindir /export/home/oracle/i/libexec/gcc/i386-pc-solaris2.10/4.6.1 -o
> liblto_plugin.la -rpath
> /export/home/oracle/i/libexec/gcc/i386-pc-solaris2.10/4.6.1 lto-plugin.lo
> -Wc,../libiberty/pic/libiberty.a
> libtool: link: cc -G -h liblto_plugin.so.0 -o .libs/liblto_plugin.so.0.0.0
>  .libs/lto-plugin.o   -lc  ../libiberty/pic/libiberty.a
>
> So it does know to use -G and -h instead of -shared and -soname. No idea why
> it's different for you.

I tried on 3 boxes, and it seems to work on one of them. One thing I
noticed was that the box on which it worked, did not have the
CSWlibtool package installed, which means there was no
/opt/csw/bin/libtool (/opt/csw/bin is in PATH). The box on which it
worked, no libtool was available in PATH. I also noticed that the
lto-plugin directory is one of the two that provides its own libtool
executable. The other is zlib. As an experiment, I hand-edited the
generated Makefile in the lto-plugin directory, changing the default
LIBTOOL setting (pointing to ${topdir}/libtool) to /opt/csw/bin/bash
/opt/csw/bin/libtool.

It made the linking pass. But what would be the proper fix?

> Btw, I set CC=cc and used --with-gmp=... --with-gnu-as
> --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld

Same here.

>> There are some flags I need to pass to the last stage of the
>> compilation, namely -march=v8, because of the policy at OpenCSW to
>> build sparcv8 and not sparcv8+ (default for gcc) binaries.  Looks like
>> BOOT_CFLAGS work for that purpose.
>
> You would still need CFLAGS_FOR_TARGET I guess. Doesn't configuring with
> --with-arch=v8 or --with-arch-32=v8 work?

Compilation breaks with:

This target does not support --with-arch.
Valid --with options are: cpu float tune
gmake[4]: *** [configure-stage1-gcc] Error 1
gmake[4]: Leaving directory
`/home/maciej/src/opencsw/pkg/gcc4/branches/bootstrap-4.6-suncc/work/solaris9-sparc/build-isa-sparcv8/gcc-4.6.1/objdir'

Maciej



More information about the Gcc-help mailing list