libressl/portable

bn/arch/amd64/bignum_add.S:52:2: error: invalid instruction mnemonic 'endbr64'

vollkommenheit opened this issue · 7 comments

Getting the following on macOS Intel, which seems to be a result of 3ef498f

/Applications/Xcode.app/Contents/Developer/usr/bin/make install-am
CPPAS bn/arch/amd64/libcrypto_la-bignum_add.lo
bn/arch/amd64/bignum_add.S:52:2: error: invalid instruction mnemonic 'endbr64'
endbr64
^~~~~~~
make[2]: *** [bn/arch/amd64/libcrypto_la-bignum_add.lo] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1

clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

The referenced commit should address the issue by removing the endbr64 instructions - it is more likely that the build was prior to this commit, or the script was not invoked for some reason.

I tried it again, it still occurs:

CPPAS bn/arch/amd64/libcrypto_la-bignum_add.lo
bn/arch/amd64/bignum_add.S:52:2: error: invalid instruction mnemonic 'endbr64'
endbr64
^~~~~~~
make[2]: *** [bn/arch/amd64/libcrypto_la-bignum_add.lo] Error 1
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1
start make...
Making all in include
Making all in openssl
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
make[3]: Nothing to be done for all-am'. make[2]: Nothing to be done for all-am'.
Making all in crypto
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CPPAS bn/arch/amd64/libcrypto_la-bignum_add.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_cmadd.lo
bn/arch/amd64/bignum_cmadd.S:57:2: error: invalid instruction mnemonic 'endbr64'
endbrbn/arch/amd64/bignum_add.S6:4
52: 2^: ~~error: ~~~invalid instruction mnemonic 'endbr64'~

endbr64
^~~~~~~
make[2]: *** [bn/arch/amd64/libcrypto_la-bignum_cmadd.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [bn/arch/amd64/libcrypto_la-bignum_add.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

botovq commented
botovq commented
botovq commented

Yep, you are right @botovq . This did not break any of the builds I tested on Ventura using XCode 14.3, or any of our CI checks https://github.com/libressl/portable/actions/runs/5098959705 but we'll fix this up too.

Might be more of a pain since we had been using these unchanged between platforms; maybe a preprocessor fixup will be suitable here.

This should be fixed with #872 which removes the instruction in the bignum code as well.