[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: support for SunPRO C/C++ on Linux
From: |
Bruno Haible |
Subject: |
Re: support for SunPRO C/C++ on Linux |
Date: |
Wed, 10 May 2006 21:34:42 +0200 |
User-agent: |
KMail/1.5 |
Hello Ralf,
> Some notes:
> > *** 3353,3358 ****
> > --- 3353,3379 ----
> > # dependencies.
> > output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v
> > conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED
> > "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case
> > $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list
> > $z";;esac; done; echo $list' ;;
> > + *)
> > + if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then
>
> If that LC_ALL=C was really necessary, then that is a bug.
It may not be necessary within the context of a configure script. I put it
there because I tested the English output only, not the Japanese or Chinese
or Thai one... Had forgotten that autoconf already disables i18n.
> Any reason not to simplify this to something like this?
> case `$CC -V 2>&1 >/dev/null` in
> *Sun\ C*)
Yes. HP-UX /bin/sh is known to dump core in
case `command that produces more than 1 KB of output` in
and I don't know how much output other compilers generate when given the -V
option.
> > + _LT_AC_TAGVAR(whole_archive_flag_spec,
> > $1)='${wl}--whole-archive`new_convenience=; for conv in
> > +$convenience\"\"; do test -z \"$conv\" ||
> > new_convenience=\"$new_convenience,$conv\"; done; $echo
> > \"$new_convenience\"`+${wl}--no-whole-archive'
>
> Are you sure the compiler driver won't reorder arguments here?
I used this backquoted glue-with-commas construct precisely because the
compiler driver did reorder the arguments. Earlier I used
${wl}--whole-archive$convenience ${wl}--no-whole-archive
which had the effect of passing to the compiler driver flags like
-Wl,--whole-archive .libs/libfoo.a .libs/libbar.a -Wl,--no-whole-archive
and the compiler driver passed these options to the linker:
--whole-archive --no-whole-archive .... .libs/libfoo.a .libs/libbar.a
The patch I submitted now passes to the compiler driver flags
-Wl,--whole-archive,.libs/libfoo.a,.libs/libbar.a -Wl,--no-whole-archive
and the linker gets these options:
--whole-archive .libs/libfoo.a .libs/libbar.a --no-whole-archive
So in general this should make --whole-archive actually work.
The only drawback of this approach is if no other object file is used, i.e.
the whole contents to be linked is inside --whole-archive, the compiler driver
refuses to do the link because it complains about no object files to link.
I don't know if it is a real use-case of libtool; if so, probably a fix could
be to add $convenience at the end of whole_archive_flag_spec, so that the
compiler sees the libraries too. (The linker would then see them twice, the
first time with --whole-archive, the second time without. That should be ok,
I hope?)
> only the CVS HEAD
> Libtool testsuite exposes the known failures fully.
Do you have two test cases, one for a whole library plus some other objects,
and one for two libraries and no other objects?
> Related question:
> are you volunteering for the forward-port of the patch? (If not, I can
> do it, but it'll take longer then.)
No. Generally I submit patches relative to the latest release. Everything
beyond that is IMO the maintainer's job. (I hope that this attitude will
convince some people to make releases more frequently ;-)).
> Do you happen to know whether Sun changed their minds and offered this
> compiler suite for free (as in beer) now? So that I could integrate it
> into testing..
Yes, it is available for download at
http://developers.sun.com/prodtech/cc/downloads/tech_preview.jsp
and they distributed copies of it at LinuxTag a week ago. But I have no idea
whether the compilers will stay zero-cost when they are out of beta.
Bruno
- support for SunPRO C/C++ on Linux, Bruno Haible, 2006/05/08
- Re: support for SunPRO C/C++ on Linux, Ralf Wildenhues, 2006/05/08
- Re: support for SunPRO C/C++ on Linux, Bruno Haible, 2006/05/08
- Re: support for SunPRO C/C++ on Linux, Bruno Haible, 2006/05/10
- Re: support for SunPRO C/C++ on Linux, Bruno Haible, 2006/05/15
- Re: support for SunPRO C/C++ on Linux, Bruno Haible, 2006/05/15
- Re: support for SunPRO C/C++ on Linux, Ralf Wildenhues, 2006/05/15