GNU bug report logs -
#20899
Bug in libtool: -fno-strict-alias not passed to linker stage when -flto is used
Previous Next
To reply to this bug, email your comments to 20899 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#20899
; Package
libtool
.
(Thu, 25 Jun 2015 19:36:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Davin McCall <davmac <at> davmac.org>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Thu, 25 Jun 2015 19:36:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
I have discovered what I believe is a bug in libtool: It does not pass
the "-fno-strict-aliasing" compilation flag to the link stage. This is
not normally a problem, but is certainly a problem is "-flto" (link time
optimization) is used. In this case code that works correct only without
strict aliasing will incorrectly after being linked.
If you need any further information, please don't hesitate to ask.
Davin
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#20899
; Package
libtool
.
(Fri, 26 Jun 2015 02:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20899 <at> debbugs.gnu.org (full text, mbox):
On Thu, 25 Jun 2015, Davin McCall wrote:
> Hi,
>
> I have discovered what I believe is a bug in libtool: It does not pass the
> "-fno-strict-aliasing" compilation flag to the link stage. This is not
> normally a problem, but is certainly a problem is "-flto" (link time
> optimization) is used. In this case code that works correct only without
> strict aliasing will incorrectly after being linked.
Does
-Wl,--fno-strict-aliasing
work for you? It might be necessary to also specify
-fno-strict-aliasing if the compiler also uses this.
Bob
--
Bob Friesenhahn
bfriesen <at> simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#20899
; Package
libtool
.
(Fri, 26 Jun 2015 02:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#20899
; Package
libtool
.
(Sat, 27 Jun 2015 09:31:03 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Bob,
On 26/06/15 03:31, Bob Friesenhahn wrote:
> On Thu, 25 Jun 2015, Davin McCall wrote:
>
>> Hi,
>>
>> I have discovered what I believe is a bug in libtool: It does not
>> pass the "-fno-strict-aliasing" compilation flag to the link stage.
>> This is not normally a problem, but is certainly a problem is "-flto"
>> (link time optimization) is used. In this case code that works
>> correct only without strict aliasing will incorrectly after being
>> linked.
>
> Does
>
> -Wl,--fno-strict-aliasing
>
> work for you? It might be necessary to also specify
> -fno-strict-aliasing if the compiler also uses this.
>
> Bob
No. -Wl passes an option to the linker, but the linker does not accept
the -fno-strict-aliasing option, and so using -Wl,-fno-strict-aliasing
results in a link failure. It's my understanding that in LTO mode, gcc
acts as a somewhat more complex frontend to the linker than usual, but
it still passes -Wl,XXX options directly to the underlying linker. GNU
ld then interprets '-fno-strict-aliasing' as its own '-f' option, used
for a different purpose.
FWIW the libtool script contains a small bit of code with a comment
header reading "Flags to be passed through unchanged, with rationale:".
It includes -flto, but not -fno-strict-aliasing. If I add
-fno-strict-aliasing to the list here, it does seem to work as I want,
that is, -fno-strict-aliasing is visible on the link stage command line.
Davin
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#20899
; Package
libtool
.
(Sat, 27 Jun 2015 09:31:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.