diff options
Diffstat (limited to 'ld/testsuite/ld-vsb/vsb.exp')
-rw-r--r-- | ld/testsuite/ld-vsb/vsb.exp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ld/testsuite/ld-vsb/vsb.exp b/ld/testsuite/ld-vsb/vsb.exp index 9a61e9d..84ae1ed 100644 --- a/ld/testsuite/ld-vsb/vsb.exp +++ b/ld/testsuite/ld-vsb/vsb.exp @@ -36,7 +36,6 @@ if { ![istarget hppa*64*-*-hpux*] \ && ![istarget hppa*-*-linux*] \ && ![istarget i?86-*-linux*] \ && ![istarget i?86-*-gnu*] \ - && ![istarget *-*-nacl*] \ && ![istarget ia64-*-linux*] \ && ![istarget m68k-*-linux*] \ && ![istarget mips*-*-linux*] \ @@ -114,7 +113,6 @@ if [istarget arm*-*-linux*] { set support_protected "no" if { [istarget *-*-linux*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { if [ld_compile "$CC_FOR_TARGET -g -DPROTECTED_CHECK" $srcdir/$subdir/main.c $tmpdir/main.o] { if [ld_link $CC_FOR_TARGET $tmpdir/main "$tmpdir/main.o"] { @@ -134,6 +132,7 @@ proc visibility_test { visibility progname testname main sh1 sh2 dat args } { global tmpdir if [llength $args] { set shldflags [lindex $args 0] } else { set shldflags "" } + if { [llength $args] >= 2 } { set ldflags [lindex $args 1] } else { set ldflags "" } # Build the shared library. set shared -shared @@ -169,7 +168,7 @@ proc visibility_test { visibility progname testname main sh1 sh2 dat args } { set rpath /lib:$tmpdir set exportflag " -Wl,-bexpall" } - if ![ld_link $CC_FOR_TARGET $tmpdir/$progname "-Wl,-rpath,$rpath $tmpdir/$main $tmpdir/$progname.so $exportflag"] { + if ![ld_link $CC_FOR_TARGET $tmpdir/$progname "-Wl,-rpath,$rpath $ldflags $tmpdir/$main $tmpdir/$progname.so $exportflag"] { if { [ string match $visibility "hidden" ] && [regexp "undefined reference to \`\.?visibility\'" $link_output] && [regexp "undefined reference to \`visibility_var\'" $link_output] } { @@ -235,6 +234,7 @@ proc visibility_run {visibility} { global shared_needs_pic global PLT_CFLAGS global NOPIE_CFLAGS + global NOPIE_LDFLAGS global COMPRESS_LDFLAG global NOSANITIZE_CFLAGS global NOLTO_CFLAGS @@ -284,7 +284,7 @@ proc visibility_run {visibility} { } else { # Compile the main program. Make sure that PLT is used since PLT # is expected. - if ![ld_compile "$CC_FOR_TARGET -g $PLT_CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] { + if ![ld_compile "$CC_FOR_TARGET -g $NOPIE_CFLAGS $PLT_CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] { unsupported "visibility ($visibility) (non PIC)" unsupported "visibility ($visibility)" } else { @@ -343,7 +343,7 @@ proc visibility_run {visibility} { setup_xfail "*-*-beos*" } - visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o $datfile + visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o $datfile "" $NOPIE_LDFLAGS # Test ELF shared library relocations with a non-zero load # address for the library. Near as I can tell, the R_*_RELATIVE @@ -395,7 +395,7 @@ proc visibility_run {visibility} { if { ![is_xcoff_format] } { visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \ mainnp.o sh1np.o sh2np.o $datfile \ - "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" + "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" $NOPIE_LDFLAGS } } @@ -411,7 +411,7 @@ proc visibility_run {visibility} { setup_xfail $target_triplet } } - visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o $datfile $COMPRESS_LDFLAG + visibility_test $visibility vp "visibility ($visibility)" mainnp.o sh1p.o sh2p.o $datfile $COMPRESS_LDFLAG $NOPIE_LDFLAGS } }} @@ -466,7 +466,7 @@ proc visibility_run {visibility} { setup_xfail "*-*-beos*" } - visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o $datfile + visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o $datfile "" $NOPIE_LDFLAGS } else { unsupported "visibility (PIC main, non PIC so)" } @@ -488,7 +488,7 @@ proc visibility_run {visibility} { setup_xfail "*-*-beos*" } - visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o $datfile + visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o $datfile "" $NOPIE_LDFLAGS } else { unsupported "visibility ($visibility) (PIC main)" } |