The patch above fixes the LTO issue, and once applied, I've been successfully building qemu with LTO with GCC: https://koji.fedoraproject.org/koji/taskinfo?taskID=76803353 (all archs) and with Clang : https://koji.fedoraproject.org/koji/taskinfo?taskID=76802978 (s390x only).
It's a compiler-agnostic patch, it works for any compiler that honors __attribute__((noinline)), as long as the compiler doesn't tries to do inter procedural optimization across non inlinable functions.
The patch above fixes the LTO issue, and once applied, I've been successfully building qemu with LTO with GCC: https:/ /koji.fedorapro ject.org/ koji/taskinfo? taskID= 76803353 (all archs) and with Clang : https:/ /koji.fedorapro ject.org/ koji/taskinfo? taskID= 76802978 (s390x only).
It's a compiler-agnostic patch, it works for any compiler that honors __attribute_ _((noinline) ), as long as the compiler doesn't tries to do inter procedural optimization across non inlinable functions.