From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender4-pp-o92.zoho.com (sender4-pp-o92.zoho.com [136.143.188.92]) by sourceware.org (Postfix) with ESMTPS id C193B3858C36 for ; Thu, 7 Mar 2024 17:57:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C193B3858C36 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=zoho.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zoho.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C193B3858C36 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=136.143.188.92 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709834267; cv=pass; b=YD2X3wMGQfGSMNzi0qNFIMJBbHV++soJ5S6iUklWj2jsAcxxlPK8js9hWZzyZPNzAslRzh+xHQmoxZOYCY/a0d78IolxDRvzPbFbpYGKewIA68B32kAQksjv3zFn3zhJag1mOQ7ChhB6+t1ZK4tcpHRNPZwaVdh0accVpKnNa2o= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1709834267; c=relaxed/simple; bh=grBMvmOS9EG9HRzfXrzc7KwK+JCiLnWj2VQY1MNnH18=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=anjELlMRjlBtxDqOqJyW4l62P+A5iwutjdAbjjJquWXuk69JkMOKjDpsohIvoUokbtzpgYGOb+0gR5AHYz7CO/KT0u7I/4BLBM37yrhAHt4SBn7DyH8vDQ1fdAjgY4CP58XUL2je9/4Bjhz+C+XUZLmPQNaDhX8027PQbC4U//Q= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1709834263; cv=none; d=zohomail.com; s=zohoarc; b=bTdQegrVIIljMHKBFRHc5AQuRGcf6tQftbuqyIfWy+rGQJsD0UK9bP/KMOgxzuhHaPlxXdJu3AKodg7Xzc0t5/DancJeWPp/pzoZ5lGGCeGBZxRxgru+sUrt6eRaZJUUX75KZFJpG9/dcBqORH1IEx/+1n6mLbaHe9f8CQmhygA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709834263; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=NOU8JMzM79E+DmkgDd1NCOmb9k0zhYbJfsoPSh8Ia5U=; b=F1pi+tA40qOcL5E3lF4H2StFACPMBoTxzDRg3GYopvH6tUF1suE0ngm1dskL1XGzJoYVJXg8+3waUfbrUlHY8T2Ma8AFact6R1FhzJyMTVBPAyiKCFgp0oQH3P39pGhUmxtIvM4djfEyOIq5oZDxfOUTuPhHGkyuXQluE/8VAmI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1709834263; s=zm2022; d=zoho.com; i=bouanto@zoho.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID:Message-Id:Reply-To:Cc; bh=NOU8JMzM79E+DmkgDd1NCOmb9k0zhYbJfsoPSh8Ia5U=; b=TpMcIE8KIHMr7/yDIkwnIVNrIhOTgVGs5GZrlEYopgG2DJOBKx/Zv4lptamIoC7c fndyDKGT7QbkILdxR8bYOMFkKUS8Htbm4kE+052S259AGQx1nQcr6pLQstu0uY2EOv3 UCRmIND7kAPlpIaLz4e3Ura+B1tGQJkNkLeKl1qA= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1709834261650392.9298842533608; Thu, 7 Mar 2024 09:57:41 -0800 (PST) Message-ID: Date: Thu, 7 Mar 2024 12:57:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How do I enable -flto for Emacs nativecomp? Content-Language: en-US To: jit@gcc.gnu.org References: <87zfva0vyo.fsf@strawberrytea.xyz> From: Antoni Boucher In-Reply-To: <87zfva0vyo.fsf@strawberrytea.xyz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Feedback-ID: rr080112286092b00e5141a5c4d84e5b880000ae3bc0f62ee2c4396fa62924726d1f263b81b4e0f73d4acaa5db:zu080112266e581672da9cc26cd9e5739d0000e86bec9310f1cccaf3a8d5c7bbc76c4b68222e440b725170:rf0801122cbff90c6fe99cc1428cc48ab300007257b9b0fae78dcac324a1bf5401d93f99582e743349d9c41600a28a677f:ZohoMail X-ZohoMailClient: External X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: It seems to me that you forgot to enable the lto frontend. Please add it to --enable-languages when configuring the gcc build. Le 2024-03-07 à 12 h 53, StrawberryTea a écrit : > Hello libgccjit people, > > I'm trying to enable -flto for Emacs nativecomp. I have the following > Emacs patch I am applying through Gentoo > > diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el > index bb4552459dd..745612838cc 100644 > --- a/lisp/emacs-lisp/comp.el > +++ b/lisp/emacs-lisp/comp.el > @@ -193,8 +193,8 @@ native-comp-async-query-on-exit > :type 'boolean > :version "28.1") > > -(defcustom native-comp-compiler-options nil > +(defcustom native-comp-compiler-options '("-march=znver4" "-Ofast" "-g0" "-fno-finite-math-only" "-flto") > "Command line options passed verbatim to GCC compiler. > Note that not all options are meaningful and some options might even > break your Emacs. Use at your own risk. > affecting the assembler and linker are likely to be useful. > > However, Emacs fails to compile with the following error: > libgccjit.so: error: LTO support has not been enabled in this configuration > Assembler messages: > Error: can't open /var/tmp/portage/app-editors/emacs-30.0.9999/temp/libgccjit-1Escx1/fake.s for reading: No such file or directory > libgccjit.so: error: error invoking gcc driver > > This is a link to the entire build log: https://0x0.st/H7h2.txt > And this is one for the build environment: https://0x0.st/H7hL.txt > And this is the output of gcc --version --verbose: https://0x0.st/H7hp.txt > > I can pass options to the compiler and to the driver but I am not sure > what else to pass to enable LTO or if I need to recompile GCC, etc, etc. > > Sincerely, > StrawberryTea