Subject: buildlink3 ld-post*
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 04/18/2004 19:31:59
--DWg365Y4B18r8evw
Content-Type: multipart/mixed; boundary="juZjCTNxrMaZdGZC"
Content-Disposition: inline


--juZjCTNxrMaZdGZC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I've come across a little nuisance under Irix that could be solved with
the attached patch:

The MIPSPro compiler uses -Wl,-rpath,/usr/pkg/lib to pass the correct
rpath to the linker.  So our CFLAGS and LDFLAGS contain just this.
buildlink3's ld-post* stuff should turn this into '-rpath /usr/pkg/lib'
if the linker is called, but somehow this does not seem to happen.
However, if I do add the same logic for '-rpath' as attached, it will
work.  I'm a bit confused by this.

Anybody with any ideas?

-Jan

--=20
I always said there was something fundamentally wrong with the universe.

--juZjCTNxrMaZdGZC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: ld-post-cache
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/ld-post-cache,v
retrieving revision 1.2
diff -b -u -r1.2 ld-post-cache
--- ld-post-cache	2 Sep 2003 06:59:55 -0000	1.2
+++ ld-post-cache	18 Apr 2004 23:18:17 -0000
@@ -8,4 +8,7 @@
 -Wl,*)
 	skipcache=yes
 	;;
+-rpath,*)
+	skipcache=yes
+	;;
 esac
Index: ld-post-logic
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/ld-post-logic,v
retrieving revision 1.2
diff -b -u -r1.2 ld-post-logic
--- ld-post-logic	2 Sep 2003 06:59:55 -0000	1.2
+++ ld-post-logic	18 Apr 2004 23:18:17 -0000
@@ -11,4 +11,8 @@
 	arg=`$echo "X$arg" | $Xsed -e "s|^-Wl,||g" -e "s|,| |g"`
 	addtoprivatecache=yes
 	;;
+-rpath,*)
+	arg=`$echo "X$arg" | $Xsed -e "s|,| |g"`
+	addtoprivatecache=yes
+	;;
 esac

--juZjCTNxrMaZdGZC--

--DWg365Y4B18r8evw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAgw/vfFtkr68iakwRAkbPAJ4uI9XUD2baQPzE0Tpjb0Xq1NstpwCfR/x9
ohAbbELGS2zVcz+FuyKMaFk=
=1J3Z
-----END PGP SIGNATURE-----

--DWg365Y4B18r8evw--