Commit 9d550696 authored by Albert Gräf's avatar Albert Gräf
Browse files

add -fno-strict-aliasing where it's needed to get rid of gcc warnings about type-punned pointers

parent 2b12535e
......@@ -374,7 +374,7 @@ boids_clean:
#------------------------------------------------------------------------------#
# BSAYLOR
bsaylor:
make -C $(externals_src)/bsaylor PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"
make -C $(externals_src)/bsaylor PD_PATH=$(pd_src) CFLAGS="$(CFLAGS) -fno-strict-aliasing"
bsaylor_install:
make -C $(externals_src)/bsaylor \
......@@ -1300,7 +1300,7 @@ moocow_clean:
#------------------------------------------------------------------------------#
# MOONLIB
moonlib:
make -C $(externals_src)/moonlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS)"
make -C $(externals_src)/moonlib PD_PATH=$(pd_src) CFLAGS="$(CFLAGS) -fno-strict-aliasing"
moonlib_install:
make -C $(externals_src)/moonlib DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
......
......@@ -78,7 +78,7 @@ if test -z "$GCC"; then
else
case $host in
*86*-linux*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O2 -fPIC"
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O2 -fno-strict-aliasing -fPIC"
LDFLAGS="-Wl,--export-dynamic -shared"
dnl we could test for bad glibc here, but don't
pd_suffix=pd_linux
......@@ -115,7 +115,7 @@ else
LIBS="-L../../../pd/src -L../../../pd/bin -L../../../pd/obj -lpd -lm -lwsock32"
;;
*-*-darwin*)
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 "
CFLAGS="$CFLAGS -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O3 -fno-strict-aliasing "
LDFLAGS=" -bundle -bundle_loader ../../../pd/bin/pd-l2ork -flat_namespace "
pd_suffix=pd_darwin
LIBS="-lc -lm"
......
......@@ -84,7 +84,7 @@ ifeq ($(UNAME),Darwin)
CXX=$(IPHONE_BASE)/g++
ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk
IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6
OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS)
LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT)
LIBS += -lc
......@@ -120,7 +120,7 @@ ifeq ($(UNAME),Linux)
EXTENSION = pd_linux
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
CFLAGS += -fPIC
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
LIBS += -lc
......@@ -133,7 +133,7 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
EXTENSION = dll
OS = cygwin
PD_PATH = $(cygpath $(PROGRAMFILES))/pd
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
CFLAGS +=
LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
LIBS += -lc -lpd
......@@ -146,7 +146,7 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
EXTENSION = dll
OS = windows
PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd)
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
CFLAGS += -mms-bitfields
LDFLAGS += -s -shared -Wl,--enable-auto-import
LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
......
......@@ -143,7 +143,7 @@ ifeq ($(UNAME),ANDROID)
NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86
CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT)
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
CFLAGS +=
LDFLAGS += -rdynamic -shared
SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared
......@@ -159,7 +159,7 @@ ifeq ($(UNAME),Linux)
SHARED_EXTENSION = so
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ALL_CFLAGS += -fPIC
ALL_LDFLAGS += -rdynamic -shared -fPIC
SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared
......@@ -175,7 +175,7 @@ ifeq ($(UNAME),GNU)
SHARED_EXTENSION = so
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ALL_CFLAGS += -fPIC
ALL_LDFLAGS += -rdynamic -shared -fPIC
SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
......@@ -191,7 +191,7 @@ ifeq ($(UNAME),GNU/kFreeBSD)
SHARED_EXTENSION = so
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ALL_CFLAGS += -fPIC
ALL_LDFLAGS += -rdynamic -shared -fPIC
SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
......@@ -206,7 +206,7 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
SHARED_EXTENSION = dll
OS = cygwin
PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ALL_CFLAGS +=
ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
......@@ -223,7 +223,7 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd)
# MinGW doesn't seem to include cc so force gcc
CC=gcc
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ALL_CFLAGS += -mms-bitfields
ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj"
SHARED_LDFLAGS += -shared
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment