]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix file-not-found error with clang in gdb.arch/i386-{avx,sse}.c
authorGary Benson <gbenson@redhat.com>
Fri, 29 May 2020 16:15:13 +0000 (17:15 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 29 May 2020 16:15:13 +0000 (17:15 +0100)
Clang fails to compile two testcases with the following error:
  fatal error: 'nat/x86-cpuid.h' file not found

This prevents the following testcases from executing:
  gdb.arch/i386-avx.exp
  gdb.arch/i386-sse.exp

Both testcases set additional_flags when building with GCC.
This commit causes the additional_flags to also be used when
building with clang.  Note that, while fixing the build, this
commit reveals several new failures when using clang to build
the testsuite.

gdb/testsuite/ChangeLog:

* gdb.arch/i386-avx.exp (additional_flags): Also set when
building with clang.
* gdb.arch/i386-sse.exp (additional_flags): Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/i386-avx.exp
gdb/testsuite/gdb.arch/i386-sse.exp

index ed56c819cb094752d3d1b7387b8d8f765e002b9c..667dbfddec0d0f69e0974a0b94e4ea290727227c 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-29  Gary Benson <gbenson@redhat.com>
+
+       * gdb.arch/i386-avx.exp (additional_flags): Also set when
+       building with clang.
+       * gdb.arch/i386-sse.exp (additional_flags): Likewise.
+
 2020-05-29  Gary Benson <gbenson@redhat.com>
 
        * gdb.cp/koenig.exp (prepare_for_testing): Add
index c52586d2e8aa643d42bdc391c604d3d175b49fec..ad7bf02e5ca87c101896a00493c0a293dd51a1de 100644 (file)
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 set additional_flags ""
-if [test_compiler_info gcc*] {
+if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
     set additional_flags "additional_flags=-mavx -I${srcdir}/.."
 }
 
index 1fd7cab2a4dd98613f02e487294d38aaa6af2e26..75cbfa531a7c9075f47048355cae9efabbcac956 100644 (file)
@@ -31,7 +31,7 @@ if [get_compiler_info] {
 }
 
 set additional_flags ""
-if [test_compiler_info gcc*] {
+if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
     set additional_flags "additional_flags=-msse -I${srcdir}/.."
 }