[Bug lto/114655] [12 Regression] -flto=4 at link time does not override -flto=auto from compile time

2024-05-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114655

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||12.3.1
 Resolution|--- |FIXED
  Known to fail||12.3.0

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug lto/114655] [12 Regression] -flto=4 at link time does not override -flto=auto from compile time

2024-05-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114655

--- Comment #5 from GCC Commits  ---
The releases/gcc-12 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:42a0393655d8e4662ba001c3759cf00b639eddb9

commit r12-10446-g42a0393655d8e4662ba001c3759cf00b639eddb9
Author: Richard Biener 
Date:   Tue Apr 9 14:25:57 2024 +0200

lto/114655 - -flto=4 at link time doesn't override -flto=auto at compile
time

The following adjusts -flto option processing in lto-wrapper to have
link-time -flto override any compile time setting.

PR lto/114655
* lto-wrapper.cc (merge_flto_options): Add force argument.
(merge_and_complain): Do not force here.
(run_gcc): But here to make the link-time -flto option override
any compile-time one.

(cherry picked from commit 32fb04adae90a0ea68e64e8fc3cb04b613b2e9f3)