Spectre probe for -mretpoline/-mindirect-branch=thunk-extern
-mretpoline is currently the clang-7.0 name for Spectre mitigation. gcc-7.3/8.1 branches currently use -mindirect-branch=thunk-extern for this. The default GNU linker check does not work though, you need llvm lld-7. so add -Wl,-z,retpolineplt only where the retpoline spectre option was added. Without linker support don't add the cflags neither, but warn. It needs lld-7 via LDFLAGS=-fuse-ld=lld-7 There is also a new -Wl,-z,textonly option. https://sourceware.org/ml/binutils/2017-11/msg00369.html Probe for it also.
parent
31d910b8
Please register or sign in to comment