From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE39A3858CD1; Mon, 1 Apr 2024 03:23:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE39A3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711941780; bh=zrWYh53A3i5+NZA4bMe2SN5SOBr0althypuWvFIlsDs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gBgWSROlqOGDG3VJIkQTuleq+6n1pxVjR0PgvC+IhY3O5fjH00J9sBcpniUuKK/2S GSWvq20iqDOpTc63a1IMPXmNywp+IAOVm/LuLUYwP+8KMme0QWHW+G5iHqNXaG6nG0 jXQLAUbXcpFpuMBj5TnGl40z5oSmmlGrFEcN+4zA= 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: Mon, 01 Apr 2024 03:23:00 +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 #9 from GCC Commits --- The releases/gcc-12 branch has been updated by LuluCheng : https://gcc.gnu.org/g:bf0b32d7929f8b4b15b21658d572b89ded03d8f8 commit r12-10303-gbf0b32d7929f8b4b15b21658d572b89ded03d8f8 Author: Lulu Cheng Date: Fri Mar 15 16:41:20 2024 +0800 LoongArch: gcc12: 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). PR target/113233 gcc/ChangeLog: * config/loongarch/genopts/loongarch.opt.in: Mark options with the "Save" property. * config/loongarch/loongarch-opts.cc (loongarch_update_gcc_opt_status): Update the value of the la_target to global_options. * config/loongarch/loongarch-opts.h (loongarch_update_gcc_opt_status): Add a function declaration. * config/loongarch/loongarch.cc (loongarch_option_override_internal): Call the function loongarch_update_gcc_opt_status. (loongarch_option_save): New functions. (loongarch_option_restore): Likewise. (TARGET_OPTION_SAVE): Define macro. (TARGET_OPTION_RESTORE): Likewise. * config/loongarch/loongarch.opt: Regenerate. (cherry picked from commit ea2a9c76a1dcffbbec6e53655bef9236d3a8e691)=