[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] configure: Don't warn about lack of PIE on macOS
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH] configure: Don't warn about lack of PIE on macOS |
Date: |
Tue, 23 Jun 2020 13:48:57 +0100 |
On Mon, Jun 01, 2020 at 03:42:57PM +0300, Roman Bolshakov wrote:
> ld64 is making PIE executables for 10.7 and above by default, as
> documented in ld(1).
>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
> configure | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index af2ba83f0e..6dddbca4b2 100755
> --- a/configure
> +++ b/configure
> @@ -2137,6 +2137,8 @@ elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
> QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
> QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
> pie="yes"
> +elif test "$darwin" = "yes"; then
> + pie="yes"
Hi Roman,
I'm wondering why the elif above doesn't detect the presence of PIE
automatically?
elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
pie="yes"
Can this code be tweaked to cover macOS too?
Also CCing Peter Maydell in case he wants to merge this patch directly
into qemu.git.
Stefan
signature.asc
Description: PGP signature