2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ * gcc.dg/vect/vect.exp: Add clearcap_ldflags to DEFAULT_VECTCFLAGS
+ if supported.
+
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
* gcc.target/i386/avx512f-vcmppd-2.c: Add -std=c99.
Require c99_runtime.
* gcc.target/i386/avx512f-vcmpps-2.c: Likewise.
# These flags are used for all targets.
lappend DEFAULT_VECTCFLAGS "-ftree-vectorize" "-fno-vect-cost-model" "-fno-common"
+# If the linker used understands -M <mapfile>, pass it to clear hardware
+# capabilities set by the Sun assembler.
+# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
+set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcapv2.map"
+
+if ![check_no_compiler_messages mapfilev2 executable {
+ int main (void) { return 0; }
+} $clearcap_ldflags ] {
+ # If this doesn't work, fall back to the less capable v1 syntax.
+ set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcap.map"
+
+ if ![check_no_compiler_messages mapfile executable {
+ int main (void) { return 0; }
+ } $clearcap_ldflags ] {
+ unset clearcap_ldflags
+ }
+}
+
+if [info exists clearcap_ldflags] {
+ lappend DEFAULT_VECTCFLAGS $clearcap_ldflags
+}
+
# Initialize `dg'.
dg-init