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)
commit5d553f8f164373f2d9d95f7cd72f9e638f886ee7
treeed84e9773e0987068a4de2990d671f20d9bd2c16
parente9ced3eb56dcb875b2aadec7fe0f5072fe2fca19
Set RUNPATH for simulavr binary (so it can find libbfd).

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