# Expect script for ld-visibility tests
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2012
# Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
&& ![istarget hppa*-*-linux*] \
&& ![istarget i?86-*-linux*] \
&& ![istarget i?86-*-gnu*] \
+ && ![istarget *-*-nacl*] \
&& ![istarget ia64-*-linux*] \
&& ![istarget m68k-*-linux*] \
&& ![istarget mips*-*-linux*] \
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] {
set support_protected "no"
if { [istarget *-*-linux*]
+ || [istarget *-*-nacl*]
|| [istarget *-*-gnu*] } {
if [ld_compile "$CC -g $CFLAGS -DPROTECTED_CHECK" $srcdir/$subdir/main.c $tmpdir/main.o] {
if [ld_simple_link $CC $tmpdir/main "$tmpdir/main.o"] {
# Now compile the code using -fpic.
- if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
+ if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
|| ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
unresolved "visibility ($visibility)"
} else {