diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2024-03-20 07:28:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 07:28:50 +0000 |
commit | 0da23da653c273874a3efa8b57db264ab2dadfea (patch) | |
tree | 4cbb94283e404f9b538628f5c6fceb2e07be0884 /config.mk.in | |
parent | Rename etc/session-desktop.profile to etc/profile-m-z/session-desktop.profile (diff) | |
download | firejail-0da23da653c273874a3efa8b57db264ab2dadfea.tar.gz firejail-0da23da653c273874a3efa8b57db264ab2dadfea.tar.zst firejail-0da23da653c273874a3efa8b57db264ab2dadfea.zip |
build: fix "warning: "_FORTIFY_SOURCE" redefined" (#6283)
The warning is being produced on Arch since pacman 6.1, which changed
`-D_FORTIFY_SOURCE=2` to `-D_FORTIFY_SOURCE=3` in CFLAGS in
makepkg.conf:
$ pacman -Q gcc pacman
gcc 13.2.1-5
pacman 6.1.0-3
$ makepkg
[...]
make -C src/lib
gcc [...] -D_FORTIFY_SOURCE=2 [...] -Wp,-D_FORTIFY_SOURCE=3 [...] -c ../../src/lib/common.c -o ../../src/lib/common.o
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
To fix this, only add `-D_FORTIFY_SOURCE` to EXTRA_CFLAGS if it does not
cause any warnings with CFLAGS and CPPFLAGS during compilation.
The effect remains the same: The build system still defines the macro by
default (if there are no warnings) and the user/distribution can still
override it through CFLAGS/CPPFLAGS.
Fixes #6282.
Reported-by: @glitsj16
Diffstat (limited to 'config.mk.in')
-rw-r--r-- | config.mk.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config.mk.in b/config.mk.in index 253b86435..a7f66fbb5 100644 --- a/config.mk.in +++ b/config.mk.in | |||
@@ -91,7 +91,7 @@ COMMON_CFLAGS = \ | |||
91 | -ggdb -O2 -DVERSION='"$(VERSION)"' \ | 91 | -ggdb -O2 -DVERSION='"$(VERSION)"' \ |
92 | -Wall -Wextra $(HAVE_FATAL_WARNINGS) \ | 92 | -Wall -Wextra $(HAVE_FATAL_WARNINGS) \ |
93 | -Wformat -Wformat-security \ | 93 | -Wformat -Wformat-security \ |
94 | -fstack-protector-all -D_FORTIFY_SOURCE=2 \ | 94 | -fstack-protector-all \ |
95 | -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' \ | 95 | -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' \ |
96 | -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' \ | 96 | -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' \ |
97 | -DVARDIR='"/var/lib/firejail"' | 97 | -DVARDIR='"/var/lib/firejail"' |