Clean up GCC flags
Remove some redundant or repeated flags, as noted by ppannuto in Issue #23.
This commit is contained in:
parent
81f25a1848
commit
b588a7dbaf
12
src/Makefile
12
src/Makefile
@ -1,5 +1,5 @@
|
|||||||
CFLAGS+=-Wall -pedantic -Wextra -std=gnu99 -I../lib -I./ -Ioutput_modules -O2 -g
|
INCLUDE+=-I../lib -I./ -Ioutput_modules
|
||||||
LDFLAGS+=-g -pthread
|
LDFLAGS+=-pthread
|
||||||
LDLIBS+=-lpcap -lgmp -lm
|
LDLIBS+=-lpcap -lgmp -lm
|
||||||
TARGETS=zmap
|
TARGETS=zmap
|
||||||
VPATH=../lib:output_modules:probe_modules
|
VPATH=../lib:output_modules:probe_modules
|
||||||
@ -13,22 +13,22 @@ bindir=$(PREFIX)/sbin
|
|||||||
# Hardening and warnings for building with gcc
|
# Hardening and warnings for building with gcc
|
||||||
#M aybe add -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
#M aybe add -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
||||||
#-Wold-style-definition -Wswitch-enum
|
#-Wold-style-definition -Wswitch-enum
|
||||||
GCCWARNINGS = -Wall -fno-strict-aliasing -W -Wfloat-equal -Wundef \
|
GCCWARNINGS = -Wall -pedantic -fno-strict-aliasing -Wfloat-equal -Wundef \
|
||||||
-Wpointer-arith \
|
-Wpointer-arith \
|
||||||
-Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment \
|
-Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment \
|
||||||
-Wformat=2 -Wwrite-strings -Wredundant-decls \
|
-Wformat=2 -Wwrite-strings -Wredundant-decls \
|
||||||
-Wnested-externs -Wbad-function-cast -Winit-self \
|
-Wnested-externs -Wbad-function-cast -Winit-self \
|
||||||
-Wmissing-field-initializers \
|
-Wmissing-field-initializers \
|
||||||
-Waddress -Wmissing-noreturn -Wnormalized=id \
|
-Waddress -Wmissing-noreturn -Wnormalized=id \
|
||||||
-Woverride-init -Wstrict-overflow=1 -Wextra -Warray-bounds \
|
-Wstrict-overflow=1 -Wextra \
|
||||||
-Wstack-protector -Wformat -Wformat-security -Wpointer-sign -Wno-format-nonliteral -Wno-format-y2k
|
-Wstack-protector -Wformat -Wformat-security -Wpointer-sign -Wno-format-nonliteral -Wno-format-y2k
|
||||||
GCCHARDENING=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fwrapv -fPIC --param ssp-buffer-size=1
|
GCCHARDENING=-D_FORTIFY_SOURCE=2 -fstack-protector-all -fwrapv -fPIC --param ssp-buffer-size=1
|
||||||
LDHARDENING=-z relro -z now
|
LDHARDENING=-z relro -z now
|
||||||
|
|
||||||
EXTRACFLAGS=-g -O2 $(EXTRA_CFLAGS) $(GCCHARDENING) $(GCCWARNINGS) -Werror
|
EXTRACFLAGS=-std=gnu99 -g -O2 $(EXTRA_CFLAGS) $(GCCHARDENING) $(GCCWARNINGS) -Werror
|
||||||
EXTRALDFLAGS= $(LDHARDENING)
|
EXTRALDFLAGS= $(LDHARDENING)
|
||||||
|
|
||||||
CFLAGS+=-Wall $(INCLUDE) $(EXTRACFLAGS)
|
CFLAGS+=$(INCLUDE) $(EXTRACFLAGS)
|
||||||
LDFLAGS+=$(EXTRALDFLAGS)
|
LDFLAGS+=$(EXTRALDFLAGS)
|
||||||
|
|
||||||
modules=module_tcp_synscan.o module_icmp_echo.o module_udp.o #ADD YOUR MODULE HERE
|
modules=module_tcp_synscan.o module_icmp_echo.o module_udp.o #ADD YOUR MODULE HERE
|
||||||
|
Loading…
Reference in New Issue
Block a user