From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nsstlmta06p.bpe.bigpond.com (nsstlmta06p.bpe.bigpond.com [203.38.21.6]) by sourceware.org (Postfix) with ESMTPS id E6489385800E for ; Wed, 15 Jun 2022 10:40:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6489385800E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=contemporary.net.au Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=contemporary.net.au Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep06p-svc.bpe.nexus.telstra.com.au with ESMTP id <20220615104023.XLAF6323.nsstlfep06p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com>; Wed, 15 Jun 2022 20:40:23 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedruddvuddgvdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeevhhhrihhsucflohhhnhhsuceotghhrhhishestghonhhtvghmphhorhgrrhihrdhnvghtrdgruheqnecuggftrfgrthhtvghrnhepgfeutdejudehieetkeeftdejjefhheekgffhhffgheeggffhheeuvdehhfegieelnecukfhppedufeelrddufedtrddvgeehrddvtddtpdduvddtrdduhedurddukedvrdegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepmhgrihhlrdgtohhnthgvmhhpohhrrghrhidrnhgvthdrrghupdhinhgvthepudefledrudeftddrvdeghedrvddttddpmhgrihhlfhhrohhmpegthhhrihhssegtohhnthgvmhhpohhrrghrhidrnhgvthdrrghupdhnsggprhgtphhtthhopedvpdhrtghpthhtohepghgttgesghgttgdrghhnuhdrohhrghdprhgtphhtthhopehrihgthhgrrhgurdhguhgvnhhthhgvrhesghhmrghilhdrtghomh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean Received: from mail.contemporary.net.au (139.130.245.200) by smtp.telstra.com (5.8.806) id 626F2E130998DB71; Wed, 15 Jun 2022 20:40:23 +1000 Received: from [172.16.100.113] ([120.151.182.4]) (authenticated bits=0) by mail.contemporary.net.au (8.15.2/8.15.2) with ESMTPSA id 25FAeKT1078292 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 15 Jun 2022 20:40:20 +1000 (EST) (envelope-from chris@contemporary.net.au) X-Authentication-Warning: corb.contemporary.net.au: Host [120.151.182.4] claimed to be [172.16.100.113] Message-ID: <841b9a27-e591-675b-68ad-6f0774587464@contemporary.net.au> Date: Wed, 15 Jun 2022 20:40:14 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails Content-Language: en-US To: Richard Biener Cc: GCC Development References: From: Chris Johns In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 10:40:33 -0000 On 15/6/22 7:56 pm, Richard Biener wrote: > On Wed, Jun 15, 2022 at 11:27 AM Chris Johns wrote: >> >> Hi, >> >> I am trying to build a cross-compiler on FreeBSD with --enable-lto because a >> chip vendor is using it when building controller software that is part of a system. >> >> The build I am using symlinks gmp, mpfr etc as source so they are built as part >> of the gcc build. >> >> The mpfr package is reporting ... >> >> build/mpfr/config.log:configure:17408: error: Link Time Optimisation is not >> supported (see config.log for details). >> >> Should the enable option be passed to these packages? > > You shouldn't need --enable-lto, it's effect (adding lto to the set of compiled > languages) is already the default. You can use --enable-languages=default,lto > to achieve the same effect without getting the mpfr side-effect. Oh that is great and I had no idea this is how it is controlled. I have rebuilt my compiler and it is now building. Nice. >> I have assumed the enable option for LTO is for the cross compiler and not the >> host gcc? > > it's for the built GCC, enabling LTO support (but not for enabling > building GCC itself > with LTO). It now makes sense. I will also update the RTEMS tools builds. Thanks Chris