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
CMakeLists.txt shouldn't use CMAKE_SYSTEM_PROCESSOR for asm #361
Comments
A related question: I've reverted downstream to gnu autotools build. Is libressl-portable going to continue to support both build systems? |
IMHO, autotool should be primary build system for LibreSSL,
and CMake is for native Windows build without cygwin nor mingw.
Now, CMake build works on all platforms though ...
|
What's the CMake solution then? |
I think we can use CMAKE_TOOLCHAIN_FILE, And the toolchain file will be like this,
Toolchain file should be written by library user since there are many platforms and targets. |
@blueness Can you close this issue ? Original ticket appears to be closed already. |
I think I'd like to avoid the extra complexity that comes with coaxing cmake into cross-compiling properly. It's unfortunate that it cannot be done easily as it is with autotools. |
The new cmake build system makes use of CMAKE_SYSTEM_PROCESSOR which looks at the processor's architecture to decide whether to build x86_64 or i386 assembly code. This is a very bad practice because you may want to build 32-bit asm on a 64-bit system, either in a chroot, or as part of cross compiling, or for multilib systems where one invokes gcc -m32. This leads to a downstream issue in Gentoo as reported in
https://bugs.gentoo.org/636836
The problem line is at
https://github.com/libressl-portable/portable/blob/master/CMakeLists.txt#L262
The text was updated successfully, but these errors were encountered: