diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-05-21 23:00:41 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-05-21 23:00:41 +0200 |
commit | bf403f774d29c2ed7babe47872b0166378854994 (patch) | |
tree | f9ab2795e280ce00e1a8d663368f8e469d52fbd4 /crawl-ref/source/Makefile | |
parent | 24b9305ab63cc8232448af9a074ac6952fdf1fa2 (diff) | |
download | crawl-ref-bf403f774d29c2ed7babe47872b0166378854994.tar.gz crawl-ref-bf403f774d29c2ed7babe47872b0166378854994.zip |
Fix $(GXX) being used before it is defined in some cases.
Even though late-bound variables are supposed to be substituted only at
use time, this is not always the case when conditionals are around.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r-- | crawl-ref/source/Makefile | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 1a2cdac6c1..5c37657e34 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -101,27 +101,6 @@ include Makefile.obj # -ifdef USE_ICC -# If you have a Core 2 processor, this _really_ makes things fly: -#CFOPTIMIZE := -O2 -parallel -xT - -# Optionally enable the 'ipo' feature, to facilitate inlining -# across object file bounds. -#CFOPTIMIZE_L := -ipo - -# Some very good optimization flags. - CFOPTIMIZE := -O2 -parallel -else - - 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) CFWARN := -Wall -Wformat-security CFWARN_L := -Wundef @@ -533,6 +512,27 @@ CFOPTIMIZE += -march=native endif endif +ifdef USE_ICC +# If you have a Core 2 processor, this _really_ makes things fly: +#CFOPTIMIZE := -O2 -parallel -xT + +# Optionally enable the 'ipo' feature, to facilitate inlining +# across object file bounds. +#CFOPTIMIZE_L := -ipo + +# Some very good optimization flags. + CFOPTIMIZE := -O2 -parallel +else + + 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 + ifdef LTO CFOPTIMIZE += -flto=jobserver -fwhole-program # FIXME: this check is fragile, and should be done via a full compile test. |