On 2010-03-26 21:07, Ralf Wildenhues wrote:
> tags +upstream
> thanks
> 
> Hello Török,
> 
> thanks for the report.
> 
> * Török Edwin wrote on Thu, Mar 25, 2010 at 10:24:08PM CET:
>> Currently libtool strips -flto when called for linking which is wrong.
>> It should pass -flto to gcc, since its both a compile-time and a link-time 
>> flag.
> 
> I agree.  There has been a similar request for another compiler
> recently, too, let's address them both, upstream.

I'm not subscribed to the upstream ML, but when you have any patches
you'd like me to test, please send me an e-mail.

> 
>> Actually I don't know why libtool strips any flags at all. If I pass a flag
>> at compile time, and libtool happily passes it along (such as -flto here),
>> why does it strip it at link time?
> 
> FWIW, libtool only strips flags when creating shared libraries, not when
> creating programs.

Didn't know that, since I didn't get that far (build stopped when shared
lib failed to build). Good to know though.

> 
> Many flags need changed libtool semantics, when passed through.
> For example, just passing through -flto without further changes
> let me find one GCC bug

Maybe you hit this bug? (mixing -O flags)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42402

> and half a dozen Libtool testsuite failures
> and several places where libtool needs to be changed.  It's simply
> more robust to strip unknown flags.

Fair enough.

Could libtool give a warning when it strips a flag though?
Not everyone inspects the link command-line passed to gcc, so they may
think they used an optimization flag (other than -O), but in reality
libtool stripped it.

Best regards,
--Edwin



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to