pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Add a new command "sub-rpath" that does ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7703271ce755
branches:  trunk
changeset: 466607:7703271ce755
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jan 21 08:04:29 2004 +0000

description:
Add a new command "sub-rpath" that does the same thing as "rpath" but only
protects subdirectories of the named paths in rpath options to the linker.
Use sub-rpath to protect /usr/lib/* in rpath options to the linker.

diffstat:

 mk/buildlink3/bsd.buildlink3.mk |   7 ++++++-
 mk/buildlink3/gen-transform.sh  |  12 +++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r 8d2a2ed7a843 -r 7703271ce755 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 21 07:54:50 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 21 08:04:29 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.52 2004/01/21 07:54:50 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.53 2004/01/21 08:04:29 jlam Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -746,6 +746,11 @@
 _BLNK_TRANSFORM+=      rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}}
 .endfor
 #
+# Protect /usr/lib/* as they're all allowed to be specified for the
+# runtime library search path.
+#
+_BLNK_TRANSFORM+=      sub-rpath:/usr/lib:${_BLNK_MANGLE_DIR./usr/lib}
+#
 # Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that
 # "overwrite" packages think headers and libraries for "pkgviews" packages
 # are just found in the default view.
diff -r 8d2a2ed7a843 -r 7703271ce755 mk/buildlink3/gen-transform.sh
--- a/mk/buildlink3/gen-transform.sh    Wed Jan 21 07:54:50 2004 +0000
+++ b/mk/buildlink3/gen-transform.sh    Wed Jan 21 08:04:29 2004 +0000
@@ -1,6 +1,6 @@
 #!@BUILDLINK_SHELL@
 #
-# $NetBSD: gen-transform.sh,v 1.16 2004/01/21 07:54:50 jlam Exp $
+# $NetBSD: gen-transform.sh,v 1.17 2004/01/21 08:04:29 jlam Exp $
 
 transform="@_BLNK_TRANSFORM_SEDFILE@"
 untransform="@_BLNK_UNTRANSFORM_SEDFILE@"
@@ -12,6 +12,8 @@
 #      sub-mangle:src:dst      mangles "src/*" into "dst/*"
 #      rpath:src:dst           translates the directory "src" into "dst"
 #                                      in rpath options
+#      sub-rpath:src:dst       translates "src/*" into "dst/*" in rpath
+#                                      options
 #      abs-rpath               removes all rpath options that try to add
 #                                      relative paths
 #      no-rpath                removes "-R*", "-Wl,-R", and "-Wl,-rpath,*"
@@ -90,6 +92,14 @@
                gen $action mangle:-Wl,-R$2:-Wl,-R$3
                gen $action mangle:-R$2:-R$3
                ;;
+       sub-rpath)
+               gen $action sub-mangle:-Wl,--rpath-link,$2:-Wl,--rpath-link,$3
+               gen $action sub-mangle:-Wl,--rpath,$2:-Wl,--rpath,$3
+               gen $action sub-mangle:-Wl,-rpath-link,$2:-Wl,-rpath-link,$3
+               gen $action sub-mangle:-Wl,-rpath,$2:-Wl,-rpath,$3
+               gen $action sub-mangle:-Wl,-R$2:-Wl,-R$3
+               gen $action sub-mangle:-R$2:-R$3
+               ;;
        abs-rpath)
                gen $action __r:-Wl,--rpath-link,\\.
                gen $action __r:-Wl,--rpath,\\.



Home | Main Index | Thread Index | Old Index