makefile_base: add some compiler sanity flags

Signed-off-by: Steven Noonan <steven@valvesoftware.com>
This commit is contained in:
Steven Noonan 2018-10-18 07:47:38 -07:00
parent dde6aa0bfa
commit b660215c49

View File

@ -137,6 +137,8 @@ WINE32_AUTOCONF :=
WINE64_AUTOCONF :=
OPTIMIZE_FLAGS := -O2 -march=nocona $(call cc-option,$(CC),-mtune=core-avx2,) -mfpmath=sse
SANITY_FLAGS := -fwrapv -fno-strict-aliasing
COMMON_FLAGS := $(OPTIMIZE_FLAGS) $(SANITY_FLAGS)
# Use $(call QUOTE,$(VAR)) to flatten a list to a single element (for feeding to a shell)
@ -577,7 +579,7 @@ lsteamclient: lsteamclient32 lsteamclient64
lsteamclient64: SHELL = $(CONTAINER_SHELL64)
lsteamclient64: $(LSTEAMCLIENT_CONFIGURE_FILES64) | $(WINE_BUILDTOOLS64) $(filter $(MAKECMDGOALS),wine64 wine32 wine)
+env PATH="$(abspath $(TOOLS_DIR64))/bin:$(PATH)" CXXFLAGS="-Wno-attributes $(OPTIMIZE_FLAGS) -g" CFLAGS="$(OPTIMIZE_FLAGS) -g" \
+env PATH="$(abspath $(TOOLS_DIR64))/bin:$(PATH)" CXXFLAGS="-Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="$(COMMON_FLAGS) -g" \
$(MAKE) -C $(LSTEAMCLIENT_OBJ64)
[ x"$(STRIP)" = x ] || $(STRIP) $(LSTEAMCLIENT_OBJ64)/lsteamclient.dll.so
mkdir -pv $(DST_DIR)/lib64/wine/
@ -585,7 +587,7 @@ lsteamclient64: $(LSTEAMCLIENT_CONFIGURE_FILES64) | $(WINE_BUILDTOOLS64) $(filte
lsteamclient32: SHELL = $(CONTAINER_SHELL32)
lsteamclient32: $(LSTEAMCLIENT_CONFIGURE_FILES32) | $(WINE_BUILDTOOLS32) $(filter $(MAKECMDGOALS),wine64 wine32 wine)
+env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes $(OPTIMIZE_FLAGS) -g" CFLAGS="-m32 $(OPTIMIZE_FLAGS) -g" \
+env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" \
$(MAKE) -C $(LSTEAMCLIENT_OBJ32)
[ x"$(STRIP)" = x ] || $(STRIP) $(LSTEAMCLIENT_OBJ32)/lsteamclient.dll.so
mkdir -pv $(DST_DIR)/lib/wine/
@ -621,7 +623,7 @@ $(WINE_CONFIGURE_FILES64): SHELL = $(CONTAINER_SHELL64)
$(WINE_CONFIGURE_FILES64): $(MAKEFILE_DEP) | $(WINE_OBJ64)
cd $(dir $@) && \
STRIP=$(STRIP_QUOTED) \
CFLAGS=-I$(abspath $(TOOLS_DIR64))"/include -g $(OPTIMIZE_FLAGS)" \
CFLAGS=-I$(abspath $(TOOLS_DIR64))"/include -g $(COMMON_FLAGS)" \
LDFLAGS=-L$(abspath $(TOOLS_DIR64))/lib \
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR64))/lib/pkgconfig \
CC=$(CC_QUOTED) \
@ -636,7 +638,7 @@ $(WINE_CONFIGURE_FILES32): SHELL = $(CONTAINER_SHELL32)
$(WINE_CONFIGURE_FILES32): $(MAKEFILE_DEP) | $(WINE_OBJ32) $(WINE_ORDER_DEPS32)
cd $(dir $@) && \
STRIP=$(STRIP_QUOTED) \
CFLAGS=-I$(abspath $(TOOLS_DIR32))"/include -g $(OPTIMIZE_FLAGS)" \
CFLAGS=-I$(abspath $(TOOLS_DIR32))"/include -g $(COMMON_FLAGS)" \
LDFLAGS=-L$(abspath $(TOOLS_DIR32))/lib \
PKG_CONFIG_PATH=$(abspath $(TOOLS_DIR32))/lib/pkgconfig \
CC=$(CC_QUOTED) \
@ -763,7 +765,7 @@ vrclient: vrclient32 vrclient64
vrclient64: SHELL = $(CONTAINER_SHELL64)
vrclient64: $(VRCLIENT_CONFIGURE_FILES64) | $(WINE_BUILDTOOLS64) $(filter $(MAKECMDGOALS),wine64 wine32 wine)
+env CXXFLAGS="-Wno-attributes -std=c++0x $(OPTIMIZE_FLAGS) -g" CFLAGS="$(OPTIMIZE_FLAGS) -g" PATH="$(abspath $(TOOLS_DIR64))/bin:$(PATH)" \
+env CXXFLAGS="-Wno-attributes -std=c++0x $(COMMON_FLAGS) -g" CFLAGS="$(COMMON_FLAGS) -g" PATH="$(abspath $(TOOLS_DIR64))/bin:$(PATH)" \
$(MAKE) -C $(VRCLIENT_OBJ64)
cd $(VRCLIENT_OBJ64) && \
PATH=$(abspath $(TOOLS_DIR64))/bin:$(PATH) \
@ -775,7 +777,7 @@ vrclient64: $(VRCLIENT_CONFIGURE_FILES64) | $(WINE_BUILDTOOLS64) $(filter $(MAKE
vrclient32: SHELL = $(CONTAINER_SHELL32)
vrclient32: $(VRCLIENT_CONFIGURE_FILES32) | $(WINE_BUILDTOOLS32) $(filter $(MAKECMDGOALS),wine64 wine32 wine)
+env LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes -std=c++0x $(OPTIMIZE_FLAGS) -g" CFLAGS="-m32 $(OPTIMIZE_FLAGS) -g" PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" \
+env LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes -std=c++0x $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" \
$(MAKE) -C $(VRCLIENT_OBJ32)
cd $(VRCLIENT_OBJ32) && \
PATH=$(abspath $(TOOLS_DIR32))/bin:$(PATH) \