From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 7C8EC385842A for ; Tue, 9 Apr 2024 12:52:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C8EC385842A Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C8EC385842A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712667162; cv=none; b=xE6wEmXCFUnIDsy7EEPijHNYmYoioL9MAbkFQiMrflrHl2EZUwVLUS1JdN0ldnH2lwk2CDTp1Wl4wsXFEVIWXEkgzvqh2OEJTPTGCeeA4Vfr2evlfZP2dO/jAvtYkL9h+0BHEtgYKAQvPQ8lS2kbWewnCdpvYed7v4O/BE8ac2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712667162; c=relaxed/simple; bh=8XLNJcSI9Q19N1qnJrzUjm+hXpKJwifuYqoz1hHGSKU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Ld+rOVapg0mc7KPKE054NOhXJAbRK9aFe0dMGUeeFDMIOcqh8jW6qSwrzEueGzbY8SEDsUealEi/0P7aUS9ixYRRJ95UhWvMl2dMiPOdovDPM2Ej470Y+LoRlpw57PJb32bATJyeaIrPVzEReUPM/1/CqyUYXnk4Yqx9lz2j5X0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 30D2A286308; Tue, 9 Apr 2024 14:52:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1712667158; h=from:from: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=b09FiLCNqMxCf9KcFguw1BY0N/QAbGBlY6eBHS8Kx+E=; b=cvhsaXB88IQ4B41CxZDJoleGxKJ+pzjvIUb8VXgaXWxc7G0128OpshinLvjzB5icX6nQiF hOGk+Tnj86STCZfKSgL4ObXhU1R3QSQHhrXuu0SbQcfQ0jqwsTE7rFohagmHmVqn8/tV+F O0JrdLZ3jFpuucc6jBZ321TxzQNsRWo= Date: Tue, 9 Apr 2024 14:52:38 +0200 From: Jan Hubicka To: Richard Biener Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [PATCH] lto/114655 - -flto=4 at link time doesn't override -flto=auto at compile time Message-ID: References: <20240409124949.31FE93858289@sourceware.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240409124949.31FE93858289@sourceware.org> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > The following adjusts -flto option processing in lto-wrapper to have > link-time -flto override any compile time setting. > > LTO-boostrapped on x86_64-unknown-linux-gnu, testing in progress. > > OK for trunk and branches? GCC 11 seems to be unaffected by this. > > Thanks, > Richard. > > PR lto/114655 > * lto-wrapper.cc (merge_flto_options): Add force argument. > (merge_and_complain): Do not force here. > (run_gcc): But here to make the link-time -flto option override > any compile-time one. Looks good to me. I am actually surprised we propagate -flto settings from compile time at all. I guess I never tried it since I never assumed it to work :) Honza