From patchwork Fri Jul 4 10:55:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 367073 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 7982D1400B6 for ; Fri, 4 Jul 2014 20:55:23 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=wIw9Frl3YFz5jWhPS2LNZyRD60TBnK1mTXxAaUF1EOwf0i 85+pKifPqeDnoTWHuB883BMzEhntdSTPRCDSx+q2N45YsAgO6vgUj90UBJqeOovm uQjyEJtppXXvnO1s3xxbtJfz25KtJb2p9tD5BSzjZq3Se0WmlLIxWU2TLDhdc= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=RhYS23YMEgFhHqtLUcksVYr1Gto=; b=XUiYrMA3i+VaP7Th+TH1 LAnt0EEWwCp/NgFQtOmNOPPtCxIK8ylsSfxSwnHl9NhQEpkgqz6J0wUjP6Tzg8Lm GM0nulGhHMCA4StVZxbeQ+Rt7DkqCymtfvnJ0tcRLzNv8PZUZqLJz0bMXKWaJVuu K/CI/7JJXJRlOETewuocv14= Received: (qmail 16251 invoked by alias); 4 Jul 2014 10:55:09 -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 16099 invoked by uid 89); 4 Jul 2014 10:55:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, 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; Fri, 04 Jul 2014 10:55:06 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 04 Jul 2014 11:55:03 +0100 Received: from [10.1.208.33] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Jul 2014 11:55:00 +0100 Message-ID: <53B68804.5020901@arm.com> Date: Fri, 04 Jul 2014 11:55:00 +0100 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: gcc-patches Subject: [PATCH, aarch64] Correctly wire up --with-cpu and --with-arch (PR61714) X-MC-Unique: 114070411550307601 X-IsSubscribed: yes I noticed that although configure on aarch64 handles --with-arch and --with-cpu, they aren't passed on to the compilation -- instead you just get whatever the internal default is in the compiler back-end. This patch fixes that by wiring up the missing logic. 2014-07-04 Richard Earnshaw PR target/61714 * aarch64.h (OPTION_DEFAULT_SPECS): Define. Applied to trunk. It's trivial enough that I'll probably back-port it to 4.9 as well. R. diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index b95365a..080b23f 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -879,6 +879,13 @@ extern enum aarch64_code_model aarch64_cmodel; #define ENDIAN_LANE_N(mode, n) \ (BYTES_BIG_ENDIAN ? GET_MODE_NUNITS (mode) - 1 - n : n) +/* Support for a configure-time default CPU, etc. We currently support + --with-arch and --with-cpu. Both are ignored if either is specified + explicitly on the command line at run time. */ +#define OPTION_DEFAULT_SPECS \ + {"arch", "%{!march=*:%{!mcpu=*:-march=%(VALUE)}}" }, \ + {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" }, + #define BIG_LITTLE_SPEC \ " %{mcpu=*:-mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}"