From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by sourceware.org (Postfix) with ESMTPS id E49193857723 for ; Thu, 7 Mar 2024 17:53:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E49193857723 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=strawberrytea.xyz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=strawberrytea.xyz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E49193857723 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709834038; cv=none; b=xz2X/YltBGuOBWxwPySinlrIQTydD6p/w+Js/EBHg0xYXEHjmDZ6PJ+asTd61Jsk04jrKPev/LbeMXorAJuGvhbfUQRjfbrzg15ZqRYoxc3NoCAO5P5aruD7kwQTHEnqWemrG2V7Hr1ORG13CfLgX2kDd8Bl4glJauXr/h0mnDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709834038; c=relaxed/simple; bh=ugMRY73glj+lKQ8QS3Is/HrgPJubDljmkYNKf09jepY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=xhVlppNMZNJxwPNuylHd2qcPN/3RmbHYR7eZ5DU3oY6bpfu9bRe5IgZOnhKOt190CTmhNhMsPBz77mFKudDNbFVg39hY5cRDWRIx4rvcFsQLi62Qk5D9WKJo5fwkbBzvqLYTBfyUaWx1fwd4pDju/Fc7EVDoiULDp5JCt7Vzt2U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 576C632000D9; Thu, 7 Mar 2024 12:53:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Mar 2024 12:53:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:content-type:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1709834032; x=1709920432; bh=t2+vRe+UmA llBSxMEA90pSg6iEb2dTKa0yCApa4cX/U=; b=ouu/u9UzWvcU3HoEb59Uc4XKpb 4q6L08/YG09dsmBy9JH294Fx9nW7wbcJcFEjGqLFR3/L55BvrNXYnKLDSU0DZZwU S/6abPiC8fTaAGZGj6pHyfbwuAolK0bPNv6JOSFSbPTRyh7fHD+C2Er+/HJtdKer gvzmXUEpDm6p5Y3kxxGHPqCi7hTydUC80ufDv80OMoK9hs5B883abDV0g/KQchkN vpFNbMGEQ8bAXNhVT3NFFNmojj1uNmvBrTTwbogQC5xSCp3UbBBGvGjolKpjGA1j f4b4fM3mFsQbWpqyDEBzbgpUzliQXQjCHLWrAEKFMbhZjFqjwR2KvwCTkUBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1709834032; x=1709920432; bh=t2+vRe+UmAllBSxMEA90pSg6iEb2dTKa0yC Apa4cX/U=; b=giOiAkK7BrNP1yKFMyouSXEw2c/iIRNmbBUXnyRd69B13TwiWjA d858MrUWk6gsN53H1WCb9x/Axuv+2BDld2aioUDg1fmotxjI4OYDJAmDLKYqBUPb YBdwXqu27FI3FfujeMtaNCCqfdkC3XztRyaOiYjRSEJQMrPo/+b/R2rsWLVJyJeZ sbyGMM+0CdX57fDIF5Bxf/OL9D4n7nhyjNjJKYFwcAX330Xsz3WbV2ZbjNIPvG4a /7mMjuV27YjnvmM22Jw8W2WqNHQe1sVATFdwa1FLvPeLfqsqchkojrI4PyByUsZw koFd99IUEP8tabRLdPFP1ft02uAWnVjjWbw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieefgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpefhvf fufgffkfggtgesthdtredttdertdenucfhrhhomhepufhtrhgrfigsvghrrhihvfgvrgcu oehlohhokhesshhtrhgrfigsvghrrhihthgvrgdrgiihiieqnecuggftrfgrthhtvghrnh eptedvgeetteeihfelfedtiedtudfgteevfedvgeduffffudeihfffudelteekheeinecu ffhomhgrihhnpedtgidtrdhsthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlohhokhesshhtrhgrfigsvghrrhihthgvrgdrgiihii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Mar 2024 12:53:52 -0500 (EST) From: StrawberryTea To: jit@gcc.gnu.org Subject: How do I enable -flto for Emacs nativecomp? User-Agent: mu4e 1.12.0; emacs 30.0.50 Date: Thu, 07 Mar 2024 11:53:51 -0600 Message-ID: <87zfva0vyo.fsf@strawberrytea.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_INFOUSMEBIZ,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,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: 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