Add -fno-lto for GCC and compatibles

Jeffrey Walton <[email protected]>
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <CAH8yC8nJERS3-Y4KNZfz15fu9PJDJpE+ZM-KmV7RcMv-oTth8w@mail.gmail.com>
Hi Everyone,

LTO is slowly accumulating bugs. From what I have seen in the
post-mortems, it looks like LTO is either (1) results in a compile
error (older compilers) or (2) results in a runtime error (newer
compilers).

For (2), it appears LTO mishandles code with GCC extended inline
assembly. To build the library with LTO, you have to use
-DCRYPTOPP_DISABLE_ASM. That gets us past the self tests but causes a
slowdown in the library.

Worse, most users and distros are not aware of the LTO problems so the
library gets built with it but without -DCRYPTOPP_DISABLE_ASM.

I think we should add -fno-lto when GCC and compatibles support it.

What do you think?

Jeff

-- 
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8nJERS3-Y4KNZfz15fu9PJDJpE%2BZM-KmV7RcMv-oTth8w%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.