]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add ppc476 workaround bootstrap test
authorAlan Modra <amodra@gmail.com>
Thu, 20 Feb 2014 23:48:01 +0000 (10:18 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 16 Apr 2014 02:38:34 +0000 (12:08 +0930)
I was running this by hand to test out --ppc476-workaround.  Another
bootstrap test doesn't take all that long, so let's add it to the
testsuite.

* ld-bootstrap/bootstrap.exp: Add ppc476 workaround test.
* ld-bootstrap/ppc476.t: New file.

ld/testsuite/ChangeLog
ld/testsuite/ld-bootstrap/bootstrap.exp
ld/testsuite/ld-bootstrap/ppc476.t [new file with mode: 0644]

index 7ac96ed1e9aa563406c61272e005b532eb061627..c1aa618c3d180e7a682645fb936b495a372fc544 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-16  Alan Modra  <amodra@gmail.com>
+
+       * ld-bootstrap/bootstrap.exp: Add ppc476 workaround test.
+       * ld-bootstrap/ppc476.t: New file.
+
 2014-04-15  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
        * ld-aarch64/tls-relax-gdesc-ie.s (var): Adjust test case
index 1893873e6168d2f6c404724d8d7d82a8a8f7dce4..bf3800039f7099e746870fd1926dfb7e83ea0e8d 100644 (file)
@@ -49,9 +49,13 @@ if [check_plugin_api_available] {
 # order to test -r.  Then link the result into an executable, ld1, to
 # really test -r.  Use ld1 to link a fresh ld, ld2.  Use ld2 to link a
 # new ld, ld3.  ld2 and ld3 should be identical.
+set test_flags {"" "strip" "--static" "--traditional-format"
+               "--no-keep-memory" "--relax"}
+if { [istarget "powerpc-*-*"] } {
+    lappend test_flags "--ppc476-workaround"
+}
 
-foreach flags {"" "strip" "--static" "--traditional-format"
-              "--no-keep-memory" "--relax"} {
+foreach flags $test_flags {
     set do_strip "no"
     if {"$flags" == "strip"} { 
        set testname "bootstrap with $flags"
@@ -69,6 +73,10 @@ foreach flags {"" "strip" "--static" "--traditional-format"
        set partial_flags ""
     }
 
+    if { $partial_flags == "--ppc476-workaround" } {
+       append partial_flags " -T $srcdir/$subdir/ppc476.t"
+    }
+
     # This test can only be run if we have the ld build directory,
     # since we need the object files.
     if {$ld != "$objdir/ld-new"} {
diff --git a/ld/testsuite/ld-bootstrap/ppc476.t b/ld/testsuite/ld-bootstrap/ppc476.t
new file mode 100644 (file)
index 0000000..46ab8a7
--- /dev/null
@@ -0,0 +1,7 @@
+SECTIONS
+{
+  .text : ALIGN (4096)
+  {
+    *(.text .text.* .gnu.linkonce.t*)
+  }
+}