From patchwork Wed Oct 9 21:54:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 282081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 0D2132C00F8 for ; Thu, 10 Oct 2013 08:54:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 167038BE27; Wed, 9 Oct 2013 21:54:50 +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 RKl4E3o38-c5; Wed, 9 Oct 2013 21:54:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D2ED38BB83; Wed, 9 Oct 2013 21:54:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B54A61BFA75 for ; Wed, 9 Oct 2013 21:54:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B19758BB83 for ; Wed, 9 Oct 2013 21:54:45 +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 La9ROoJOPq1Q for ; Wed, 9 Oct 2013 21:54:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from zimbra3.corp.accelance.fr (zimbra3.corp.accelance.fr [213.162.49.233]) by whitealder.osuosl.org (Postfix) with ESMTP id 9DD158BE31 for ; Wed, 9 Oct 2013 21:54:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra3.corp.accelance.fr (Postfix) with ESMTP id B96526A5D4 for ; Wed, 9 Oct 2013 23:54:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra3.corp.accelance.fr Received: from zimbra3.corp.accelance.fr ([127.0.0.1]) by localhost (zimbra3.corp.accelance.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ASupWrtp6y9L for ; Wed, 9 Oct 2013 23:54:23 +0200 (CEST) Received: from [192.168.0.12] (gam75-1-81-57-22-125.fbx.proxad.net [81.57.22.125]) by zimbra3.corp.accelance.fr (Postfix) with ESMTPSA id 1346D6A5D2 for ; Wed, 9 Oct 2013 23:54:23 +0200 (CEST) Message-ID: <5255D08E.3000307@openwide.fr> Date: Wed, 09 Oct 2013 23:54:22 +0200 From: Romain Naour User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: buildroot Subject: [Buildroot] [PATCH v2 1/1] ngrep: fix static linking issue with libpcre X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Adding -lpcre in LDFLAGS place the library before object files: gcc ... -lpcre -L .../sysroot/usr/lib -s -o ngrep ngrep.o -lpcap Makefile.in is patched to use @LIBS@ for adding -lpcre in the right place. Fixes: http://autobuild.buildroot.net/results/684/684a3bed28d13ef5e5156257aade3b9aff32f180 Signed-off-by: Romain Naour --- package/ngrep/ngrep-1.45-Makefile.in.patch | 23 +++++++++++++++++++++++ package/ngrep/ngrep.mk | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 package/ngrep/ngrep-1.45-Makefile.in.patch diff --git a/package/ngrep/ngrep-1.45-Makefile.in.patch b/package/ngrep/ngrep-1.45-Makefile.in.patch new file mode 100644 index 0000000..698e001 --- /dev/null +++ b/package/ngrep/ngrep-1.45-Makefile.in.patch @@ -0,0 +1,23 @@ +Use LIBS for adding libraries. + +Signed-off-by: Romain Naour +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 2ae4506..3eefc0a 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,7 +11,7 @@ CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ + INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + LDFLAGS=@LDFLAGS@ @PCAP_LINK@ +-LIBS=-lpcap @EXTRA_LIBS@ ++LIBS=@LIBS@ @EXTRA_LIBS@ + + STRIPFLAG=@STRIPFLAG@ + +-- +1.8.4 + diff --git a/package/ngrep/ngrep.mk b/package/ngrep/ngrep.mk index 99b8f46..0dc6a36 100644 --- a/package/ngrep/ngrep.mk +++ b/package/ngrep/ngrep.mk @@ -8,7 +8,7 @@ NGREP_VERSION = 1.45 NGREP_SOURCE = ngrep-$(NGREP_VERSION).tar.bz2 NGREP_SITE = http://downloads.sourceforge.net/project/ngrep/ngrep/$(NGREP_VERSION) NGREP_INSTALL_STAGING = YES -NGREP_CONF_ENV = LDFLAGS="-lpcre" +NGREP_CONF_ENV = LIBS="-lpcre" NGREP_CONF_OPT = \ --with-pcap-includes=$(STAGING_DIR)/usr/include \ --enable-pcre \