aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.asm/asm-source.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.asm/asm-source.exp')
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp23
1 files changed, 10 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 8b0df38..d07fc7d 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -33,7 +33,7 @@ set bug_id 0
set asm-arch ""
set asm-flags ""
-set link-flags ""
+set link-flags "--entry _start"
switch -glob -- [istarget] {
"alpha*-*-*" {
@@ -63,13 +63,10 @@ switch -glob -- [istarget] {
}
"i\[3456\]86-*-*" {
set asm-arch i386
- if [istarget "*-*-cygwin*"] then {
- set link-flags "--entry _start"
- }
}
"m32r*-*" {
set asm-arch m32r
- set link-flags "-Wl,--whole-archive -lgloss -Wl,--no-whole-archive"
+ append link-flags " -Wl,--whole-archive -lgloss -Wl,--no-whole-archive"
}
"m6811-*-*" {
set asm-arch m68hc11
@@ -88,7 +85,6 @@ switch -glob -- [istarget] {
"sh*-*-*" {
set asm-arch sh
set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
- set link-flags "--entry _start"
}
"sparc-*-*" {
set asm-arch sparc
@@ -118,13 +114,14 @@ if { "${asm-arch}" == "" } {
gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
}
-# On FreeBSD, crt1.o the final link will fail because of unresolved
-# symbols. It turns out that libc.so references symbols that are
-# normally provided by crt1.o, which isn't linked in since we specify
-# -nostartfiles. Using -nostdlib doesn't help since target_compile
-# automatically adds -lm. Linking statically avoids this mess.
-if [istarget "*-*-freebsd*"] then {
- set link-flags "-static"
+# On FreeBSD and NetBSD, crt1.o the final link will fail because of
+# unresolved symbols. It turns out that libc.so references symbols
+# that are normally provided by crt1.o, which isn't linked in since we
+# specify -nostartfiles. Using -nostdlib doesn't help since
+# target_compile automatically adds -lm. Linking statically avoids
+# this mess.
+if {[istarget "*-*-freebsd*"] || [istarget "*-*-netbsd*"]} then {
+ append link-flags " -static"
}
# Watch out, we are invoking the assembler, but the testsuite sets multilib