aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-18 11:28:21 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-18 13:43:55 -0300
commit63f1a045ba675568a1e92b204c301359dbccc85b (patch)
tree3b4168433e6b430606cf51b833f0a4d0eeb04191 /configure.ac
parentMerge pull request #5857 from kmk3/ci-standardize-apt (diff)
downloadfirejail-63f1a045ba675568a1e92b204c301359dbccc85b.tar.gz
firejail-63f1a045ba675568a1e92b204c301359dbccc85b.tar.zst
firejail-63f1a045ba675568a1e92b204c301359dbccc85b.zip
build: remove -mretpoline and NO_EXTRA_CFLAGS
The -mretpoline flag is not documented in the current versions of gcc and clang and it is what causes scan-build to fail: $ ./configure CC=clang | grep retpoline checking whether C compiler accepts -mretpoline... yes EXTRA_CFLAGS: -mretpoline -fstack-clash-protection -fstack-protector-strong $ scan-build --status-bugs make scan-build: Using '/usr/bin/clang-15' for static analysis make -C src/lib make[1]: Entering directory '/tmp/firejail/src/lib' /usr/bin/../lib/clang/ccc-analyzer [...] -mretpoline [...] -c common.c -o common.o gcc: error: unrecognized command-line option ‘-mretpoline’ make[1]: *** [../../src/prog.mk:16: common.o] Error 1 make[1]: Leaving directory '/tmp/firejail/src/lib' make: *** [Makefile:59: src/lib] Error 2 scan-build: Analysis run complete. scan-build: Removing directory '/tmp/scan-build-[...]' because it contains no reports. scan-build: No bugs found. Environment: clang 15.0.7-9 and gcc 13.1.1-1 on Artix Linux. Note: NO_EXTRA_CFLAGS was added to work around this issue by causing all of the flags in EXTRA_CFLAGS to be ignored. Note2: -mretpoline was added on commit 4a99c8aa2 ("spectre support for clang compiler", 2018-03-30) and NO_EXTRA_CFLAGS was added on commit 490918c35 ("fix make scan-build for debian 10 and arch", 2019-07-22). See also commit 2c64d1fdd ("use AX_CHECK_COMPILE_FLAG to check for spectre flags", 2019-06-21). Closes #5509. Kind of relates to #2661.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 0 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 30b031801..93de61b95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,10 +25,6 @@ AX_CHECK_COMPILE_FLAG([-mindirect-branch=thunk], [
25 HAVE_SPECTRE="yes" 25 HAVE_SPECTRE="yes"
26 EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk" 26 EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"
27]) 27])
28AX_CHECK_COMPILE_FLAG([-mretpoline], [
29 HAVE_SPECTRE="yes"
30 EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"
31])
32AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [ 28AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [
33 HAVE_SPECTRE="yes" 29 HAVE_SPECTRE="yes"
34 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection" 30 EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"