@@ -1447,13 +1447,17 @@ make_cflags_and_ldflags() {
OBJS_SUBDIR="release"
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"
if [ "$enable_profiling" == "0" ]; then
# -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible)
CFLAGS="-fomit-frame-pointer $CFLAGS"
CFLAGS="-O2 $CFLAGS"
else
OBJS_SUBDIR="debug"
# Each debug level reduces the optimization by a bit
if [ $enable_debug -ge 1 ]; then
CFLAGS="$CFLAGS -g -D_DEBUG"
@@ -1491,13 +1495,13 @@ make_cflags_and_ldflags() {
# 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"
if [ "$enable_profiling" != "0" ]; then
CFLAGS="$CFLAGS -p"
CFLAGS="$CFLAGS -pg"
LDFLAGS="$LDFLAGS -pg"
if [ "$with_threads" = "0" ]; then
CFLAGS="$CFLAGS -DNO_THREADS"