From patchwork Wed Jan 10 04:15:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 857935 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zGbKq1d2hz9s8J for ; Wed, 10 Jan 2018 15:16:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2B7E7896F8; Wed, 10 Jan 2018 04:16:12 +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 c7HJcAkwxHYC; Wed, 10 Jan 2018 04:16:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B966A896B3; Wed, 10 Jan 2018 04:16:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id EDFF31C4111 for ; Wed, 10 Jan 2018 04:15:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EAE76888EB for ; Wed, 10 Jan 2018 04:15:55 +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 DxeaATBbGuRx for ; Wed, 10 Jan 2018 04:15:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (smtpimr.rockwellcollins.com [205.175.225.241]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 07A80888DA for ; Wed, 10 Jan 2018 04:15:53 +0000 (UTC) Received: from ofwgwc03.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.225.12]) by secvs02.rockwellcollins.com with ESMTP; 09 Jan 2018 22:15:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 9E2516021E; Tue, 9 Jan 2018 22:15:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Tue, 9 Jan 2018 22:15:38 -0600 Message-Id: <1515557739-6027-7-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 7/8] libpcap: 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://github.com/the-tcpdump-group/libpcap/commit/800fff521b3a90300d03af880b4626ede13c57bd Signed-off-by: Matthew Weber --- ...cap-patch-to-correct-linker-flag-sequence.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/libpcap/0001-libpcap-patch-to-correct-linker-flag-sequence.patch diff --git a/package/libpcap/0001-libpcap-patch-to-correct-linker-flag-sequence.patch b/package/libpcap/0001-libpcap-patch-to-correct-linker-flag-sequence.patch new file mode 100644 index 0000000..5b1c133 --- /dev/null +++ b/package/libpcap/0001-libpcap-patch-to-correct-linker-flag-sequence.patch @@ -0,0 +1,52 @@ +From eb4806e2a4f4575889ff8ecf7eb4a473a654ec02 Mon Sep 17 00:00:00 2001 +From: Yogesh Prasad +Date: Tue, 26 Sep 2017 15:03:52 -0500 +Subject: [PATCH 1/1] libpcap: 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 + below error. +------------------------------------------------------------------------- +/host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4): + undefined reference to `main' +/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 +make[2]: *** [libpcap.so] Error 1 +make[1]: *** [/build/libpcap-1.8.1/.stamp_built] Error 2 +make: *** [_all] Error 2 +------------------------------------------------------------------------- + +Signed-off-by: Yogesh Prasad +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index e71d973..34b1097 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -371,7 +371,7 @@ libpcap.so: $(OBJ) + @rm -f $@ + VER=`cat $(srcdir)/VERSION`; \ + MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ +- @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \ ++ @V_SHLIB_CMD@ $(LDFLAGS) @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER \ + -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS) + + # +@@ -434,7 +434,7 @@ libpcap.sl: $(OBJ) + # + libpcap.shareda: $(OBJ) + @rm -f $@ shr.o +- $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS) ++ $(CC) $(LDFLAGS) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LIBS) + $(AR) rc $@ shr.o + + # +-- +1.9.1 +