Use wildcard for FORTIFY_SOURCE filter on TCXXFLAGS (GH #865)
parent
417fbd719a
commit
22a55bbbc5
|
|
@ -119,9 +119,10 @@ else ifeq ($(findstring distclean,$(MAKECMDGOALS)),trim)
|
||||||
DETECT_FEATURES := 0
|
DETECT_FEATURES := 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Strip out -Wall, -Wextra and friends for feature testing
|
# Strip out -Wall, -Wextra and friends for feature testing. FORTIFY_SOURCE is removed
|
||||||
|
# because it requires -O1 or higher, but we use -O0 to tame the optimizer.
|
||||||
ifeq ($(DETECT_FEATURES),1)
|
ifeq ($(DETECT_FEATURES),1)
|
||||||
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=1 -D_FORTIFY_SOURCE=2 -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
|
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
|
||||||
ifneq ($(strip $(TCXXFLAGS)),)
|
ifneq ($(strip $(TCXXFLAGS)),)
|
||||||
$(info Using testing flags: $(TCXXFLAGS))
|
$(info Using testing flags: $(TCXXFLAGS))
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,10 @@ else ifeq ($(findstring distclean,$(MAKECMDGOALS)),trim)
|
||||||
DETECT_FEATURES := 0
|
DETECT_FEATURES := 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Strip out -Wall, -Wextra and friends for feature testing
|
# Strip out -Wall, -Wextra and friends for feature testing. FORTIFY_SOURCE is removed
|
||||||
|
# because it requires -O1 or higher, but we use -O0 to tame the optimizer.
|
||||||
ifeq ($(DETECT_FEATURES),1)
|
ifeq ($(DETECT_FEATURES),1)
|
||||||
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=1 -D_FORTIFY_SOURCE=2 -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
|
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
|
||||||
ifneq ($(strip $(TCXXFLAGS)),)
|
ifneq ($(strip $(TCXXFLAGS)),)
|
||||||
$(info Using testing flags: $(TCXXFLAGS))
|
$(info Using testing flags: $(TCXXFLAGS))
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue