Re: Bootstraping gcc-4.6.1 with Sun Studio on Solaris 9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Aug 2011, Maciej Bliziński wrote:

2011/8/15 Marc Glisse <marc.glisse@xxxxxxxx>:
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?

Libtool was badly generated because configure didn't have/guess the right information.

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.

Note that I get the same error you get if I have a GNU ld on my PATH and I don't specify --without-gnu-ld --with-ld=/usr/ccs/bin/ld.

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

Right, on sparc you don't want -march=v8 but -mcpu=v8, so that would be --with-cpu=v8 (or --with-cpu-32=v8, not sure which).

--
Marc Glisse


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux