libtool
[Top][All Lists]
Advanced

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

Re: 1.5.18: suppressing non-C language checks / pass flags to cc in link


From: Paul Jakma
Subject: Re: 1.5.18: suppressing non-C language checks / pass flags to cc in link mode
Date: Sat, 26 Nov 2005 10:28:05 +0000 (GMT)

Hi Ralf,

On Sat, 26 Nov 2005, Ralf Wildenhues wrote:

Well, in a way libtool *cannot* allow all flags through, and thus *has* to know about them. At least it has to know whether a certain flag eats an argument or not.

Well, one simple trick at least would be if:

        -XCClink "x y z"

would result in cc being invoked with x, y and z as seperate arguments. Unfortunately it does not, cc is then invoked with 'x y z' as one arg ;).

And it cannot allow flags through without knowing, when those flags alter linking behavior which libtool assumes differently. Also note that on some systems $LD is used for linking rather than $CC or $CXX.

Right. But libtool knows that, no point passing CFLAGS to ld.

I tried going through libtool.m4 to find an easy fix, but it's not very obvious.

The only other alternative then, it seems, is to write your configure script to include some kind of extra 'LINK_MODE_CFLAGS' variable, then tack that on to CFLAGS and also generate an additional 'LI5BBTOOL_CCLINK_FLAGS' variable for each word in LINK_MODE_CFLAGS combined with -XCClinker and then use LIBTOOL_CCLINK_FLAGS in prog_LDADD in your Makefile.am's.

something like this, yes.  It would be nice to adjust Autoconf/Automake
to cope better with this situation.

Well, a libtool autoconf macro to specify the CClink flags to use might be nice.

Which flags do you need passed through?

For gcc:
        -fpic
        -fPIC
        -fpie
        -fPIE

(I think you have some support for -fpic already?)

For Sun Studio, the ones i'm interested in:

        -xarch=....
        -xtarget=....
        -xchip=....
        -xcode=....
        -fast
        -xOn    (n is an integer)
        -xipo
        -xipo=n

For more see A.1.2 in:

        http://docs.sun.com/source/819-0494/cc_ops.app.html

And A.1.11 obviously should be passed through too.

Note that -xOn and -xtarget are not listed in A.1.2, because they are macro arguments which simply are equivalent to several other base arguments, however they must still be given.

We should deal with all those correctly.  Please list the ones we're
currently missing, so that can be fixed.

See above. -xtarget=.... is probably the most annoying one which is missing, because it is required in order to be compile for 64bit. ;)

This patch is a decent workaround.

I'm inclined to accept a fix for branch-1-5 if somebody has the patience to dig out the patch that fixed this in CVS HEAD (plus eventual subsequent fixes of the patch) and it can be applied to branch-1-5 without adding new interfaces or changing existing ones, and is not too disruptive in general.

Sounds good, I've not followed libtool development at all though, so I've no idea what/where that patch might be.

If merely for the reason that I hate to read yet another bug report about this issue, or see yet another dysfunctional workaround for this (unlike above!).

;)

Other than that, I can only reiterate that we are working on the last few known issues in CVS HEAD, hope to have them fixed in the not too distant future, and will then release another 2.0 alpha, and 2.0 hopefully soon afterwards. Yes, I know I sound like a street organ. :-/

:)

Thanks very much!

regards,
--
Paul Jakma      address@hidden  address@hidden  Key ID: 64A2FF6A
Fortune:
"Here's something to think about:  How come you never see a headline like
 `Psychic Wins Lottery.'"
-- Comedian Jay Leno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]