From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9BD0F385700E for ; Mon, 21 Nov 2022 12:17:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9BD0F385700E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669033043; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=NyfRlNDBwfaCpHyDC8102P2BHC0B9B32nVcknu0fxBI=; b=NQELB3J7RXsSxcj/1HFDPXxNRDfrf9/iDp0sx4aRt50wwS3Wu8U7jHG1iGKC7+ov5eMbq7 hBZMycAR4dSwObqmRnz124JDumooD6L9+T0MO9z+yt1hlAeVqKO4DIbhmN+K8sc0QeHLB9 /Ie/p7K4rqiPzDD9TRRqcYV9bWssS7o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-460-WQvaebLCNI6fyUQZOl5vgg-1; Mon, 21 Nov 2022 07:17:22 -0500 X-MC-Unique: WQvaebLCNI6fyUQZOl5vgg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAADF185A794; Mon, 21 Nov 2022 12:17:21 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97DA42166B26; Mon, 21 Nov 2022 12:17:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2ALCHGbV028150 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 21 Nov 2022 13:17:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2ALCHFv6028149; Mon, 21 Nov 2022 13:17:15 +0100 Date: Mon, 21 Nov 2022 13:17:15 +0100 From: Jakub Jelinek To: Christophe Lyon Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] genmultilib: Fix sanity check Message-ID: Reply-To: Jakub Jelinek References: <20221121115915.374247-1-christophe.lyon@arm.com> MIME-Version: 1.0 In-Reply-To: <20221121115915.374247-1-christophe.lyon@arm.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 21, 2022 at 12:59:15PM +0100, Christophe Lyon wrote: > My previous patch to add a sanity check to genmultilib actually > checked the number of dirnames with the number of "sets of options" > rather than the number of options, thus breaking the build on some > targets. > > To avoid duplicating once more the loop that constructs the sed > patterns, this patch checks that the current dirname/osdirname is not > empty in the existing loops. > > Are there targets where: > if [ "$1" != "${opt}" ]; then > is "legally" executed with an empty $1? (and thus where this patch > would incorrectly trigger an error?) Dunno, let's try your patch. And if that triggers on something valid then the next step would be just to revert the sanity checks completely. > * genmultilib: Fix options and dirnames/osdirnames sanity > check. This won't get through the pre-commit hook, the second line should be indented just by tab and nothing further. Jakub