From patchwork Thu Jul 16 09:39:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Viallard X-Patchwork-Id: 496835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 763FF1402B1 for ; Fri, 17 Jul 2015 05:39:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A7444A2FEF; Thu, 16 Jul 2015 19:39:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vI02fb0powTf; Thu, 16 Jul 2015 19:39:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4BCACA3134; Thu, 16 Jul 2015 19:37:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 631BB1C2293 for ; Thu, 16 Jul 2015 09:39:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5AE3792987 for ; Thu, 16 Jul 2015 09:39:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CiokoXX+b8R9 for ; Thu, 16 Jul 2015 09:39:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-sh.infomaniak.ch (smtp-sh.infomaniak.ch [128.65.195.4]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7EEEC92970 for ; Thu, 16 Jul 2015 09:39:38 +0000 (UTC) Received: from smtp4.infomaniak.ch (smtp4.infomaniak.ch [84.16.68.92]) by smtp-sh.infomaniak.ch (8.14.5/8.14.5) with ESMTP id t6G9dZJs002276 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 Jul 2015 11:39:35 +0200 Received: from localhost.localdomain (mail.borm.ch [213.200.221.18] (may be forged)) (authenticated bits=0) by smtp4.infomaniak.ch (8.14.5/8.14.5) with ESMTP id t6G9dU9I015362 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Thu, 16 Jul 2015 11:39:35 +0200 From: Anthony Viallard To: buildroot@buildroot.org Date: Thu, 16 Jul 2015 11:39:28 +0200 Message-Id: <1437039568-22957-1-git-send-email-viallard@syscom-instruments.com> X-Mailer: git-send-email 2.1.4 X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.8 X-Antivirus-Code: 0x100000 Subject: [Buildroot] [PATCH 1/1] gcc: make sure we don't have a copy of libiberty.a in host library dir 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With old gcc version (like with 4.7.4), libiberty.a is copied to library directory and it's not the behavior we want. According to Arnout Vandecappelle, newer version of gcc have fixed the problem. But if you choose gcc 4.7.X, the problem is there. Therefore, I send this little patch which remove the bad file after the build is finished. Signed-off-by: Anthony Viallard --- package/gcc/gcc-final/gcc-final.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index 16bf4ee..2cce860 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -185,6 +185,12 @@ endef HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_USR_LIBS endif +define HOST_GCC_FINAL_RM_LIBIBERTY_A + rm -f $(HOST_DIR)/usr/lib/libiberty.a +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_RM_LIBIBERTY_A + ifeq ($(BR2_xtensa),y) HOST_GCC_FINAL_CONF_OPTS += --enable-cxx-flags="$(TARGET_ABI)" endif