Fix makefiles to avoid spurious _XOPEN_SOURCE

This commit is contained in:
Jeffrey Walton 2021-05-24 19:40:36 -04:00
parent 01d374afd1
commit 41edd50bd1
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 15 additions and 22 deletions

View File

@ -113,18 +113,16 @@ endif
# 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)
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
#TPROG = TestPrograms/test_cxx.cpp
#TOPT =
#$(info Testing compile... )
#$(info $(shell $(TCOMMAND)))
# Always print testing flags since some tests always happen, like 64-bit.
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
# TCOMMAND is used for just about all tests. Make will lazy-evaluate
# the variables when executed by $(shell $(TCOMMAND) ...).
TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
# Fixup AIX
ifeq ($(IS_AIX),1)
TPROG = TestPrograms/test_64bit.cpp

View File

@ -200,20 +200,15 @@ endif
# 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)
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
#TPROG = TestPrograms/test_cxx.cpp
#TOPT =
#$(info Testing compile... )
#$(info $(shell $(TCOMMAND)))
# Always print testing flags since some tests always happen, like 64-bit.
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CPPFLAGS) $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
# For the previous messages
$(info )
# TCOMMAND is used for just about all tests. Make will lazy-evaluate
# the variables when executed by $(shell $(TCOMMAND) ...).
TCOMMAND = $(CXX) $(TCXXFLAGS) $(TEXTRA) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT)
###########################################################
##### X86/X32/X64 Options #####