gcc47: Disable use of -flto.
authorzrj <rimvydas.jasinskas@gmail.com>
Thu, 13 Oct 2016 07:44:09 +0000 (10:44 +0300)
committerzrj <zrj@dragonflybsd.org>
Tue, 25 Oct 2016 16:31:38 +0000 (19:31 +0300)
There are various issues when this older gcc gets compiled with LTO.
It would need same patches as gcc50 for libgcc* libstdc++.* and
given that linking stage in gcc47 is ordered(serial) it would blow up
buildworld time almost by third on big -jN.

gnu/lib/gcc47/Makefile.inc
gnu/usr.bin/cc47/Makefile.inc

index d4e53c7..4f558e5 100644 (file)
@@ -24,6 +24,12 @@ TARGET_SHLIBDIR=     ${LIBDIR}/${CCVER}
 
 LIBSUPCPP=             ${.OBJDIR}/../libsupc++/libsupc++.a
 
+# for now do not let the use of -flto
+.if ${CFLAGS:M-flto}
+CFLAGS+=       -fno-lto
+LDFLAGS+=      -flto
+.endif
+
 CFLAGS+=       -I${CCDIR}/cc_prep
 CFLAGS+=       -I${CCDIR}/cc_prep/config
 CFLAGS+=       -I${OCCDIR}/cc_prep
index b5f7e58..2180789 100644 (file)
@@ -21,6 +21,12 @@ STOPDIR=     ${.CURDIR}/${TOP_PREFIX}..
 
 TOOLDIR=       ${OTOPDIR}/cc_tools/tools
 
+# for now do not let the use of -flto
+.if ${CFLAGS:M-flto}
+CFLAGS+=       -fno-lto
+LDFLAGS+=      -flto
+.endif
+
 .if defined(LOCAL_CONFIG)
 CFLAGS+=       -I${.CURDIR}
 CFLAGS+=       -I${.OBJDIR}