From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96B9B3858035; Thu, 11 Jan 2024 11:04:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96B9B3858035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704971059; bh=RG0Sujjhbrpq8CIdgNPVDhDUJtBR1QYI1A0vtBClLdo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IPc9GOPgtYhcfLjA15ejBJdDRg3qFgGVPT0qcUdq6eJre57zJQnad7IxPcBwmqyr4 JOe+KOhDsFUtztug3p54+NZId9xhmUtVNEVMZgiQGxYSLN/xTOVSdm8aWo0EcLjU3I Mw4qjqWVbAuQhVxPSa7Trd7z5wlcIBf97wDawulQ= From: "cvs-commit 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, 11 Jan 2024 11:04:17 +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: cvs-commit 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 #7 from GCC Commits --- The master branch has been updated by LuluCheng : https://gcc.gnu.org/g:ea2a9c76a1dcffbbec6e53655bef9236d3a8e691 commit r14-7134-gea2a9c76a1dcffbbec6e53655bef9236d3a8e691 Author: Yang Yujie Date: Thu Jan 11 09:07:10 2024 +0800 LoongArch: Implement option save/restore LTO option streaming and target attributes both require per-function target configuration, which is achieved via option save/restore. We implement TARGET_OPTION_{SAVE,RESTORE} to switch the la_target context in addition to other automatically maintained option states (via the "Save" option property in the .opt files). Tested on loongarch64-linux-gnu without regression. PR target/113233 gcc/ChangeLog: * config/loongarch/genopts/loongarch.opt.in: Mark options with the "Save" property. * config/loongarch/loongarch.opt: Same. * config/loongarch/loongarch-opts.cc: Refresh -mcmodel=3D state according to la_target. * config/loongarch/loongarch.cc: Implement TARGET_OPTION_{SAVE, RESTORE} for the la_target structure; Rename option conditions to have the same "la_" prefix. * config/loongarch/loongarch.h: Same.=