From patchwork Tue May 23 07:55:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 765801 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 3wX79q324nz9rxj for ; Tue, 23 May 2017 17:55:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kGM1Jc7I"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:references:cc:to:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=S8/ABeJFWgdQW28C5xIskj1/AwP1TnIM8ViSuhF4VYEe9s5vTFsV5 vMZBtIWuc6O3Ne+9pU9J3r5y0ZOLNUGpv9icvipRID16JPthHqzre2Hn0IG77eIB qJDsxcd5+ZG6t7N584H3ZCW+ptk8zp98i6X3lpzgU80EBxseYNoH6U= 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 :subject:references:cc:to:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=default; bh=SmhoRXembevqF2gTAcM2yLxhlCY=; b=kGM1Jc7ITJHaaYB/S2G39jgnf57D E4y8huRHYd7ybDegp40Me3k2/3FwAUT6FrHkEdQEps1U4amg1cBgPqOcojOHAA2K 83R+m3iN7NV21v9VrR/p0OoWSNgVgU2rBbzVIF46rwHFWhRXZalmDryGKd7sGs8I 1R+zI7yeIGl8dAo= Received: (qmail 57500 invoked by alias); 23 May 2017 07:55:12 -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 57477 invoked by uid 89); 23 May 2017 07:55:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=22052017, 22.05.2017 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.220) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 May 2017 07:55:08 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwR/bcHRirORRW3yMcVao= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (mail.hightec-rt.com [213.135.1.215]) by smtp.strato.de (RZmta 40.7 DYNA|AUTH) with ESMTPSA id v07987t4N7t8xEG (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 23 May 2017 09:55:08 +0200 (CEST) Subject: Re: [patch,avr] Simplify genmultilib.awk References: Cc: Denis Chertykov To: gcc-patches From: Georg-Johann Lay Message-ID: <5be5a85c-f0aa-1780-2ebb-57b88f9e1715@gjlay.de> Date: Tue, 23 May 2017 09:55:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: X-IsSubscribed: yes On 22.05.2017 13:47, Denis Chertykov wrote: > 2017-05-22 15:37 GMT+04:00 Georg-Johann Lay : >> This patch simplifies genmultilib.awk so that it generates >> MULTILIB_REQUIRED instead of the complement, MULTILIB_EXCEPTIONS. >> >> The current awk script dates back to the days when we mapped >> all the > 200 devices to the mmcu core and also parts of >> --help=target to list all devices were generated from avr-mmcus. >> That code rot is also cleaned up. Moreover, the structure now allows >> for simpler addition of new multilib options which are likely to come >> in the near future. >> >> The result of -print-multi-lib is: >> >> .; >> avr25;@mmcu=avr25 >> avr3;@mmcu=avr3 >> avr31;@mmcu=avr31 >> avr35;@mmcu=avr35 >> avr4;@mmcu=avr4 >> avr5;@mmcu=avr5 >> avr51;@mmcu=avr51 >> avr6;@mmcu=avr6 >> avrxmega2;@mmcu=avrxmega2 >> avrxmega4;@mmcu=avrxmega4 >> avrxmega5;@mmcu=avrxmega5 >> avrxmega6;@mmcu=avrxmega6 >> avrxmega7;@mmcu=avrxmega7 >> avrtiny;@mmcu=avrtiny >> tiny-stack;@msp8 >> avr25/tiny-stack;@mmcu=avr25@msp8 >> >> hence unchanged. >> >> Ok for trunk? >> >> Johann >> >> >> * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile" >> command option from $(AWK) call. >> * config/avr/genmultilib.awk: Simplify and rewrite so that it >> generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS. >> [FORMAT]: Remove handling of variable. >> * config/avr/t-multilib: Regenerate. > > Approved. > Please commit. Also committed the following change to make it work with less common awk implementations: https://gcc.gnu.org/r248357 Johann Index: config/avr/genmultilib.awk =================================================================== --- config/avr/genmultilib.awk (revision 248332) +++ config/avr/genmultilib.awk (working copy) @@ -123,7 +123,7 @@ BEGIN { have[opts] = 1 # Some special handling for the default mmcu: Remove a # leading "mmcu=avr2/" in order not to confuse genmultilib. - opts = gensub (/mmcu=avr2\//, "", 1, opts) + gsub (/^mmcu=avr2\//, "", opts) if (opts != "mmcu=avr2") m_required = m_required " \\\n\t" opts }