From patchwork Tue Dec 9 10:46:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Szakmeister X-Patchwork-Id: 419000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2F43314009B for ; Tue, 9 Dec 2014 21:49:12 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 25C5A28C040; Tue, 9 Dec 2014 11:47:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6582D28C03E for ; Tue, 9 Dec 2014 11:47:04 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-qg0-f53.google.com (mail-qg0-f53.google.com [209.85.192.53]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 9 Dec 2014 11:47:03 +0100 (CET) Received: by mail-qg0-f53.google.com with SMTP id l89so178861qgf.12 for ; Tue, 09 Dec 2014 02:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=Nnm956ztlvLcf545gzUlNo/UpukJG1pAIUGybtzkTcA=; b=x/gsEoxD/LNjQ3Fc5LAE31dQ81xyBz8qOR1D2+mKWjKbFEjdbRKNqrey2d4LJwVb0I GtBTDuiJ95XO9/qfscp2Q6hXCXDJSmiyyBU3SWGqqza16NMRJA3Z0AswkrB65LY8sA2v o2o779ELTAjPFSamlq4sa0rki4UfOWPS7NN++R3Wbii8jVzA2Vr/nheBr7tuN3FK+DNb JO7uDIxNIIxwqZSiUpKOiQllDnXtUt/83yNI8goSkPlUTOGNgpgVATpmmfhkhKg65meU 5v+fj7VlmSJVsJKaRaMNjZmjZOImvh81/fDsU9WgCfC5g42Hu0SJxQOIlcHVUGgmBoY+ 79MA== X-Received: by 10.224.79.212 with SMTP id q20mr4206854qak.4.1418122126601; Tue, 09 Dec 2014 02:48:46 -0800 (PST) Received: from pangolin.intelesys.local (74-92-144-137-WashingtonDC.hfc.comcastbusiness.net. [74.92.144.137]) by mx.google.com with ESMTPSA id i49sm691947qge.48.2014.12.09.02.48.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Dec 2014 02:48:45 -0800 (PST) From: John Szakmeister To: openwrt-devel@lists.openwrt.org Date: Tue, 9 Dec 2014 05:46:49 -0500 Message-Id: <1418122009-5318-1-git-send-email-john@szakmeister.net> X-Mailer: git-send-email 2.1.1 Subject: [OpenWrt-Devel] [PATCH][RESEND] [tools] gcc: don't clobber stamp-bits with a symlink to itself X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Several versions of gcc have an issue in libstdc++v3 where the build may clobber stamp-bits with a link to itself. This doesn't manifest itself on all systems. On several Ubuntu systems, this doesn't appear to be a problem, but it is an issue on Fedora 16 systems. To fix the issue, we'll simply filter out stamp-bits from the symlinks to be generated. Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary there. Signed-off-by: John Szakmeister --- This is a resend of a patch I sent earlier (https://lists.openwrt.org/pipermail/openwrt-devel/2014-September/028068.html). I've updated to work with the current set of gcc toolchains. .../gcc/patches/4.6-linaro/940-no-clobber-stamp-bits.patch | 11 +++++++++++ .../gcc/patches/4.8-linaro/940-no-clobber-stamp-bits.patch | 11 +++++++++++ .../gcc/patches/4.9-linaro/940-no-clobber-stamp-bits.patch | 13 +++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 toolchain/gcc/patches/4.6-linaro/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/4.8-linaro/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/4.9-linaro/940-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches/4.6-linaro/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.6-linaro/940-no-clobber-stamp-bits.patch new file mode 100644 index 0000000..9106a4a --- /dev/null +++ b/toolchain/gcc/patches/4.6-linaro/940-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1326,7 +1326,7 @@ + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/4.8-linaro/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.8-linaro/940-no-clobber-stamp-bits.patch new file mode 100644 index 0000000..dbecef2 --- /dev/null +++ b/toolchain/gcc/patches/4.8-linaro/940-no-clobber-stamp-bits.patch @@ -0,0 +1,11 @@ +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1342,7 +1342,7 @@ + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/4.9-linaro/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/4.9-linaro/940-no-clobber-stamp-bits.patch new file mode 100644 index 0000000..f874255 --- /dev/null +++ b/toolchain/gcc/patches/4.9-linaro/940-no-clobber-stamp-bits.patch @@ -0,0 +1,13 @@ +Index: gcc-linaro-4.9-2014.10/libstdc++-v3/include/Makefile.in +=================================================================== +--- gcc-linaro-4.9-2014.10.orig/libstdc++-v3/include/Makefile.in 2013-11-16 12:44:48.000000000 -0500 ++++ gcc-linaro-4.9-2014.10/libstdc++-v3/include/Makefile.in 2014-12-02 06:23:02.236660279 -0500 +@@ -1366,7 +1366,7 @@ + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers}