You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The warning is being produced on Arch (and potentially on other
distributions) since pacman 6.1, which changes `-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 user/distribution can still override
the current value through CFLAGS/CPPFLAGS and the build system still
defines the flag for older distributions/compilers which may not enable
it by default.
Fixesnetblue30#6282.
Reported-by: @glitsj16
0 commit comments