From patchwork Wed Jul 1 13:58:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 7449 Received: (qmail 89337 invoked by alias); 1 Jul 2015 13:58:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 89195 invoked by uid 89); 1 Jul 2015 13:58:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f179.google.com Received: from mail-pd0-f179.google.com (HELO mail-pd0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 01 Jul 2015 13:58:46 +0000 Received: by pdjd13 with SMTP id d13so26442760pdj.0 for ; Wed, 01 Jul 2015 06:58:44 -0700 (PDT) X-Received: by 10.70.133.170 with SMTP id pd10mr55394537pdb.127.1435759124373; Wed, 01 Jul 2015 06:58:44 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id sc7sm2417503pbb.85.2015.07.01.06.58.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jul 2015 06:58:43 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 05/11] Adjust gdb.multi tests for aarch64 Date: Wed, 1 Jul 2015 14:58:25 +0100 Message-Id: <1435759111-22856-6-git-send-email-yao.qi@linaro.org> In-Reply-To: <1435759111-22856-1-git-send-email-yao.qi@linaro.org> References: <1435759111-22856-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes Multi-arch related tests under gdb.multi are to compile programs with the same compiler but different compiler options (-m64 vs -m32). However, different compilers are needed to compile both aarch64 program and arm (aarch32) program. This patch is to adjust these test cases to compile programs in different modes with different compiler. When we use gcc for arm-linux target, its file name can be different, arm-linux-gnueabihf-gcc, arm-linux-gnueabi-gcc, or arm-none-linux-gnueabi-gcc, so I add a variable ARM_CC_FOR_TARGET, so that user can set the name of gcc for arm-linux target on aarch64, like: $ make check RUNTESTFLAGS='ARM_CC_FOR_TARGET=arm-linux-gnueabihf-gcc multi-arch.exp' gdb/testsuite: 2015-06-24 Yao Qi * gdb.multi/multi-arch-exec.exp: Set march1 and march2 to "" if target is aarch64. If target is aarch64, set compiler=${ARM_CC_FOR_TARGET} if it exists. * gdb.multi/multi-arch.exp: Likewise. --- gdb/testsuite/gdb.multi/multi-arch-exec.exp | 18 +++++++++++++++++- gdb/testsuite/gdb.multi/multi-arch.exp | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp index 4532108..67020d9 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp @@ -44,6 +44,9 @@ set binfile2 [standard_output_file ${exec2}] if [istarget "s390*-*-*"] { set march1 "-m64" set march2 "-m31" +} elseif { [istarget "aarch64*-*-*"] } { + set march1 "" + set march2 "" } else { set march1 "-m64" set march2 "-m32" @@ -57,8 +60,21 @@ if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \ return -1 } +set options [list debug nowarnings] + +if { [istarget "aarch64*-*-*"] } { + if {[info exists ARM_CC_FOR_TARGET]} { + lappend options "compiler=${ARM_CC_FOR_TARGET}" + } else { + unsupported "ARM compiler is not known" + return -1 + } +} else { + lappend options "additional_flags=${march2}" +} + if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" \ - [list debug nowarnings additional_flags=${march2}]] } { + $options] } { return -1 } diff --git a/gdb/testsuite/gdb.multi/multi-arch.exp b/gdb/testsuite/gdb.multi/multi-arch.exp index 22ad4da..4b255ee 100644 --- a/gdb/testsuite/gdb.multi/multi-arch.exp +++ b/gdb/testsuite/gdb.multi/multi-arch.exp @@ -44,6 +44,9 @@ set binfile2 [standard_output_file ${exec2}] if [istarget "s390*-*-*"] { set march1 "-m64" set march2 "-m31" +} elseif { [istarget "aarch64*-*-*"] } { + set march1 "" + set march2 "" } else { set march1 "-m64" set march2 "-m32" @@ -54,8 +57,21 @@ if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \ return -1 } +set options [list debug nowarnings] + +if [istarget "aarch64*-*-*"] { + if {[info exists ARM_CC_FOR_TARGET]} { + lappend options "compiler=${ARM_CC_FOR_TARGET}" + } else { + unsupported "ARM compiler is not known" + return -1 + } +} else { + lappend options "additional_flags=${march2}" +} + if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" \ - [list debug nowarnings additional_flags=${march2}]] } { + $options]} { return -1 }