ChangeLog rotatation and copyright year update
[deliverable/binutils-gdb.git] / ld / testsuite / ld-shared / shared.exp
index 521b9255722ffbd432e69bf284c05e272bd60e18..7f418dc4b5dd0cbc9f3814521e43a13b66557198 100644 (file)
@@ -1,7 +1,5 @@
 # Expect script for ld-shared tests
-#   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-#   2004, 2005, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1994-2015 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -38,6 +36,8 @@ if { ![istarget hppa*64*-*-hpux*] \
      && ![istarget i?86-*-unixware] \
      && ![istarget i?86-*-elf*] \
      && ![istarget i?86-*-linux*] \
+     && ![istarget i?86-*-gnu*] \
+     && ![istarget *-*-nacl*] \
      && ![istarget ia64-*-elf*] \
      && ![istarget ia64-*-linux*] \
      && ![istarget m68k-*-linux*] \
@@ -55,6 +55,7 @@ if { ![istarget hppa*64*-*-hpux*] \
      && ![istarget rs6000*-*-aix*] \
      && ![istarget powerpc*-*-aix*] \
      && ![istarget s390*-*-linux*] \
+     && ![istarget aarch64*-*-linux*] \
      && ![istarget x86_64-*-linux*] } {
     return
 }
@@ -100,16 +101,16 @@ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
 
 if [istarget arm*-*-linux*] {
     # On ARM section anchors can change the symbol pre-emptability for
-    # non-PIC shared libraries, causing these tests to fail.  Turn section 
+    # non-PIC shared libraries, causing these tests to fail.  Turn section
     # anchors off.
     set SHCFLAG "-fno-section-anchors"
 
-    # On targets that have MOVW the compiler will emit relocations which 
+    # On targets that have MOVW the compiler will emit relocations which
     # the linker doesn't support when compiling -shared without -fpic.  The
-    # test to find out whether we want to XFAIL the non-PIC tests requires 
+    # test to find out whether we want to XFAIL the non-PIC tests requires
     # a compile - so we pre-calculate it here.  We also note that this can
-    # only affect arm*-*-*eabi targets as the old ABI doesn't support v7.
-    if [istarget arm*-*-*eabi] {
+    # only affect arm*-*-*eabi* targets as the old ABI doesn't support v7.
+    if [istarget arm*-*-*eabi*] {
        set file [open $tmpdir/movw-detect.c w]
        puts $file "void foo(void) { __asm (\"movw r0, #0\"); }"
        close $file
@@ -180,7 +181,9 @@ proc shared_test { progname testname main sh1 sh2 dat args } {
     pass "$testname"
 }
 
-if [istarget mips*-*-*] {
+# Old version of GCC for MIPS default to enabling -fpic
+# and get confused if it is used on the command line.
+if { [istarget mips*-*-*] && ! [at_least_gcc_version 4 3] } then {
     set picflag ""
 } else {
     # Unfortunately, the gcc argument is -fpic and the cc argument is
@@ -233,11 +236,15 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
        if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
            setup_xfail "sparc*-*-linux*"
        }
-       setup_xfail "x86_64-*-linux*"
+       if { [is_elf64 $tmpdir/mainnp.o] } {
+           setup_xfail "x86_64-*-linux*"
+       }
+       setup_xfail "x86_64-*-linux-gnux32"
        setup_xfail "s390x-*-linux*"
        if [ string match $shared_needs_pic "yes" ] {
            setup_xfail "arm*-*-linux*"
        }
+       setup_xfail "aarch64*-*-linux*"
        shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
 
        # Test ELF shared library relocations with a non-zero load
@@ -256,11 +263,15 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
        if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
            setup_xfail "sparc*-*-linux*"
        }
-       setup_xfail "x86_64-*-linux*"
+       if { [is_elf64 $tmpdir/mainnp.o] } {
+           setup_xfail "x86_64-*-linux*"
+       }
+       setup_xfail "x86_64-*-linux-gnux32"
        setup_xfail "s390x-*-linux*"
        if [ string match $shared_needs_pic "yes" ] {
            setup_xfail "arm*-*-linux*"
        }
+       setup_xfail "aarch64*-*-linux*"
        shared_test shnp "shared (non PIC, load offset)" \
                mainnp.o sh1np.o sh2np.o shared \
                "-T $srcdir/$subdir/elf-offset.ld"
@@ -268,7 +279,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
 
     # Now compile the code using -fpic.
 
-    if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] 
+    if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
         || ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
        unresolved "shared"
     } else {
@@ -281,7 +292,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
            shared_test shp "shared" mainnp.o sh1p.o sh2p.o shared
            ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
            ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
-           shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic" 
+           shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic"
            ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
            ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
        } }
@@ -309,11 +320,15 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
            if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainp.o] } {
                setup_xfail "sparc*-*-linux*"
            }
-           setup_xfail "x86_64-*-linux*"
+           if { [is_elf64 $tmpdir/mainp.o] } {
+               setup_xfail "x86_64-*-linux*"
+           }
+           setup_xfail "x86_64-*-linux-gnux32"
            setup_xfail "s390x-*-linux*"
            if [ string match $shared_needs_pic "yes" ] {
                setup_xfail "arm*-*-linux*"
            }
+           setup_xfail "aarch64*-*-linux*"
            shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
        }
     } else {
This page took 0.025381 seconds and 4 git commands to generate.