aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2024-03-26 00:38:32 +0000
committerViktor Szakats <commit@vsz.me>2024-03-26 00:49:43 +0000
commit8cddaf034550bfea6e7d9ec57af1af822eb33053 (patch)
tree31fb51475ce14454a4d4f132bdd805cef12ab533 /crypto
parent577970ab842f7e352048d45fe930ddd21f4190f3 (diff)
downloadportable-8cddaf034550bfea6e7d9ec57af1af822eb33053.tar.gz
portable-8cddaf034550bfea6e7d9ec57af1af822eb33053.tar.bz2
portable-8cddaf034550bfea6e7d9ec57af1af822eb33053.zip
mingw: re-enable endbr opcode, add workaround for clang `cet.h` issue
- https://github.com/libressl/openbsd/pull/149 fixes to crash on startup issue, thus nuking all endbr opcodes is no longer necessary. This effectively enables CET in ASM code for MinGW x86_64 builds. - llvm `cet.h` (as of v18) assigns `endbr32` instead of `endbr64` to `_CET_ENDBR` macro for MinGW x86_64 targets. https://github.com/llvm/llvm-project/blob/llvmorg-18.1.1/clang/lib/Headers/cet.h#L15-L35 Work this around by mapping `endbr32` to `endbr64`. Prerequisite: https://github.com/libressl/openbsd/pull/149 Fixes: https://github.com/libressl/portable/issues/1015
Diffstat (limited to 'crypto')
-rw-r--r--crypto/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index 110a673..87fb2d8 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -193,7 +193,7 @@ if(HOST_ASM_MINGW64_X86_64)
193 whrlpool/wp-mingw64-x86_64.S 193 whrlpool/wp-mingw64-x86_64.S
194 cpuid-mingw64-x86_64.S 194 cpuid-mingw64-x86_64.S
195 ) 195 )
196 add_definitions(-Dendbr64=) 196 add_definitions(-Dendbr32=endbr64)
197 add_definitions(-DAES_ASM) 197 add_definitions(-DAES_ASM)
198 add_definitions(-DBSAES_ASM) 198 add_definitions(-DBSAES_ASM)
199 add_definitions(-DVPAES_ASM) 199 add_definitions(-DVPAES_ASM)