From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 7504A3840C1B for ; Fri, 29 May 2020 16:16:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7504A3840C1B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-289-GF-9eVZkNpWVSmSgXiXbag-1; Fri, 29 May 2020 12:16:04 -0400 X-MC-Unique: GF-9eVZkNpWVSmSgXiXbag-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A0BC18FF66A for ; Fri, 29 May 2020 16:16:03 +0000 (UTC) Received: from blade.nx (ovpn-114-240.ams2.redhat.com [10.36.114.240]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C6A110016E8 for ; Fri, 29 May 2020 16:16:03 +0000 (UTC) Received: from blade.com (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 29F88816CCA9 for ; Fri, 29 May 2020 17:16:02 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Fix file-not-found error with clang in gdb.arch/i386-{avx, sse}.c Date: Fri, 29 May 2020 17:16:01 +0100 Message-Id: <1590768961-23868-1-git-send-email-gbenson@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-16.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 16:16:07 -0000 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 | 6 ++++++ gdb/testsuite/gdb.arch/i386-avx.exp | 2 +- gdb/testsuite/gdb.arch/i386-sse.exp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp index c52586d..ad7bf02 100644 --- a/gdb/testsuite/gdb.arch/i386-avx.exp +++ b/gdb/testsuite/gdb.arch/i386-avx.exp @@ -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}/.." } diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp index 1fd7cab..75cbfa5 100644 --- a/gdb/testsuite/gdb.arch/i386-sse.exp +++ b/gdb/testsuite/gdb.arch/i386-sse.exp @@ -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}/.." } -- 1.8.3.1