]> git.proxmox.com Git - mirror_qemu.git/commit - configure
Partially revert "build: -no-pie is no functional linker flag"
authorJessica Clarke <jrtc27@jrtc27.com>
Thu, 5 Aug 2021 19:25:45 +0000 (20:25 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Nov 2021 14:57:20 +0000 (15:57 +0100)
commitffd205ef2901bd65fcfbd09a98c0ff7cfcec5e4d
treee0495b37320d4013291480d1ae187e01fdfa3857
parentaf7d106e3e57e0526d571063096e2ba3d7e6ab8a
Partially revert "build: -no-pie is no functional linker flag"

This partially reverts commit bbd2d5a8120771ec59b86a80a1f51884e0a26e53.

This commit was misguided and broke using --disable-pie on any distro
that enables PIE by default in their compiler driver, including Debian
and its derivatives. Whilst -no-pie is not a linker flag, it is a
compiler driver flag that ensures -pie is not automatically passed by it
to the linker. Without it, all compile_prog checks will fail as any code
built with the explicit -fno-pie will fail to link with the implicit
default -pie due to trying to use position-dependent relocations. The
only bug that needed fixing was LDFLAGS_NOPIE being used as a flag for
the linker itself in pc-bios/optionrom/Makefile.

Note this does not reinstate exporting LDFLAGS_NOPIE, as it is unused,
since the only previous use was the one that should not have existed. I
have also updated the comment for the -fno-pie and -no-pie checks to
reflect what they're actually needed for.

Fixes: bbd2d5a8120771ec59b86a80a1f51884e0a26e53
Cc: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Message-Id: <20210805192545.38279-1-jrtc27@jrtc27.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
configure