From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A94B23858409; Thu, 4 Jan 2024 13:52:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A94B23858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704376320; bh=lV40v+vy4B2AzERgZOCqk17Ki26WxHtQZ5pt7JWuYR8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=axqgU/SACfdSZRt41rE+d9mfxYdO8r2bWmVDf2tSiJ8w7GVbKC2HCceSSqyzO14It aeo0LTH5uxcLBDmG297KA1UKPvPA8UCOQDihqB2QNPyQNKdhVhXZPSGtVpc9KyWGXn OiipQ2iR3HVpxTsZDhhwCte0k95PRUHaFmuq9Tko= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113233] LoongArch: target options from LTO objects not respected during linking Date: Thu, 04 Jan 2024 13:51:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113233 --- Comment #4 from Xi Ruoyao --- (In reply to Jan Hubicka from comment #3) > > Confirm. But option save/restore has been always implemented: > >=20 > > .section .gnu.lto_.opts,"",@progbits > > .ascii "'-fno-openmp' '-fno-openacc' '-fno-pie' '-fcf-protection" > > .ascii "=3Dnone' '-mabi=3Dlp64d' '-march=3Dloongarch64' '-mfpu=3D6= 4' '-m" > > .ascii "simd=3Dlasx' '-mcmodel=3Dnormal' '-mtune=3Dloongarch64' '-= flto" > > .ascii "'\000" > >=20 > > So -msimd=3Dlasx is correctly recorded. Not sure why it does not work. >=20 > With LTO we need to mix code compiled with different sets of options. > For this reason we imply for every function defition and optimization > and target attribute which record the flags. So it seems target > attribute is likely broken for this flag. Target attribute is not implemented for LoongArch. And I don't think it's a good idea to implement it in stage 3.=