gcc50: Switch final specs to set DT_RUNPATH tag
authorJohn Marino <draco@marino.st>
Mon, 23 Mar 2015 08:32:54 +0000 (09:32 +0100)
committerJohn Marino <draco@marino.st>
Mon, 23 Mar 2015 11:29:14 +0000 (12:29 +0100)
commit0d2ea3af92127a10961ca1d0332ec09bb20d5703
tree1f002d1004e918e01422327aa61fafd14efe2aa8
parent4b7e61e012b29628a68f98ab3fdd43ecb5c2b5e0
gcc50: Switch final specs to set DT_RUNPATH tag

The system dynamic binaries have always been built with DT_RPATH set
by the linker.  A few years ago the dynamic linker gained DT_RUNPATH
capability but it hasn't been used in base.

How it works is that when the linker is given the -rpath switch, it
will always set DT_RPATH, but if the --enable-new-dtags switch is present,
the linker will also set DT_RUNPATH tag.  The dynamic linker reacts
differently when DT_RUNPATH is present; it will check LD_LIBRARY_PATH
before the rpath in that case.

This change (to gcc50 only) builds the system with the -rpath flag alone
by for the ctools compiler, but the final compiler's specs include the
--enable-new-dtags switch as well, which affects the building of ports and
all non-system use of the compiler.
gnu/usr.bin/cc50/Makefile.inc
gnu/usr.bin/cc50/cc_prep/config/dragonfly-native.h