From patchwork Sun Nov 9 11:56:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_K=C3=BCmmel?= X-Patchwork-Id: 408550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id F0A3E140082 for ; Sun, 9 Nov 2014 22:56:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2A1E295A5A; Sun, 9 Nov 2014 11:56:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Ig+0e2rH5rY; Sun, 9 Nov 2014 11:56:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 95E2B958C2; Sun, 9 Nov 2014 11:56:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id BA9C11C0C93 for ; Sun, 9 Nov 2014 11:56:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B7E0D958C2 for ; Sun, 9 Nov 2014 11:56:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bHcqgHxebiB7 for ; Sun, 9 Nov 2014 11:56:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by hemlock.osuosl.org (Postfix) with ESMTPS id A8CDE95508 for ; Sun, 9 Nov 2014 11:56:11 +0000 (UTC) Received: from localhost.localdomain ([78.53.75.158]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MGjL7-1XrZyD0dpx-00DYoT; Sun, 09 Nov 2014 12:56:08 +0100 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= To: buildroot@buildroot.org Date: Sun, 9 Nov 2014 12:56:01 +0100 Message-Id: <1415534161-24389-1-git-send-email-syntheticpp@gmx.net> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Provags-ID: V03:K0:WFAXCwf+rPHOCTCPSPVgg9D7eJg/LAzFY8hLwDp/G9nVnxSQQOs X33L67Xs12LCzaXmKgozfiNrwNRMCHgSDW3ssjjhKnCcbaJcxiBDXb3T/BrRkMVdTnq2gcS 318kzN3b2gKBGA+kSqbOFC98AR9zzogtaQbeGLAj7+mMjtfEVZ62pOR3j+6PmzKH+BbJTpp JtAKyQsR+PXLmSehMG7CQ== X-UI-Out-Filterresults: notjunk:1; Subject: [Buildroot] [PATCH 1/1] binutils/gcc: make it possible to use lto X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When -flto is used the compiler and binutils have to support lto. ar/ranlib needs to be called with the lto plugin, therefore use the wrappers provided by GCC: *-gcc-ar and *-gcc-ranlib. Signed-off-by: Peter Kümmel --- package/binutils/binutils.mk | 2 ++ package/gcc/gcc.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index b8dab5d..e552abc 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -48,6 +48,7 @@ BINUTILS_DISABLE_GDB_CONF_OPTS = \ BINUTILS_CONF_OPTS = --disable-multilib --disable-werror \ --host=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \ + --enable-plugins --enable-lto \ --enable-install-libiberty \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) @@ -67,6 +68,7 @@ endif HOST_BINUTILS_CONF_OPTS = --disable-multilib --disable-werror \ --target=$(GNU_TARGET_NAME) \ --disable-shared --enable-static \ + --enable-plugins --enable-lto \ --with-sysroot=$(STAGING_DIR) \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index cdd71aa..a8853f7 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -92,6 +92,8 @@ HOST_GCC_COMMON_CONF_OPTS = \ --with-gnu-ld \ --disable-libssp \ --disable-multilib \ + --enable-plugins \ + --enable-lto \ --with-gmp=$(HOST_DIR)/usr \ --with-mpfr=$(HOST_DIR)/usr