From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id 3353838708D3 for ; Mon, 11 Jan 2021 12:58:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3353838708D3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qk1-x732.google.com with SMTP id c7so14471936qke.1 for ; Mon, 11 Jan 2021 04:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5mCItDHMUJ3EpopSqqHONFPDUh+ocWMlqwHtp/KDZzQ=; b=OrDBTFoEKNQQzeWeMgEhq8Y8uid7AP4MHtbBvQ1Dd5Sc9YPaNDK2+Ohue6JbY2414v 7PrifoIrt/ybTjMhibbGMTQAIt4GARHqE3WqtvJB1BD5vr1gjvGrAo1DY8eCySWLL5h1 yc6ZoIJyZzMoI2ULjb8vi+cpAJKUZImwngMbAOmSg8eXjnKYzm7rqeB1Mhxs6GxYmPGP yFANeANBbKOrDvFOcw8oi3S/irS++xQMRHuPjxqJI9jhLI2d/NN75XB6jMjqJISzdkzE nNr1PGM3s5n4kBh+DTyqlZD2uBn2OT4gvw5sowiVi//YmLYqutai/9ubInXsDLu3cwtT RSTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5mCItDHMUJ3EpopSqqHONFPDUh+ocWMlqwHtp/KDZzQ=; b=i6RPn9mROmfrCRmFNDc4Qr0ri1hICMnaVQthRPAQ7UxbNNSxtX8cQdDY56lNenmoJy fZ4tOQPxmDROALUJm1CfiOTL+VKKKfCYvqKXgQtfzdMtPjF5QlhHtw1cME9Slh3OsqKr Bj+Ne2I8BLHILhDy4ACNsJZwBKR17JihzwIcOewGYmLZfMwavzV4Fq3zO6KYkjAb3KYc N3u7N/9uFBvf3/Ik1QO6BbiiaVTz1JRAk9VQcrGAOrUr3FawJ10CGpMo7z90Rcz1oJO8 7vkUyaftANH0uVwhcUoPe6KI3CK/kaBScuM0R/lGZQxCmZG3XRS7PRjYRDFp6K4JmfhO 18iQ== X-Gm-Message-State: AOAM533bENSe2bg7Cg6Or1pS/19aDCPYWzU780T8S5vT5XRIKqNFc+Az oJf0JZbR4uUxfQNTEZTV/xI= X-Google-Smtp-Source: ABdhPJxBxmt0NjkuO01hEpDA/oQtzKSNrCbeZIpzOqiUW1yPIgRBNrCVboTEHGUTRlT9YeO6Oc+fUw== X-Received: by 2002:a05:620a:2199:: with SMTP id g25mr16173953qka.333.1610369890659; Mon, 11 Jan 2021 04:58:10 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102:506c:decd:134c:5163? ([2620:10d:c091:480::1:2e6]) by smtp.googlemail.com with ESMTPSA id j142sm8529799qke.117.2021.01.11.04.58.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 04:58:09 -0800 (PST) Sender: Nathan Sidwell Subject: Re: [PATCH] Fix UBSAN bootstrap To: Jakub Jelinek , =?UTF-8?Q?Martin_Li=c5=a1ka?= Cc: gcc-patches@gcc.gnu.org References: <20210111103849.GV1034503@tucnak> From: Nathan Sidwell Message-ID: Date: Mon, 11 Jan 2021 07:58:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20210111103849.GV1034503@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 12:58:12 -0000 On 1/11/21 5:38 AM, Jakub Jelinek wrote: > On Mon, Jan 11, 2021 at 11:26:42AM +0100, Martin Liška wrote: >> Problem here was that GCC-related options are not applied in stage2 (and later stages). >> It's caused by fact that CXX is xg++ in stage2 (and later stages). >> Fixed with the following patch. >> >> Ready to be installed? >> Thanks, >> Martin >> >> libcody/ChangeLog: >> >> PR bootstrap/98414 >> * Makefile.in: In stage2 in UBSAN bootstrap the CXX is called >> xg++, so findstring g++ should be used instead of exact string >> comparison. > > I think better would be to follow gcc/{configure*,Make*} practice and don't > judge compilers based on names, but on what they actually are and test > perhaps not each individual flag separately, but their whole sets together. Just so you know, it checks the name, because Clang identifies as GCC, but can be insufficiently GCC-like at times (not here though). I think replacing more bits with libcpp configure goup is probably the better. nathan -- Nathan Sidwell