mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
guard some hardening flag for gcc < 12
This commit is contained in:
+12
-1
@@ -170,7 +170,18 @@ endif
|
||||
ifneq ($(NOHARDENING),1)
|
||||
# Manual equivalents of -fhardened to avoid g++: warning: linker hardening options not enabled by ‘-fhardened’ because other link options were specified on the command line
|
||||
DEFCFLAGS += \
|
||||
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -ftrivial-auto-var-init=zero
|
||||
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
|
||||
|
||||
ifeq ($(DETECTED_COMPILER), clang)
|
||||
ifeq ($(shell expr $(CC_VERSION) \>= 16), 1)
|
||||
DEFCFLAGS += -ftrivial-auto-var-init=zero
|
||||
endif
|
||||
else
|
||||
ifeq ($(shell expr $(CC_VERSION) \>= 12), 1)
|
||||
DEFCFLAGS += -ftrivial-auto-var-init=zero
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef IS_WINDOWS
|
||||
ifndef IS_DARWIN
|
||||
ifeq ($(ARCH),x86_64)
|
||||
|
||||
Reference in New Issue
Block a user