From patchwork Wed Jan 10 04:15:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 857931 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zGbKd0Xtcz9s8J for ; Wed, 10 Jan 2018 15:16:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AD3E789EF7; Wed, 10 Jan 2018 04:16:01 +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 yLvyaCG7B7fI; Wed, 10 Jan 2018 04:16:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7C69B89EF2; Wed, 10 Jan 2018 04:16:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 81B701CE60E for ; Wed, 10 Jan 2018 04:15:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7DB0E89EE6 for ; Wed, 10 Jan 2018 04:15:54 +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 hAGD6UOXJk7E for ; Wed, 10 Jan 2018 04:15:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs04.rockwellcollins.com (da1vs04.rockwellcollins.com [205.175.227.52]) by hemlock.osuosl.org (Postfix) with ESMTPS id 92DFD89EE0 for ; Wed, 10 Jan 2018 04:15:53 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs04.rockwellcollins.com with ESMTP; 09 Jan 2018 22:15:53 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id C82E76000B; Tue, 9 Jan 2018 22:15:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Tue, 9 Jan 2018 22:15:39 -0600 Message-Id: <1515557739-6027-8-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515557739-6027-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1515557739-6027-1-git-send-email-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v3 8/8] iptables: correct linker flag seq X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 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" This patch will correct the sequence of -pie and -shared options. When used together, -pie should be provided to the linker before -shared. Upstream: https://marc.info/?l=netfilter-devel&m=151193652302080&w=2 Signed-off-by: Matthew Weber --- ...les-patch-to-correct-linker-flag-sequence.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/iptables/0002-iptables-patch-to-correct-linker-flag-sequence.patch diff --git a/package/iptables/0002-iptables-patch-to-correct-linker-flag-sequence.patch b/package/iptables/0002-iptables-patch-to-correct-linker-flag-sequence.patch new file mode 100644 index 0000000..b65c138 --- /dev/null +++ b/package/iptables/0002-iptables-patch-to-correct-linker-flag-sequence.patch @@ -0,0 +1,48 @@ +From 83a8109fa92c8c3a5969df6dae6cc75746ec6380 Mon Sep 17 00:00:00 2001 +From: Yogesh Prasad +Date: Mon, 2 Oct 2017 14:34:14 -0500 +Subject: [PATCH 1/1] iptables: patch to correct linker flag sequence + +Description +This patch will correct the sequence of -pie and -shared options. + When used together, -pie should be provided to the linker before + -shared. If -pie is provided after -shared, the linker throws an + error shown below as example. + +------------------------------------------------------------------------- +/host/lib/gcc/powerpc-buildroot-linux-gnu/6.4.0/../../../.. +/powerpc-buildroot-linux-gnu/bin/ld: BFD (GNU Binutils) 2.28.1 + assertion fail elf32-ppc.c:8923 +collect2: error: ld returned 1 exit status + + ./libxt_SYNPROXY.man +make[4]: *** [libxt_TCPOPTSTRIP.so] Error 1 + + ./libip6t_mh.man +/host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4): + undefined reference to `main' +/host/lib/gcc/powerpc-buildroot-linux-gnu + ./libxt_TCPMSS.man +/6.4.0/../../../../powerpc-buildroot-linux-gnu/bin/ld: + BFD (GNU Binutils) 2.28.1 assertion fail elf32-ppc.c:8923 +collect2: error: ld returned 1 exit status +------------------------------------------------------------------------- + +Signed-off-by: Yogesh Prasad +--- + extensions/GNUmakefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in +index b7a8a83..bee666e 100644 +--- a/extensions/GNUmakefile.in ++++ b/extensions/GNUmakefile.in +@@ -101,7 +101,7 @@ init%.o: init%.c + # Shared libraries + # + lib%.so: lib%.oo +- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} ${LDFLAGS} -shared -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD}; + + lib%.oo: ${srcdir}/lib%.c + ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<; +-- +1.9.1 +