[PATCH] pkgconfig: @LIB_RPATH@ should be in link flags

Lukas Slebodnik lslebodn at redhat.com
Fri Apr 4 02:54:54 MDT 2014


On (05/03/14 18:03), Lukas Slebodnik wrote:
>ehlo,
>
>After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is
>used on install. But "-Wl," will be passed to linker and should not be among
>CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place.
>    @see commit 735c1cd2da15167748e92ba6de48fdb5169db587
>
>Simple patch is attached.
>
>LS

Is there any voluteer to review patch?

It isn't very nice if you can see a lot of warnings.

  CC       src/util/child_common.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
  CC       src/util/util.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
  CC       src/util/memory.lo
  CC       src/util/server.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
  CC       src/util/signal.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
  CC       src/util/usertools.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused
  CC       src/util/backup_file.lo
cc: warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused

sh-4.2$ pkg-config --cflags tevent
-Wl,-rpath,/usr/local/lib -I/usr/local/include

sh-4.2$ pkg-config --cflags talloc
-I/usr/local/include

LS
-------------- next part --------------
>From 9be74c88403fa551af7c05fe08e31694af52645e Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Wed, 5 Mar 2014 17:50:26 +0100
Subject: [PATCH] pkgconfig: @LIB_RPATH@ should be in link flags

After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is
used on install. But "-Wl," will be passed to linker and should not be among
CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place.
    @see commit 735c1cd2da15167748e92ba6de48fdb5169db587

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/talloc/pytalloc-util.pc.in | 4 ++--
 lib/tevent/tevent.pc.in        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/talloc/pytalloc-util.pc.in b/lib/talloc/pytalloc-util.pc.in
index bc704b4929416977235a18d3f9d110358127a984..b7426bb1124d5c03af4b1351e1e1c55d039d6f82 100644
--- a/lib/talloc/pytalloc-util.pc.in
+++ b/lib/talloc/pytalloc-util.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: pytalloc-util
 Description: Utility functions for using talloc objects with Python
 Version: @TALLOC_VERSION@
-Libs: -L${libdir} -lpytalloc-util
-Cflags: @LIB_RPATH@ -I${includedir}
+Libs: @LIB_RPATH@ -L${libdir} -lpytalloc-util
+Cflags: -I${includedir}
 URL: http://talloc.samba.org/
diff --git a/lib/tevent/tevent.pc.in b/lib/tevent/tevent.pc.in
index 1091ff00f1e4d5e6562ee42556ca9984895069bf..eb0e564f7247007e53692c02f6d4dce0be62a160 100644
--- a/lib/tevent/tevent.pc.in
+++ b/lib/tevent/tevent.pc.in
@@ -7,6 +7,6 @@ Name: tevent
 Description: An event system library
 Version: @PACKAGE_VERSION@
 Requires: talloc
-Libs: -L${libdir} -ltevent
-Cflags: @LIB_RPATH@ -I${includedir}
+Libs: @LIB_RPATH@ -L${libdir} -ltevent
+Cflags: -I${includedir}
 URL: http://samba.org/
-- 
1.9.0



More information about the samba-technical mailing list