summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/exclude.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/exclude.exp')
-rw-r--r--ld/testsuite/ld-elf/exclude.exp12
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/exclude.exp b/ld/testsuite/ld-elf/exclude.exp
index 124549f735..28a34ab543 100644
--- a/ld/testsuite/ld-elf/exclude.exp
+++ b/ld/testsuite/ld-elf/exclude.exp
@@ -31,6 +31,14 @@ if { [istarget "mcore-*-*"] } {
return
}
+set as_opt ""
+
+# This target requires extra as options when building code for shared
+# libraries.
+if { [istarget "tic6x-*-*"] } {
+ set as_opt "-mpic -mpid=near"
+}
+
global ar
global as
global ld
@@ -47,8 +55,8 @@ set test7 "ld exclude symbols from archive - --exclude-libs foo:libexclude.a"
set test8 "ld exclude symbols from archive - --exclude-libs foo,libexclude.a"
set test9 "ld don't exclude symbols from archive - --exclude-libs foo:bar"
-if { ![ld_assemble $as $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ]
- || ![ld_assemble $as $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } {
+if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ]
+ || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } {
unresolved $test1
return
}