Set RUNPATH for simulavr binary (so it can find libbfd).
authorW. Trevor King <wking@tremily.us>
Tue, 14 Aug 2012 02:27:30 +0000 (22:27 -0400)
committerW. Trevor King <wking@tremily.us>
Tue, 14 Aug 2012 12:49:22 +0000 (08:49 -0400)
With --enable-new-dtags, ld sets both RUNPATH and RPATH instead of
just RPATH.  On Gentoo, this has been the default since 2005 [1], but
explicit is better than implicit [2].

  $ readelf -d .../usr/bin/simulavr | grep PATH
   0x000000000000000f (RPATH)    Library rpath: [/usr/lib/binutils/avr/git]
   0x000000000000001d (RUNPATH)  Library runpath: [/usr/lib/binutils/avr/git]

From ld(1):

  The "DT_RPATH" entries are ignored if "DT_RUNPATH" entries exist.

So the fact that there is a RPATH entry doesn't matter.

[1]: http://comments.gmane.org/gmane.comp.gnu.binutils/57379
[2]: http://www.python.org/dev/peps/pep-0020/

dev-embedded/simulavr/Manifest
dev-embedded/simulavr/simulavr-9999.ebuild

index 24705fd9c0adf14dea5e83767e17f47030ba5626..0d538b1d9426d20e70fe074b40fbd575ac772e31 100644 (file)
@@ -1,4 +1,4 @@
 AUX 9999-0010-update_poisoned_interrupt_vectors.patch 5946 RMD160 4d186938c7cf930da1b8ee8a6e9b14c136d242ed SHA1 153f81002eb44bc1404a8f6c86b00e8f93a44895 SHA256 f74d0dacdc77c1bd0e88ea6c47be08659f778b5c9f4263d98333bda19e2f9a9b
-EBUILD simulavr-9999.ebuild 1983 RMD160 c9b2ba80e83e718b1d55f907ff8c4c5f69123b8c SHA1 e7014a2f747540eef7afc49a1cfeffd6556019d2 SHA256 db42d7b98b110d8031d9cbd7dc525f93ffd24608e96a41aaa961d3b4f6d326c0
+EBUILD simulavr-9999.ebuild 2051 RMD160 e159872bec62f966151257e87965c6418fba0630 SHA1 6b01184cdafe9fd76564e57a4467ff111f839b14 SHA256 3d546aca4d3a6aa4173df2f0e1564612e78afcb27c07f560957f3bde6cca2903
 MISC ChangeLog 601 RMD160 56171751910f8d3564700e61b478729aca7fbd84 SHA1 14323d44d908388575f06ffc0690ea4d92d88f2c SHA256 b41cd1718171fed8744d6fc386c7277b760222e49a517cdcb2479ae06aa9a837
 MISC metadata.xml 247 RMD160 f6a3debfa8f70e039ec74fe92be0de687c8cec20 SHA1 30c46f34b3a777a6ff4f46dd4590b94677594948 SHA256 30b3270d8e655f6c190d3148f49b9364795beb41991502630e6631886ef107ea
index 62e09ea7dad8acd15d873b084420832e2cf59c26..5c07b195fa3effd1a6e37b204d9b8793f5acc835 100644 (file)
@@ -69,5 +69,5 @@ src_configure() {
        myconf="${my_conf} $(use_enable verilog)"
        myconf="${my_conf} $(use_enable doc doxygen-doc )"
        myconf="${my_conf}"
-       econf ${my_conf} --docdir="${EPREFIX}/usr/share/${P}"
+       LDFLAGS="-Wl,-rpath=${BINUTILS_PATH},--enable-new-dtags ${LDFLAGS}" econf ${my_conf} --docdir="${EPREFIX}/usr/share/${P}"
 }