]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
powerpc garbage collect test
authorAlan Modra <amodra@gmail.com>
Thu, 9 Jul 2020 13:18:10 +0000 (22:48 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 13 Jul 2020 14:11:57 +0000 (23:41 +0930)
ld's garbage collection test on powerpc64 catered for old compilers
(pre -mcmodel=medium support), setting options that caused the test to
fail.  Which meant the test wasn't really testing anything.  Get rid
of that old compiler support, and avoid -fPIE fails on ppc32.

* testsuite/ld-gc/gc.exp: Don't set -mminimal-toc for powerpc64,
and remove powerpc64 xfail.  Use -fno-PIE for ppc32.

(cherry picked from commit c560184eb2074570988c498aaae494d0c4b00328)

ld/ChangeLog
ld/testsuite/ld-gc/gc.exp

index ac8c501feb7268c557084097cc5deb7a1c82d110..9ecb8e576fddcc11077413b6cff2b230bd570194 100644 (file)
@@ -1,6 +1,10 @@
 2020-07-13  Alan Modra  <amodra@gmail.com>
 
        Apply from master
+       2020-07-09  Alan Modra  <amodra@gmail.com>
+       * testsuite/ld-gc/gc.exp: Don't set -mminimal-toc for powerpc64,
+       and remove powerpc64 xfail.  Use -fno-PIE for ppc32.
+
        2020-07-09  Alan Modra  <amodra@gmail.com>
        PR 18841
        * testsuite/ld-ifunc/ifunc.exp: Run pr18841 tests non-pie.
index ea3316887e3df0cb6b3d38db9eeab6b30b22292e..285e7d1cb576370a2b0756c8cacbe6df796906e2 100644 (file)
@@ -26,9 +26,9 @@ if ![check_gc_sections_available] {
 set cflags "-ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS"
 set objfile "tmpdir/gc.o"
 
-if [istarget powerpc64*-*-*] {
-    # otherwise with -mcmodel=medium gcc we get XPASSes.
-    set cflags "$cflags -mminimal-toc"
+if { [istarget powerpc*-*-*] && ![istarget powerpc64*-*-*] } {
+    # Avoid using .got2 for powerpc -m32
+    set cflags "$cflags $NOPIE_CFLAGS"
 }
 
 if { [istarget m681*-*-*] || [istarget m68hc1*-*-*] } {
@@ -71,9 +71,6 @@ proc test_gc { testname filename linker ldflags} {
        fail $testname
        return
     }
-    #ppc64_elf_gc_mark_hook needs to be taught how to look through
-    #the .toc section to properly mark variable sections for gc.
-    setup_xfail "powerpc64*-*-*"
     if {[info exists nm_output(unused_func)] \
            || [info exists nm_output(unused_var)]} {
        send_log "unused section still here\n"