Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 2/2] ngrep: fix static linking issue with libpcre
@ 2013-11-02 15:51 Romain Naour
  2013-11-04 21:09 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2013-11-02 15:51 UTC (permalink / raw)
  To: buildroot

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 <romain.naour@openwide.fr>
---
 package/ngrep/ngrep-0003-fix-static-link.patch | 22 ++++++++++++++++++++++
 package/ngrep/ngrep.mk                         |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 package/ngrep/ngrep-0003-fix-static-link.patch

diff --git a/package/ngrep/ngrep-0003-fix-static-link.patch b/package/ngrep/ngrep-0003-fix-static-link.patch
new file mode 100644
index 0000000..6d70778
--- /dev/null
+++ b/package/ngrep/ngrep-0003-fix-static-link.patch
@@ -0,0 +1,22 @@
+fix static link
+Libraries must be placed before object files.
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 2ae4506..761d7d9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@ CFLAGS=@CFLAGS@ -D at OS@ @DEFS@ @EXTRA_DEFINES@
+ INCLUDES=-I at srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@
+ 
+ LDFLAGS=@LDFLAGS@ @PCAP_LINK@
+-LIBS=-lpcap @EXTRA_LIBS@ 
++LIBS=@LIBS@ @EXTRA_LIBS@
+ 
+ STRIPFLAG=@STRIPFLAG@
+ 
+-- 
+1.8.1.4
+
diff --git a/package/ngrep/ngrep.mk b/package/ngrep/ngrep.mk
index 6a9b42f..0bb5d7e 100644
--- a/package/ngrep/ngrep.mk
+++ b/package/ngrep/ngrep.mk
@@ -10,7 +10,7 @@ NGREP_SITE = http://downloads.sourceforge.net/project/ngrep/ngrep/$(NGREP_VERSIO
 NGREP_LICENSE = BSD-4c-like
 NGREP_LICENSE_FILES = LICENSE.txt
 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 \
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v3 2/2] ngrep: fix static linking issue with libpcre
  2013-11-02 15:51 [Buildroot] [PATCH v3 2/2] ngrep: fix static linking issue with libpcre Romain Naour
@ 2013-11-04 21:09 ` Peter Korsgaard
  2013-11-04 23:05   ` Romain Naour
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2013-11-04 21:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Romain" == Romain Naour <romain.naour@openwide.fr> writes:

 > 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 <romain.naour@openwide.fr>
 > ---
 >  package/ngrep/ngrep-0003-fix-static-link.patch | 22 ++++++++++++++++++++++
 >  package/ngrep/ngrep.mk                         |  2 +-
 >  2 files changed, 23 insertions(+), 1 deletion(-)
 >  create mode 100644 package/ngrep/ngrep-0003-fix-static-link.patch

 > diff --git a/package/ngrep/ngrep-0003-fix-static-link.patch b/package/ngrep/ngrep-0003-fix-static-link.patch
 > new file mode 100644
 > index 0000000..6d70778
 > --- /dev/null
 > +++ b/package/ngrep/ngrep-0003-fix-static-link.patch
 > @@ -0,0 +1,22 @@
 > +fix static link
 > +Libraries must be placed before object files.

I guess you mean AFTER.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v3 2/2] ngrep: fix static linking issue with libpcre
  2013-11-04 21:09 ` Peter Korsgaard
@ 2013-11-04 23:05   ` Romain Naour
  0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour @ 2013-11-04 23:05 UTC (permalink / raw)
  To: buildroot

Le 04/11/2013 22:09, Peter Korsgaard a ?crit :
>>>>>> "Romain" == Romain Naour <romain.naour@openwide.fr> writes:
> 
>  > 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 <romain.naour@openwide.fr>
>  > ---
>  >  package/ngrep/ngrep-0003-fix-static-link.patch | 22 ++++++++++++++++++++++
>  >  package/ngrep/ngrep.mk                         |  2 +-
>  >  2 files changed, 23 insertions(+), 1 deletion(-)
>  >  create mode 100644 package/ngrep/ngrep-0003-fix-static-link.patch
> 
>  > diff --git a/package/ngrep/ngrep-0003-fix-static-link.patch b/package/ngrep/ngrep-0003-fix-static-link.patch
>  > new file mode 100644
>  > index 0000000..6d70778
>  > --- /dev/null
>  > +++ b/package/ngrep/ngrep-0003-fix-static-link.patch
>  > @@ -0,0 +1,22 @@
>  > +fix static link
>  > +Libraries must be placed before object files.
> 
> I guess you mean AFTER.
> 

Yes, copy and past error...
Thanks

Romain

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-04 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-02 15:51 [Buildroot] [PATCH v3 2/2] ngrep: fix static linking issue with libpcre Romain Naour
2013-11-04 21:09 ` Peter Korsgaard
2013-11-04 23:05   ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox