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/configure.host | |
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/configure.host')
-rw-r--r-- | ld/configure.host | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/configure.host b/ld/configure.host index c56f67d..71f695d 100644 --- a/ld/configure.host +++ b/ld/configure.host @@ -57,6 +57,7 @@ case "${host}" in *-*-linux*) HOSTING_CRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' HOSTING_SCRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=Scrt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbeginS.o ]; then echo ../gcc/crtbeginS.o; else ${CC} --print-file-name=crtbeginS.o; fi`' + HOSTING_SLIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtendS.o ]; then echo ../gcc/crtendS.o; else ${CC} --print-file-name=crtendS.o; fi` `${CC} --print-file-name=crtn.o`' HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' ;; @@ -249,3 +250,9 @@ esac if test -z "$HOSTING_SCRT0"; then HOSTING_SCRT0="$HOSTING_CRT0" fi + +# Provide default HOSTING_SLIBS. Each host should define a proper one +# if needed. +if test -z "$HOSTING_SLIBS"; then + HOSTING_SLIBS="$HOSTING_SLIBS" +fi |