diff options
author | Rafael Laboissière <rafael@debian.org> | 2021-11-14 14:03:11 -0300 |
---|---|---|
committer | Rafael Laboissière <rafael@debian.org> | 2021-11-14 14:03:11 -0300 |
commit | 22d474141a1f1672137497da77965ae364dd21c1 (patch) | |
tree | 68921bea3663b8467ca2fcc714eb127c277a9967 | |
parent | fbcac7922bbc7410b3495f3ca43c290043910ec5 (diff) |
Honor the environment variable CFLAGS and CXXFLAGS
Forwarded: https://savannah.gnu.org/bugs/index.php?61483
Last-Update: 2021-11-14
This is required in Debian, such that hardening flags like
-fstack-protector-strong, -Wformat, and -Werror=format-security are
used in the compilation of C++ files.
Gbp-Pq: Name honor-cflags-cxxflags.patch
-rw-r--r-- | src/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index 6e5f736..a368bc2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,10 +6,10 @@ FLAGSCOMW=-Wall -Wextra -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings #Common optimization flags for C and C++ FLAGSCOMO=-O2 -funroll-loops -fno-common -fshort-enums #Flags for C -CFLAGS=-std=c99 -pedantic $(FLAGSCOMW) -Wconversion -Wmissing-prototypes +CFLAGS+=-std=c99 -pedantic $(FLAGSCOMW) -Wconversion -Wmissing-prototypes CFLAGS+=-Wstrict-prototypes -Wnested-externs $(FLAGSCOMO) #Flags for C++ -CXXFLAGS=$(FLAGSCOMW) $(FLAGSCOMO) +CXXFLAGS+=$(FLAGSCOMW) $(FLAGSCOMO) #Export flags for compilers and linker export CFLAGS CXXFLAGS |