Package: qemu / 1:10.0.0+ds-2~bpo12+2

qboot-Disable-LTO-for-ELF-binary-build-step.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From e5fe12ebb41f4e24340c8c543231095482b6a9d8 Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Wed, 6 Jul 2022 10:10:55 +0200
Subject: [PATCH] qboot: Disable LTO for ELF binary build step

If LTO is enabled by default qboot fails to link as it exposes
a few issues that break the build:

  ../code16.c: Assembler messages:
  ../code16.c:37: Error: redundant addr32 prefix
  ../code16.c:27: Error: redundant addr32 prefix
  ../code16.c:18: Error: redundant addr32 prefix

Until fixed suppress this behavior by adding -fno-lto to the end
of the linker flags.

Fixes: #31

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Forwarded: yes
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Origin: https://gitlab.com/bonzini/qboot/-/merge_requests/32
Bug: https://gitlab.com/bonzini/qboot/-/issues/31
Last-Update: 2022-07-06
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/roms/qboot/meson.build b/roms/qboot/meson.build
index d060f75..a9792e8 100644
--- a/roms/qboot/meson.build
+++ b/roms/qboot/meson.build
@@ -19,6 +19,7 @@ link_args = ['-nostdlib', '-m32']
 link_args += cc.get_supported_link_arguments('-Wl,--build-id=none')
 link_args += '-Wl,-T' + meson.current_source_dir() / 'flat.lds'
 link_args += cc.get_supported_link_arguments(['-no-pie'])
+link_args += cc.get_supported_link_arguments(['-fno-lto'])
 
 elf = executable(
   'bios.bin.elf',
-- 
2.37.0