]> git.sesse.net Git - stockfish/commitdiff
Fix gcc name used in Link Time Optimization
authorMarco Costalba <mcostalba@gmail.com>
Sun, 15 Jan 2012 11:50:09 +0000 (12:50 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 15 Jan 2012 11:50:09 +0000 (12:50 +0100)
Use $(CXX) instead of assuming compiler name is 'gcc'

Spotted by Louis Zulli.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile

index 56d058f92bd6d252a68522b6f5828588dbd5c010..34a16c51cb50259a6a98ccafb5a78c3d90706c0b 100644 (file)
@@ -315,8 +315,8 @@ endif
 ### This is a mix of compile and link time options because the lto link phase
 ### needs access to the optimization flags.
 ifeq ($(comp),gcc)
 ### This is a mix of compile and link time options because the lto link phase
 ### needs access to the optimization flags.
 ifeq ($(comp),gcc)
-       GCC_MAJOR := `gcc -dumpversion | cut -f1 -d.`
-       GCC_MINOR := `gcc -dumpversion | cut -f2 -d.`
+       GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.`
+       GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
        ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS)
        ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS)