From 5f3000522a8065940f8e08d7d4979e36cb5b3911 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 11 Mar 2012 07:11:59 +0000 Subject: [PATCH] - Makefiles: fix handling of "-Wstrict-overflow=1" to fix Leopard 10.5/Xcode 3.1.4 compatibility - osxbuild.sh: explicitly specify "ARCH='-arch x86_64'" for 64-bit builds git-svn-id: https://svn.eduke32.com/eduke32@2444 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 12 +----------- polymer/eduke32/build/Makefile.shared | 5 +++-- polymer/eduke32/osxbuild.sh | 4 ++-- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 18054564a..81ca7abff 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -147,20 +147,10 @@ else W_NO_UNUSED_RESULT := endif -W_STRICT_OVERFLOW := -Wstrict-overflow=1 -ifeq (3,$(GCC_MAJOR)) - W_STRICT_OVERFLOW := -endif -ifeq ($(PLATFORM),DARWIN) - ifeq (1,$(DARWIN9)) - W_STRICT_OVERFLOW := - endif -endif - BASECFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \ -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \ $(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH) \ - -Wextra $(W_STRICT_OVERFLOW) #-Wwrite-strings -Waddress -Wlogical-op + -Wextra #-Wwrite-strings -Waddress -Wlogical-op ifeq ($(CC),clang) BASECFLAGS+= -Wno-unused-value -Wno-parentheses endif diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index e3cb99be8..0a9c664c1 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -30,9 +30,9 @@ ifeq (4,$(GCC_MAJOR)) M_TUNE_GENERIC := -mtune=generic M_STACKREALIGN := -mstackrealign L_SSP := -lssp + W_STRICT_OVERFLOW := -Wstrict-overflow=1 endif - ifndef ARCH ifeq ($(findstring i686, $(shell uname -m)), i686) ARCH=-march=pentium3 $(M_TUNE_GENERIC) -mmmx # -msse2 -mfpmath=sse,387 -malign-double $(M_STACKREALIGN) @@ -109,6 +109,7 @@ ifeq ($(PLATFORM),DARWIN) ifeq (1,$(DARWIN9)) BUILDCFLAGS += -DDARWIN9 F_JUMP_TABLES := + W_STRICT_OVERFLOW := endif ifeq (1,$(BUILD32_ON_64)) @@ -207,7 +208,7 @@ else endif -BUILDCFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 +BUILDCFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 $(W_STRICT_OVERFLOW) ifneq (0,$(USE_OPENGL)) BUILDCFLAGS+= -DUSE_OPENGL diff --git a/polymer/eduke32/osxbuild.sh b/polymer/eduke32/osxbuild.sh index 68d9f2479..4036b962f 100755 --- a/polymer/eduke32/osxbuild.sh +++ b/polymer/eduke32/osxbuild.sh @@ -81,7 +81,7 @@ if [ $onlyzip -eq 0 ]; then if [ $build64 == 1 ]; then if [ $builddebug == 1 ]; then make veryclean - OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3 + ARCH='-arch x86_64' OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3 if [ $? ]; then echo x86_64 debug build succeeded. cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.debug.x64 @@ -92,7 +92,7 @@ if [ $onlyzip -eq 0 ]; then fi make veryclean - OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3 + ARCH='-arch x86_64' OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3 if [ $? ]; then echo x86_64 release build succeeded. cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.x64