* ld-elf/frame.exp: Use -mpic -mpid=near assembler options for tic6x. * ld-elf/exclude.exp: Likewise. Index: ld/testsuite/ld-elf/frame.exp =================================================================== --- ld/testsuite/ld-elf/frame.exp (revision 316201) +++ ld/testsuite/ld-elf/frame.exp (working copy) @@ -44,14 +44,20 @@ if { [istarget "hppa64-*-*"] || [istarge return } +# This target requires extra as options when building code for shared +# libraries. +if { [istarget "tic6x-*-*"] } { + set as_opt "-mpic -mpid=near" +} + set test1 "read-only .eh_frame section" set test2 "read-only .gcc_except_table section" global as global ld -if { ![ld_assemble $as $srcdir/$subdir/tbss.s tmpdir/tbss.o ] - || ![ld_assemble $as $srcdir/$subdir/frame.s tmpdir/frame.o] } { +if { ![ld_assemble $as "$as_opt $srcdir/$subdir/tbss.s" tmpdir/tbss.o ] + || ![ld_assemble $as "$as_opt $srcdir/$subdir/frame.s" tmpdir/frame.o] } { unresolved "$test1" return } @@ -66,7 +72,7 @@ if { [ld_simple_link $ld tmpdir/frame.so } } -if ![ld_assemble $as $srcdir/$subdir/table.s tmpdir/table.o ] { +if ![ld_assemble $as "$as_opt $srcdir/$subdir/table.s" tmpdir/table.o ] { unresolved "$test2" return } Index: ld/testsuite/ld-elf/exclude.exp =================================================================== --- ld/testsuite/ld-elf/exclude.exp (revision 316201) +++ ld/testsuite/ld-elf/exclude.exp (working copy) @@ -31,6 +31,12 @@ if { [istarget "mcore-*-*"] } { return } +# 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 +53,8 @@ set test7 "ld exclude symbols from archi 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 $as "$as_opt $srcdir/$subdir/exclude1.s" tmpdir/exclude1.o ] + || ![ld_assemble $as "$as_opt $srcdir/$subdir/exclude2.s" tmpdir/exclude2.o] } { unresolved $test1 return }