From patchwork Fri Jun 9 12:53:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 103504 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp198957qgd; Fri, 9 Jun 2017 06:05:39 -0700 (PDT) X-Received: by 10.98.61.141 with SMTP id x13mr30315053pfj.103.1497013539111; Fri, 09 Jun 2017 06:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497013539; cv=none; d=google.com; s=arc-20160816; b=qrrjyrFw68zn1nlQNz+HgegBJgSYNp+8I+K/W0wpEq91MQWyfojU47UePy61Vru7qR e8SqX9Ro7rps5/LcZeI14JLPkuqqFL0wp8cxCqnksGqRdqwUgILKdNXsUWhTQMdL+vsO 5PIDzuWbjQ2yyIRBS45rgRLQ7VdO0p/CXIHvR+CKo+uiRnmAQQdUGJOoEsV9OVimnj05 JMiPUTxYUOftPZjRqW6Q93melDZeuOk2RJAsY4T0EYp+c9gJemUQuFKvfHq5ikIXN8WY vwKOH73r0dmijPGqE/EU4UcLkUt0FL6z2Bzl1zOGo7VtxI5vPH1H7txprsBf1QuiOOxs hZXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=SgYJbd7aaRcBuC2XmrvNdq0yUFWOyj3vSd6JzqXZEUM=; b=kboeNTdV0BtorUKAq7Sym26/jDBXoigje9lwKGq/EJ4A6IPoInahBm0xNHtAf4TblZ k3iYPpNtHbh914fkmDpmKLpcgt8CuipawDO0kVJOvtGmdG8UGlOfoMfDLp/Q3Pkk81L9 u1iKmpOHOoViPWeTEY1cxb5VLAl1wDuMRu2AL4K0pCYIoxVKbTPSVyGbHwYzdCUJz3s4 FIqCzP0DUOQeyMLVvuVFGQ+kISYgFQfH+IlzLkTQ5RCVjLlfWp76RaxjaSgBRs8G8Thj 7gDCyys5tjV/ykjEJMjDjJGT+J0/DEdGSE+fu8wnV97K5Y1tjSXWTK1YytaxUZElGV6j JKag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-455548-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-455548-patch=linaro.org@gcc.gnu.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id j2si957376pfe.51.2017.06.09.06.05.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 06:05:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-455548-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-455548-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-455548-patch=linaro.org@gcc.gnu.org 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:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:mime-version:content-type; q=dns; s= default; b=sb1/T0VK8z6y21Hd7s/5yLP7gWISpCcII7cpboXOkyOghJqifkZCX hvfqGQYaOQhUtqiVWGJ/ne5pmO2FPWSHTI8HFUeBw2Ue0e+1t6pt8ECXDpNKop1v 1JYbE/68hHYQjY+Qzkt2mR/ZxEfRNtimDxM1nttLOeisN062igb+78= 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:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:mime-version:content-type; s=default; bh=GqGxzdgsyAHz9T5tBk67aSBGIp4=; b=lbuJXMeXPkQE04oWK8Hu7vj44/jw OWn9kZyI9Uct5Tdb0ysMLC/8ixO2N8eqyWu3iIj/WhiQm+oKMB9HxZ9Gy02cxBZO 69ndcedoEzpinmOI4JoDBHG2ZI+BSy0lzRaN+TCse5K69xsbe0eEm923uCw/++5r TcBM3+H/At3D+G4= Received: (qmail 101923 invoked by alias); 9 Jun 2017 12:55:04 -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 95042 invoked by uid 89); 9 Jun 2017 12:54:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=pulling, Hx-languages-length:1461 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Jun 2017 12:54:53 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJJQg-0007Yv-So for gcc-patches@gcc.gnu.org; Fri, 09 Jun 2017 08:54:20 -0400 Received: from foss.arm.com ([217.140.101.70]:47128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJJQg-0007Te-MK for gcc-patches@gcc.gnu.org; Fri, 09 Jun 2017 08:54:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 639ED1650; Fri, 9 Jun 2017 05:54:18 -0700 (PDT) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E69933F3E1; Fri, 9 Jun 2017 05:54:17 -0700 (PDT) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [PATCH 13/30] [arm] Force a CPU default in the config args defaults list. Date: Fri, 9 Jun 2017 13:53:42 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.140.101.70 Currently if the user does not specify a default CPU or architecture the compiler provieds no default values in the spec defaults. We can try to work from TARGET_CPU_DEFAULT but pulling that into the driver is a bit crufty and doesn't really work well with the general spec-processing model. A better way is to ensure that with_cpu is always set appropirately during configure. To avoid problems with the multilib fragment processing we defer this until after we have processed any required fragments before selecting the default. * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu are set after handling multilib fragments. Set target_cpu_default2 from with_cpu. --- gcc/config.gcc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 4d0f7ec..8524a5f 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3859,6 +3859,8 @@ case "${target}" in TM_MULTILIB_CONFIG="$with_multilib_list" fi fi + target_cpu_cname=${target_cpu_cname:-arm6} + with_cpu=${with_cpu:-$target_cpu_cname} ;; fr*-*-*linux*) @@ -4492,11 +4494,12 @@ case ${target} in ;; arm*-*-*) - if test x$target_cpu_cname = x + if test x$with_cpu = x then - target_cpu_default2="\\\"arm6\\\"" + echo "Don't know the target cpu" 1>&2 + exit 1 else - target_cpu_default2="\\\"$target_cpu_cname\\\"" + target_cpu_default2="\\\"$with_cpu\\\"" fi ;;