Revert "Fix link time optimization gcc option"
authorMarco Costalba <mcostalba@gmail.com>
Mon, 23 Jan 2012 19:47:20 +0000 (20:47 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Jan 2012 19:52:21 +0000 (20:52 +0100)
It seems we need to pass the full optimization
flags to the linker otherwise we end up in a
slow compile:

http://lists.debian.org/debian-devel/2011/06/msg00181.html

Regression reported by Benigno Hernandez.

No functional change.

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

index 623c20b..b4ecee3 100644 (file)
@@ -319,7 +319,7 @@ ifeq ($(comp),gcc)
        GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.`
        ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \)))
                CXXFLAGS += -flto
-               LDFLAGS += -flto
+               LDFLAGS += $(CXXFLAGS)
        endif
 endif