From patchwork Mon Dec 30 02:09:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Terry Guo X-Patchwork-Id: 305692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 05D062C00B9 for ; Mon, 30 Dec 2013 13:09:43 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=WCbjpy9MNZnrHAyV74qbU3xgcEzTaQryVQUWVG7wYhzjvgaz4s05N KQgL9xW0+e2dalUb0SB3hsuDf32q4cReqpwJW7fRDmgHGxZeFAjPSm4nw+IMxURc rBj/EfHmC9IuvdnBKBUN89wEwS0zDxV0pHR3Ceftk9MuHs1Zjb7AnY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=OLhJOnas8xt3GkqtBblC1Jtz/lA=; b=XtDazrAxJ6gOYwf/ES3y S3V9NJNlB4THxj2VBpfvWY7HpuTx8EYUkvsAmGe9sYoCKxTSXC+OdzKd4ToIi4QB o9jbcz/oCKhGsQncDlQLMzPfTrW6RAnut+4POhVULblcwGGieU6TtiGcnHKQhhZM JADD1F69cFAS22zP4W6kZdw= Received: (qmail 22346 invoked by alias); 30 Dec 2013 02:09:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 22336 invoked by uid 89); 30 Dec 2013 02:09:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Dec 2013 02:09:28 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 30 Dec 2013 02:09:25 +0000 Received: from shawin053 ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Dec 2013 02:09:23 +0000 From: "Terry Guo" To: Subject: [Patch, ARM] check value of --with-arch against arm-arches.def Date: Mon, 30 Dec 2013 10:09:21 +0800 Message-ID: <000001cf0504$291c1cb0$7b545610$@arm.com> MIME-Version: 1.0 X-MC-Unique: 113123002092500201 X-IsSubscribed: yes Hi There, This patch intends to check value of --with-arch against the arm-arches.def, rather than current solution that use hard coded things in config.gcc. Tested with various values of --with-arch and it works. Is it ok to trunk? BR, Terry 2013-12-30 Terry Guo * config.gcc (arm*-*-*): Check --with-arch against arm-arches.def. diff --git a/gcc/config.gcc b/gcc/config.gcc index 24dbaf9..7c4a0b9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3455,19 +3455,17 @@ case "${target}" in fi done - case "$with_arch" in - "" \ - | armv[23456] | armv2a | armv3m | armv4t | armv5t \ - | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \ - | armv7 | armv7-a | armv7-r | armv7-m | armv8-a \ - | iwmmxt | ep9312) - # OK - ;; - *) - echo "Unknown arch used in --with-arch=$with_arch" 1>&2 - exit 1 - ;; - esac + # See if it matches any of the entries in arm-arches.def + if [ x"$with_arch" = x ] \ + || grep "^ARM_ARCH(\"$with_arch\"," \ + ${srcdir}/config/arm/arm-arches.def \ + > /dev/null; then + # OK + true + else + echo "Unknown arch used in --with-arch=$with_arch" 1>&2 + exit 1 + fi case "$with_float" in "" \