diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-11-26 11:17:08 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-11-26 11:17:08 -0800 |
commit | b27caf75c311991772b316fe7c0eecfd5788eeaf (patch) | |
tree | 90f0032a6a93fcabbf0fe308995ade85e642783e /ld/testsuite | |
parent | d24a9f159c4b62ea5a64f619bd2090bbc98d8abd (diff) | |
download | gdb-b27caf75c311991772b316fe7c0eecfd5788eeaf.zip gdb-b27caf75c311991772b316fe7c0eecfd5788eeaf.tar.gz gdb-b27caf75c311991772b316fe7c0eecfd5788eeaf.tar.bz2 |
Add HOSTING_SLIBS and use it for -pie
ld/
PR ld/16259
* Makefile.am (HOSTING_SLIBS): New.
* configure.host (HOSTING_SLIBS): New. Used for PIE.
* configure.in (HOSTING_SLIBS): New AC_SUBST.
* Makefile.in: Regenerated.
* configure: Likewise.
ld/testsuite/
PR ld/16259
* config/default.exp (get_target_emul): Also set HOSTING_SLIBS.
* lib/ld-lib.exp (default_ld_link): Use HOSTING_SLIBS for -pie.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/config/default.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index bbd8eb3..3ccefaf 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-11-26 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/16259 + * config/default.exp (get_target_emul): Also set HOSTING_SLIBS. + * lib/ld-lib.exp (default_ld_link): Use HOSTING_SLIBS for -pie. + 2013-11-26 Will Newton <will.newton@linaro.org> * ld-aarch64/aarch64-elf.exp: Add ifunc-22. diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp index d540f19..1d3ce6a 100644 --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp @@ -139,11 +139,11 @@ proc get_target_emul {} { } if [isnative] { - foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS} { + foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS HOSTING_SLIBS} { get_link_files $x } } else { - foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS} { set $x "" } + foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS HOSTING_SLIBS} { set $x "" } } if ![info exists HOSTING_EMU] { set HOSTING_EMU "-m [get_target_emul]" } diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 67c429f..8df42ae 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -179,6 +179,7 @@ proc default_ld_link { ld target objects } { global HOSTING_CRT0 global HOSTING_SCRT0 global HOSTING_LIBS + global HOSTING_SLIBS global LIBS global host_triplet global link_output @@ -186,10 +187,11 @@ proc default_ld_link { ld target objects } { if { [ string match "* -pie *" $objects ] } { set objs "$HOSTING_SCRT0 $objects" + set libs "$LIBS $HOSTING_SLIBS" } else { set objs "$HOSTING_CRT0 $objects" + set libs "$LIBS $HOSTING_LIBS" } - set libs "$LIBS $HOSTING_LIBS" if [is_endian_output_format $objects] then { set flags [big_or_little_endian] |