This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Run more ld tests when not native
- From: Alan Modra <amodra at gmail dot com>
- To: Dimitar Dimitrov <dimitar at dinux dot eu>
- Cc: binutils at sourceware dot org
- Date: Wed, 4 Jan 2017 09:36:00 +1030
- Subject: Re: Run more ld tests when not native
- Authentication-results: sourceware.org; auth=none
- References: <20170102133453.GP29355@bubble.grove.modra.org> <1720592.jg0hMQ4cQ7@tpdeb>
On Tue, Jan 03, 2017 at 11:15:44PM +0200, Dimitar Dimitrov wrote:
> > diff --git a/ld/testsuite/ld-elf/audit.exp b/ld/testsuite/ld-elf/audit.exp
> > index b278ec1..aad5339 100644
> > --- a/ld/testsuite/ld-elf/audit.exp
> > +++ b/ld/testsuite/ld-elf/audit.exp
> > @@ -25,11 +25,6 @@ if ![is_elf_format] {
> > return
> > }
> >
> > -# The following tests require running the executable generated by ld.
> > -if ![isnative] {
> > - return
> > -}
> > -
> With isnative check removed, shouldn't this test be skipped for embedded
> targets? In other words:
> +if ![check_shared_lib_support] {
> + return
> +}
True.
* testsuite/ld-elf/audit.exp: Check for shared lib support.
* testsuite/ld-elf/compress.exp: Likewise.
* testsuite/ld-elf/dwarf.exp: Likewise.
* testsuite/ld-elf/shared.exp: Likewise.
* testsuite/ld-elf/wrap.exp: Likewise.
* testsuite/ld-ifunc/ifunc.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Check $CXX exists.
diff --git a/ld/testsuite/ld-elf/audit.exp b/ld/testsuite/ld-elf/audit.exp
index aad5339..83ee355 100644
--- a/ld/testsuite/ld-elf/audit.exp
+++ b/ld/testsuite/ld-elf/audit.exp
@@ -25,6 +25,12 @@ if ![is_elf_format] {
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# Check if compiler works
if { [which $CC] == 0 } {
return
diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp
index b2b6ca1..5620f3c 100644
--- a/ld/testsuite/ld-elf/compress.exp
+++ b/ld/testsuite/ld-elf/compress.exp
@@ -25,6 +25,12 @@ if ![is_elf_format] {
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# Check if compiler works
if { [which $CC] == 0 } {
return
diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp
index 572c704..529ebcc 100644
--- a/ld/testsuite/ld-elf/dwarf.exp
+++ b/ld/testsuite/ld-elf/dwarf.exp
@@ -29,6 +29,12 @@ if ![is_elf_format] {
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# Check if compiler works
if { [which $CC] == 0 } {
return
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index aac3acc..f38cd7b 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -25,6 +25,12 @@ if ![is_elf_format] {
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# Check to see if the C compiler works
if { [which $CC] == 0 } {
return
diff --git a/ld/testsuite/ld-elf/wrap.exp b/ld/testsuite/ld-elf/wrap.exp
index 4bf8faa..4a166be 100644
--- a/ld/testsuite/ld-elf/wrap.exp
+++ b/ld/testsuite/ld-elf/wrap.exp
@@ -25,6 +25,12 @@ if ![is_elf_format] {
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# Check if compiler works
if { [which $CC] == 0 } {
return
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index d7519b5..ffff2f1 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -41,6 +41,12 @@ if {!(([istarget "i?86-*-*"]
return
}
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
+ return
+}
+
# We need a working compiler. (Strictly speaking this is
# not true, we could use target specific assembler files).
if { [which $CC] == 0 } {
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index b13c540..b525acf 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -18,8 +18,8 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
-# Check to see if the C compiler works
-if { [which $CC] == 0 } {
+# Check to see if the C and C++ compilers work
+if { [which $CC] == 0 || [which $CXX] == 0 } {
return
}
--
Alan Modra
Australia Development Lab, IBM