This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Make gdb.arch/i386-sse.exp work with GCC 4.x
- From: Mark Kettenis <kettenis at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Jul 2005 17:24:49 +0200
- Subject: [commit] Make gdb.arch/i386-sse.exp work with GCC 4.x
Turns out GCC 4.x refuses to compile gdb.arch/i386-sse.c unless you
specify -msse on the command line. It doesn't seem to hurt with GCC
3.3.5, so I'm guessing that every GCC that supports SSE asm's
recognizes -msse. GCC's that don't support SSE would fail to compile
this code anyway, so it doesn't really matter that they don't
recognize -msse. If we encounter GCC's that support SSE asm's but
don't grok -msse we can tweak things accordingly.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.arch/i386-sse.exp: Compile with -msse when using GCC.
Index: gdb.arch/i386-sse.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-sse.exp,v
retrieving revision 1.3
diff -u -p -r1.3 i386-sse.exp
--- gdb.arch/i386-sse.exp 21 Jun 2004 05:00:37 -0000 1.3
+++ gdb.arch/i386-sse.exp 12 Jul 2005 15:18:39 -0000
@@ -1,4 +1,4 @@
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,7 +34,17 @@ if ![istarget "i?86-*-*"] then {
set testfile "i386-sse"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+set additional_flags ""
+if [test_compiler_info gcc*] {
+ set additional_flags "additional_flags=-msse"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
unsupported "compiler does not support SSE"
return
}