mirror of https://github.com/upx/upx.git
Update src/Makefile to use more conservative gcc optimization settings.
This commit is contained in:
parent
5abb578e47
commit
2582fbac59
|
@ -37,9 +37,15 @@ ifeq ($(DEBUG),1)
|
||||||
CXXFLAGS += -O0 -g
|
CXXFLAGS += -O0 -g
|
||||||
else
|
else
|
||||||
CXXFLAGS += -O2
|
CXXFLAGS += -O2
|
||||||
|
LDFLAGS += -s
|
||||||
endif
|
endif
|
||||||
CXXFLAGS_WERROR = -Werror
|
# some gcc versions suffer over-agressive aliasing and wrapv optimization features/bugs
|
||||||
|
CXXFLAGS_OPTIMIZE_STRICT_ALIASING ?= -fno-strict-aliasing
|
||||||
|
CXXFLAGS_OPTIMIZE_WRAPV ?= -fwrapv
|
||||||
|
CXXFLAGS += $(CXXFLAGS_OPTIMIZE_STRICT_ALIASING)
|
||||||
|
CXXFLAGS += $(CXXFLAGS_OPTIMIZE_WRAPV)
|
||||||
CXXFLAGS += -Wall -W -Wcast-align -Wcast-qual -Wpointer-arith -Wshadow -Wwrite-strings
|
CXXFLAGS += -Wall -W -Wcast-align -Wcast-qual -Wpointer-arith -Wshadow -Wwrite-strings
|
||||||
|
CXXFLAGS_WERROR ?= -Werror
|
||||||
CXXFLAGS += $(CXXFLAGS_WERROR)
|
CXXFLAGS += $(CXXFLAGS_WERROR)
|
||||||
endif
|
endif
|
||||||
CPPFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
|
CPPFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
|
||||||
|
|
Loading…
Reference in New Issue