summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Edward W. Koenig2021-02-16 00:31:25 +0100
committer Matteo Bernardini2021-03-06 10:47:47 +0100
commitf2db3346af412957203c5e52ffb88c0a0e4270a3 (patch)
tree6136a084114786c0dc7679004f1fc7956ead65ad
parent149545a1b7566c3149290f48465c7fda803f6305 (diff)
downloadslackbuilds-qemu.tar.gz
system/qemu: Patch for binutils-2.36.x.qemu
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/qemu/linker-no-pie.patch40
-rw-r--r--system/qemu/qemu.SlackBuild5
2 files changed, 45 insertions, 0 deletions
diff --git a/system/qemu/linker-no-pie.patch b/system/qemu/linker-no-pie.patch
new file mode 100644
index 0000000000..615d9a4ffa
--- /dev/null
+++ b/system/qemu/linker-no-pie.patch
@@ -0,0 +1,40 @@
+diff --git a/configure b/configure
+index 3f823ed163..61c17c2dde 100755
+--- a/configure
++++ b/configure
+@@ -2133,7 +2133,6 @@ EOF
+ # Check we support --no-pie first; we will need this for building ROMs.
+ if compile_prog "-Werror -fno-pie" "-no-pie"; then
+ CFLAGS_NOPIE="-fno-pie"
+- LDFLAGS_NOPIE="-no-pie"
+ fi
+
+ if test "$static" = "yes"; then
+@@ -2149,7 +2148,6 @@ if test "$static" = "yes"; then
+ fi
+ elif test "$pie" = "no"; then
+ CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS"
+- CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS"
+ elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
+ CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
+ CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS"
+@@ -6768,7 +6766,6 @@ echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
+ echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
+ echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
+ echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
+-echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
+ echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
+ echo "EXESUF=$EXESUF" >> $config_host_mak
+ echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
+diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
+index 084fc10f05..30771f8d17 100644
+--- a/pc-bios/optionrom/Makefile
++++ b/pc-bios/optionrom/Makefile
+@@ -41,7 +41,6 @@ override CFLAGS += $(call cc-option, $(Wa)-32)
+
+ LD_I386_EMULATION ?= elf_i386
+ override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
+-override LDFLAGS += $(LDFLAGS_NOPIE)
+
+ all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
+
diff --git a/system/qemu/qemu.SlackBuild b/system/qemu/qemu.SlackBuild
index ed200a8ef5..e2e1bae37f 100644
--- a/system/qemu/qemu.SlackBuild
+++ b/system/qemu/qemu.SlackBuild
@@ -135,6 +135,11 @@ else
with_vnc="--disable-vnc"
fi
+# temp fix until upstream catches up.
+# ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
+# https://lists.gnu.org/archive/html/qemu-devel/2020-12/msg03684.html
+patch -p1 < $CWD/linker-no-pie.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \