From 4c49a35f43badf202a400d727ed9d3db14b59ac8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 12 Mar 2015 11:26:51 +0100 Subject: [PATCH] etc/defaults.conf: move _FORTIFY_SOURCE to CFLAGS. Lots of pkgs seem to fail when _FORTIFY_SOURCE is defined in CPPFLAGS due to a missing optimization level, and also some of them simply ignore CPPFLAGS, therefore move it to CFLAGS to fix this once and for all. --- etc/defaults.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/defaults.conf b/etc/defaults.conf index d6f2f477a63..016d319461e 100644 --- a/etc/defaults.conf +++ b/etc/defaults.conf @@ -24,9 +24,8 @@ XBPS_INSTALL_ARGS="--repository=http://repo.voidlinux.eu/current" # Native Compilation/Preprocessor flags for C and C++. Additional settings # for the target architecture are also declared in common/build-profiles/.sh. # -XBPS_CFLAGS="-O2 -pipe -fstack-protector-strong" +XBPS_CFLAGS="-O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2" XBPS_CXXFLAGS="${XBPS_CFLAGS}" -XBPS_CPPFLAGS="-D_FORTIFY_SOURCE=2" # [OPTIONAL] # Linker flags passed to the compiler. By default we use --as-needed to