libtool
[Top][All Lists]
Advanced

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

Re: set flags based on compiler version?


From: Tim Mooney
Subject: Re: set flags based on compiler version?
Date: Fri, 7 Jul 2006 10:54:26 -0500 (CDT)

In regard to: Re: set flags based on compiler version?, Ralf Wildenhues...:

* Tim Mooney wrote on Fri, Jul 07, 2006 at 01:13:25AM CEST:

Is there a recommended way to modify libtool (I'm looking at 1.5.22) such
that PIC flags are set based on compiler *version*?

Look at the output of the compiler.  For Sun compilers, we use something
like
 case `$CC -V 2>&1 | sed 5q` in
 *Sun\ C*) ...

to match C and C++ compilers (in the CVS HEAD and branch-1-5).  It
should be possible to amend this for a version check.

Thanks Ralf.  I figured that was it, but thought I should check.

The Sun Studio 11 compilers (C and C++) still accept -KPIC, but it's marked
in the manual as obsolete and not to be used (and probably has been for a
few revisions of the compiler).

Hmm, yes, I noted some of the flags we are using are obsolete.  I really
wonder though whether they really will kill support for -KPIC: that
would be a foolish thing to do, IMVHO.
http://docs.sun.com/source/819-3688/cc_ops.app.html#48504 really
suggests to me that supporting -KPIC is a help for the user.

I agree.

...which is exactly why I think killing support for -KPIC is not a good
idea on their side.  My gut feeling is that we should not act here until
things break.

I'm certainly ok with that.  Do you want me to add a note to section
13.3.2 (Compilers) of the manual explaining the "wait and see" approach
for -KPIC on solaris2*?  I see another bit in that section that should
probably be fixed (osf3* mentiones PowerPC, but I'm pretty sure OSF/1
never ran on powerpc, that should probably be alpha).

 Does the compiler issue a warning by default?

No.

Tim
--
Tim Mooney                              address@hidden
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164




reply via email to

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