From 91001320a22466d1580e169bcb023d3b822226b4 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 5 Jun 2017 14:43:54 +0930 Subject: [PATCH] Fix --enable-new-dtags config support and testsuite when configured with --enable-new-dtags. * ldmain.c (main): Correct setting of link_indo.new_dtags. * testsuite/ld-elf/now-3.d: Pass --disable-new-dtags to ld * testsuite/ld-elf/now-4.d: Likewise. * testsuite/ld-elf/rpath-1.d: Likewise. * testsuite/ld-elf/rpath-2.d: Likewise. --- ld/ChangeLog | 12 ++++++++++-- ld/ldmain.c | 2 +- ld/testsuite/ld-elf/now-3.d | 2 +- ld/testsuite/ld-elf/now-4.d | 2 +- ld/testsuite/ld-elf/rpath-1.d | 2 +- ld/testsuite/ld-elf/rpath-2.d | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 2e63b26bc2a..8a228626097 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,8 +1,16 @@ +2017-06-05 Alan Modra + + * ldmain.c (main): Correct setting of link_indo.new_dtags. + * testsuite/ld-elf/now-3.d: Pass --disable-new-dtags to ld + * testsuite/ld-elf/now-4.d: Likewise. + * testsuite/ld-elf/rpath-1.d: Likewise. + * testsuite/ld-elf/rpath-2.d: Likewise. + 2017-06-05 Slava Barinov * configure.ac: Add --enable-new-dtags option. - * ldmain.c: Set link_info.new_dtags to 1 if when --enable-new-dtags is - switched on. + * ldmain.c (main): Set link_info.new_dtags to 1 if when + --enable-new-dtags is switched on. * configure: Regenerate. * config.in: Regenerate. diff --git a/ld/ldmain.c b/ld/ldmain.c index 045f3231fa2..2b3a59150f0 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -299,7 +299,7 @@ main (int argc, char **argv) link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB; #endif #ifdef DEFAULT_NEW_DTAGS - link_info.new_dtags = TRUE; + link_info.new_dtags = DEFAULT_NEW_DTAGS; #endif ldfile_add_arch (""); diff --git a/ld/testsuite/ld-elf/now-3.d b/ld/testsuite/ld-elf/now-3.d index 687885ad485..fa98065c621 100644 --- a/ld/testsuite/ld-elf/now-3.d +++ b/ld/testsuite/ld-elf/now-3.d @@ -1,6 +1,6 @@ #source: start.s #readelf: -d -W -#ld: -shared -z now +#ld: -shared -z now --disable-new-dtags #target: *-*-linux* *-*-gnu* #failif diff --git a/ld/testsuite/ld-elf/now-4.d b/ld/testsuite/ld-elf/now-4.d index 8d9d02f92f9..421063d9386 100644 --- a/ld/testsuite/ld-elf/now-4.d +++ b/ld/testsuite/ld-elf/now-4.d @@ -1,6 +1,6 @@ #source: start.s #readelf: -d -W -#ld: -shared -z now +#ld: -shared -z now --disable-new-dtags #target: *-*-linux* *-*-gnu* #... diff --git a/ld/testsuite/ld-elf/rpath-1.d b/ld/testsuite/ld-elf/rpath-1.d index 918a326f04d..38d6eab5e36 100644 --- a/ld/testsuite/ld-elf/rpath-1.d +++ b/ld/testsuite/ld-elf/rpath-1.d @@ -1,6 +1,6 @@ #source: start.s #readelf: -d -W -#ld: -shared -rpath . +#ld: -shared -rpath=. --disable-new-dtags #target: *-*-linux* *-*-gnu* #failif diff --git a/ld/testsuite/ld-elf/rpath-2.d b/ld/testsuite/ld-elf/rpath-2.d index 17be86d1462..d4c75ff71b7 100644 --- a/ld/testsuite/ld-elf/rpath-2.d +++ b/ld/testsuite/ld-elf/rpath-2.d @@ -1,6 +1,6 @@ #source: start.s #readelf: -d -W -#ld: -shared -rpath . +#ld: -shared -rpath=. --disable-new-dtags #target: *-*-linux* *-*-gnu* #... -- 2.30.2