This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Run --gc-sections tests only if needed
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Fri, 7 Oct 2011 12:56:22 -0700
- Subject: PATCH: Run --gc-sections tests only if needed
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
I checked in this patch to run --gc-sections tests only if --gc-sections
is available.
H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b59aed7..592e7e3 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-elf/elf.exp: Run --gc-sections tests only if --gc-sections
+ is available.
+
2011-10-06 Alan Modra <amodra@gmail.com>
* ld-plugin/plugin-1.d, * ld-plugin/plugin-2.d, * ld-plugin/plugin-3.d,
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 866c866..b993c96 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -138,9 +138,11 @@ if ![isnative] {
return
}
-run_cc_link_tests {
- {"PR ld/13195" "-Wl,--gc-sections" ""
- {pr13195.c} {} "pr13195"}
+if [check_gc_sections_available] {
+ run_cc_link_tests {
+ {"PR ld/13195" "-Wl,--gc-sections" ""
+ {pr13195.c} {} "pr13195"}
+ }
}
set array_tests {