mirror of https://github.com/OpenTTD/OpenTTD
(svn r21149) -Fix [FS#4210]: [OSX] Unify compiler flags with other OS and work around a compiler bug in gcc-4.0.1 which breaks graphics display in x86_64 binaries (Rubidium)
parent
13685c0210
commit
b31543aa9a
21
config.lib
21
config.lib
|
@ -1280,17 +1280,12 @@ make_cflags_and_ldflags() {
|
||||||
if [ "$enable_debug" = "0" ]; then
|
if [ "$enable_debug" = "0" ]; then
|
||||||
# No debug, add default stuff
|
# No debug, add default stuff
|
||||||
OBJS_SUBDIR="release"
|
OBJS_SUBDIR="release"
|
||||||
if [ "$os" = "OSX" ]; then
|
if [ "$os" = "MORPHOS" ]; then
|
||||||
# these compilerflags makes the app run as fast as possible without making the app unstable. It works on G3 or newer
|
CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
|
||||||
CFLAGS="-O3 -funroll-loops -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -mdynamic-no-pic $CFLAGS"
|
LDFLAGS="$LDFLAGS -noixemul"
|
||||||
else
|
|
||||||
if [ "$os" = "MORPHOS" ]; then
|
|
||||||
CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS -noixemul"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="-O2 -fomit-frame-pointer $CFLAGS"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CFLAGS="-O2 -fomit-frame-pointer $CFLAGS"
|
||||||
else
|
else
|
||||||
OBJS_SUBDIR="debug"
|
OBJS_SUBDIR="debug"
|
||||||
|
|
||||||
|
@ -1317,6 +1312,12 @@ make_cflags_and_ldflags() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
|
||||||
|
# Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization,
|
||||||
|
# wrongly optimizing ^= in loops. This disables the failing optimisation.
|
||||||
|
CFLAGS="$CFLAGS -fno-expensive-optimizations"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$enable_profiling" != "0" ]; then
|
if [ "$enable_profiling" != "0" ]; then
|
||||||
CFLAGS="$CFLAGS -p"
|
CFLAGS="$CFLAGS -p"
|
||||||
LDFLAGS="$LDFLAGS -pg"
|
LDFLAGS="$LDFLAGS -pg"
|
||||||
|
|
Loading…
Reference in New Issue