Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support link time optimization with GCC #553

Closed
wants to merge 1 commit into from
Closed

Support link time optimization with GCC #553

wants to merge 1 commit into from

Conversation

ghedo
Copy link
Contributor

@ghedo ghedo commented Jan 14, 2016

Even with this fix, when using-flto the build fails with this error:

asm/x86_64-gcc.c: Assembler messages:
asm/x86_64-gcc.c:196: Error: operand type mismatch for `div'
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.

Which comes from https://github.com/openssl/openssl/blob/master/crypto/bn/asm/x86_64-gcc.c#L196, not sure what that is about though (@dot-asm?)

Also, maybe when GCC is detected, the gcc- variants of the common build tools should be used by default?

This is required for example when enabling LTO with GCC as follows:

    AR=gcc-ar NM=gcc-nm RANLIB=gcc-ranlib ./config -flto
@dot-asm
Copy link
Contributor

dot-asm commented Feb 10, 2016

Two points regarding "operand type mismatch for `div'". 1. LTO is not recommended for OpenSSL, because it has potential to thwart security countermeasures. Countermeasures, in first hand constant-time execution ones, usually achieve the goal by making code effectively slower, while it's optimizer's business to consider it unnecessary slow. And deep inter-procedural analysis procedure such as LTO brings these spots under optimizer's radar. 2. It takes two to dance tango, how do we know it's not compiler bug in specific version? 4.9.2 doesn't seem to have problem...

@richsalz
Copy link
Contributor

I think we should close this, based on @dot-asm 's comments.

@ghedo
Copy link
Contributor Author

ghedo commented Feb 12, 2016

Whatever.

@ghedo ghedo closed this Feb 12, 2016
@ghedo ghedo deleted the lto branch February 12, 2016 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants