Pass --enable-new-dtags to the linker invocation by default. If

desired, one can turn off the generation of post-ELF standard dtags by
overriding it with --disable-new-dtags after the default switch.

Immediate effect of the change is that -rpath path is now stored both
in DT_RPATH and DT_RUNPATH tags, which is the right way to provide
rpath for dynamic linker supporting DT_RUNPATH per specification.

Reviewed by:	kan
MFC after:	1 month
This commit is contained in:
Konstantin Belousov 2012-07-15 10:54:10 +00:00
parent bca2f6239d
commit b375a6d71d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238472
7 changed files with 7 additions and 4 deletions

View File

@ -50,7 +50,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{!static:--hash-style=both} \
%{!static:--hash-style=both --enable-new-dtags} \
%{symbolic:-Bsymbolic} \
-X %{mbig-endian:-EB} %{mlittle-endian:-EL}"

View File

@ -49,7 +49,7 @@ Boston, MA 02110-1301, USA. */
%{rdynamic: -export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{!static:--hash-style=both} \
%{!static:--hash-style=both --enable-new-dtags} \
%{symbolic:-Bsymbolic}"
/* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h

View File

@ -54,5 +54,5 @@ Boston, MA 02110-1301, USA. */
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{!static:--hash-style=both} \
%{!static:--hash-style=both --enable-new-dtags} \
%{symbolic:-Bsymbolic}"

View File

@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!static:--enable-new-dtags} \
%{symbolic:-Bsymbolic} \
%{!shared: \
%{!static: \

View File

@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!static:--enable-new-dtags} \
%{!shared: \
%{!static: \
%{rdynamic: -export-dynamic} \

View File

@ -180,6 +180,7 @@ extern int dot_symbols;
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!static:--enable-new-dtags} \
%{!shared: \
%{!static: \
%{rdynamic: -export-dynamic} \

View File

@ -53,7 +53,7 @@ Boston, MA 02110-1301, USA. */
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
%{static:-Bstatic}} \
%{!static:--hash-style=both} \
%{!static:--hash-style=both --enable-new-dtags} \
%{symbolic:-Bsymbolic}"