From patchwork Sat Jul 11 22:44:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Neukirchen X-Patchwork-Id: 494043 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0558A1402D6 for ; Sun, 12 Jul 2015 08:44:52 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9B3BA2802BA; Sun, 12 Jul 2015 00:44:24 +0200 (CEST) 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_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 74CC9280158 for ; Sun, 12 Jul 2015 00:44:19 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mout.web.de (mout.web.de [212.227.15.14]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 12 Jul 2015 00:44:19 +0200 (CEST) Received: from [192.168.3.157] ([91.64.206.38]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0M1UUr-1YyJ0p3Hhp-00tVAL for ; Sun, 12 Jul 2015 00:44:38 +0200 To: OpenWrt Development List From: Dirk Neukirchen Message-ID: <55A19C59.1000407@web.de> Date: Sun, 12 Jul 2015 00:44:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:m3OH1sxrQImWD+PfPTLDlYMthgHPAkEQa4hDtTC49fKPiF1BGyV b9J0sewz47N+0FvdjHxmw9qPQtaRiHwVjpyeND2rCvBn1NizB+YCw0RgsIKgeJdEy8T9zQI S6XDGl5k1sAbRHVjuB5xUEuitw/jqjXntVWEDr1IwB4w9bc4v3gelkErCuHOA+N7fMd+5Ud XZCR74OwRQltdoy798fVQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:hI4Vy/ZG8h4=:vMB2JOLnLmnD3LBssLAEMD 658wROwduThRK74CEIF17ofE3+oGWjrUIJxnsTPdH2S0OGCZcxjCqaiNY+aDjdapeE11uffcy c9CxuKacPWrab6p7gQBpUjh0r+UaldsKOrwKtH+6bnWJG4UK01uUqKCU/dIKWB5N+Fxee0mCY +ObZczzfn21q37ssUxEiIuZO+aCZnr0RzQH1ej1Jgrl1zQVU8K4GceOceE0qujYjv/PN+IHAd OffHn8Z1U0WEaZOogd7wWRzri22z2+B+5DnhlUdTR75n2AyIjxg2SKTqNYl08xq/9m3z0Pq5V 6hbPx4GlJ1ENWnfZWiVQ4Zxmz+FZsxLGKr3GPhr7yZIawkK2jTskJkN+JkXad6SWhNFZ5Y35j JL4sjfdjfUXiBa5uggk6slreTLGnp5sY90JTM8dlNbP9w6pKKid0ulSi82EAxtM94wQizEL4c w1puHwzsaAcsfMJ5Iniud92ORdBbnDruWfMkW76oltS4EdSwWYYhziejEcnyZ/p+wvILfMMAE dJ518xWPbx0sqJp3xYFTWf9qIfBxZ+jyGR9lvN+DLPUPCVMs9sdEh9ep9Da+EmazUTvrVl1Wr psSn6cqzF66/6tFBYtmCFqrCMnTMFmjr2GJCnKEJqpXKDTIPGAe5VMAA1wNpVL+WIGe7I7nES BFl7Ug+1zRosIbovurEcUKrdXvtziTvBUmwLKEjI/nyR40m0U1kS/ws7adOI0MTDOB8g= Subject: [OpenWrt-Devel] [PATCH] toolchain: fix gcc 4.6 build with gcc5 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: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" build error: cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p' cfns.gperf:26:14: error: but not here observed on Arch Linux affected versions gcc 4.6, gcc 4.7 reported & fixed in DragonFlyBSD issue #136 https://github.com/DragonFlyBSD/DPorts/issues/136 Signed-off-by: Dirk Neukirchen --- .../gcc/patches/4.6-linaro/010-documentation.patch | 2 +- .../gcc/patches/4.6-linaro/910-mbsd_multi.patch | 6 +++--- .../4.6-linaro/920-specs_nonfatal_getenv.patch | 2 +- toolchain/gcc/patches/4.6-linaro/999-coldfire.patch | 2 +- .../patches/4.6-linaro/999-gcc5-gcc_cp_cfns_h.patch | 21 +++++++++++++++++++++ 5 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 toolchain/gcc/patches/4.6-linaro/999-gcc5-gcc_cp_cfns_h.patch diff --git a/toolchain/gcc/patches/4.6-linaro/010-documentation.patch b/toolchain/gcc/patches/4.6-linaro/010-documentation.patch index 25773a3..46178da 100644 --- a/toolchain/gcc/patches/4.6-linaro/010-documentation.patch +++ b/toolchain/gcc/patches/4.6-linaro/010-documentation.patch @@ -1,6 +1,6 @@ --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -4251,18 +4251,10 @@ +@@ -4267,18 +4267,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) doc/gccint.info: $(TEXI_GCCINT_FILES) doc/cppinternals.info: $(TEXI_CPPINT_FILES) diff --git a/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch b/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch index 51bbc7f..32b408a 100644 --- a/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch +++ b/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch @@ -125,7 +125,7 @@ Assume normal C execution environment --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -520,6 +520,10 @@ Werror= +@@ -523,6 +523,10 @@ Werror= Common Joined Treat specified warning as error @@ -136,7 +136,7 @@ Wextra Common Var(extra_warnings) Warning Print extra (possibly unwanted) warnings -@@ -1156,6 +1160,9 @@ fguess-branch-probability +@@ -1159,6 +1163,9 @@ fguess-branch-probability Common Report Var(flag_guess_branch_prob) Optimization Enable guessing of branch probabilities @@ -232,7 +232,7 @@ @item -Wstack-protector @opindex Wstack-protector @opindex Wno-stack-protector -@@ -6317,7 +6333,7 @@ so, the first branch is redirected to ei +@@ -6322,7 +6338,7 @@ so, the first branch is redirected to ei second branch or a point immediately following it, depending on whether the condition is known to be true or false. diff --git a/toolchain/gcc/patches/4.6-linaro/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/4.6-linaro/920-specs_nonfatal_getenv.patch index 5055ae8..0b241fa 100644 --- a/toolchain/gcc/patches/4.6-linaro/920-specs_nonfatal_getenv.patch +++ b/toolchain/gcc/patches/4.6-linaro/920-specs_nonfatal_getenv.patch @@ -1,6 +1,6 @@ --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -7772,7 +7772,10 @@ getenv_spec_function (int argc, const ch +@@ -7830,7 +7830,10 @@ getenv_spec_function (int argc, const ch value = getenv (argv[0]); if (!value) diff --git a/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch b/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch index 0913f34..e014386 100644 --- a/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch +++ b/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch @@ -1,6 +1,6 @@ --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -1805,7 +1805,7 @@ m68k-*-linux*) # Motorola m68k's runnin +@@ -1809,7 +1809,7 @@ m68k-*-linux*) # Motorola m68k's runnin default_m68k_cpu=68020 default_cf_cpu=5475 with_arch=${with_arch:-m68k} diff --git a/toolchain/gcc/patches/4.6-linaro/999-gcc5-gcc_cp_cfns_h.patch b/toolchain/gcc/patches/4.6-linaro/999-gcc5-gcc_cp_cfns_h.patch new file mode 100644 index 0000000..7ab0d4c --- /dev/null +++ b/toolchain/gcc/patches/4.6-linaro/999-gcc5-gcc_cp_cfns_h.patch @@ -0,0 +1,21 @@ +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ +@@ -96,7 +99,7 @@ hash (register const char *str, register + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400 + }; +- register int hval = len; ++ register int hval = (int)len; + + switch (hval) + {