]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/qemu-5.2.0-no-pie.patch
socat: Update to version 1.7.4.2
[people/pmueller/ipfire-2.x.git] / src / patches / qemu-5.2.0-no-pie.patch
CommitLineData
0e11a7c0
MT
1Recent binutils changes dropping unsupported options [1] caused a build
2issue in regard to the optionroms.
3
4 ld -m elf_i386 -T /<<PKGBUILDDIR>>/pc-bios/optionrom//flat.lds -no-pie \
5 -s -o multiboot.img multiboot.o
6 ld.bfd: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
7
8This isn't really a regression in ld.bfd, filing the bug upstream
9revealed that this never worked as a ld flag [2] - in fact it seems we
10were by accident setting --nmagic).
11
12Since it never had the wanted effect this usage of LDFLAGS_NOPIE, should be
13droppable without any effect. This also is the only use-case of LDFLAGS_NOPIE
14in .mak, therefore we can also remove it from being added there.
15
16[1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=983d925d
17[2]: https://sourceware.org/bugzilla/show_bug.cgi?id=27050#c5
18
19Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
20---
21 configure | 3 ---
22 pc-bios/optionrom/Makefile | 1 -
23 2 files changed, 4 deletions(-)
24
25diff --git a/configure b/configure
26index 3f823ed163..61c17c2dde 100755
27--- a/configure
28+++ b/configure
29@@ -2133,7 +2133,6 @@ EOF
30 # Check we support --no-pie first; we will need this for building ROMs.
31 if compile_prog "-Werror -fno-pie" "-no-pie"; then
32 CFLAGS_NOPIE="-fno-pie"
33- LDFLAGS_NOPIE="-no-pie"
34 fi
35
36 if test "$static" = "yes"; then
37@@ -2149,7 +2148,6 @@ if test "$static" = "yes"; then
38 fi
39 elif test "$pie" = "no"; then
40 CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS"
41- CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS"
42 elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
43 CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
44 CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS"
45@@ -6768,7 +6766,6 @@ echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
46 echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
47 echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
48 echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
49-echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
50 echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
51 echo "EXESUF=$EXESUF" >> $config_host_mak
52 echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
53diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
54index 084fc10f05..30771f8d17 100644
55--- a/pc-bios/optionrom/Makefile
56+++ b/pc-bios/optionrom/Makefile
57@@ -41,7 +41,6 @@ override CFLAGS += $(call cc-option, $(Wa)-32)
58
59 LD_I386_EMULATION ?= elf_i386
60 override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
61-override LDFLAGS += $(LDFLAGS_NOPIE)
62
63 all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
64
65--
662.29.2
67