diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-05-21 14:32:02 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-05-21 14:35:42 +0200 |
commit | b71738abcb5dd38723c93eba064e5fbd2fad07a8 (patch) | |
tree | 953bd373ca28bf5aae8bb098d7b31482c24e7160 /crawl-ref/source/Makefile | |
parent | d0c38dc758706b962cdb7cc2ada6a9b46fda30d5 (diff) | |
download | crawl-ref-b71738abcb5dd38723c93eba064e5fbd2fad07a8.tar.gz crawl-ref-b71738abcb5dd38723c93eba064e5fbd2fad07a8.zip |
Default to -O1 on gcc-4.2.
Untested, as I have no access to a Mac.
I also know no reliable way to catch all Mac build environments, so this
hurts innocent fixed versions of gcc-4.2 elsewhere, but I don't think
anyone cares.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r-- | crawl-ref/source/Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 296fe0fa30..1a2cdac6c1 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -102,7 +102,6 @@ include Makefile.obj ifdef USE_ICC - # If you have a Core 2 processor, this _really_ makes things fly: #CFOPTIMIZE := -O2 -parallel -xT @@ -111,12 +110,16 @@ ifdef USE_ICC #CFOPTIMIZE_L := -ipo # Some very good optimization flags. -CFOPTIMIZE := -O2 -parallel - + CFOPTIMIZE := -O2 -parallel else -CFOPTIMIZE := -O2 - + ifneq (,$(shell $(GXX) --version|grep 'g++.*4\.2\.')) + # OS X uses a buggy ancient version of gcc without fixes from even + # subsequent point releases of 4.2. + CFOPTIMIZE := -O1 + else + CFOPTIMIZE := -O2 + endif endif # USE_ICC CFOTHERS := -pipe $(EXTERNAL_FLAGS) |