[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 12/13] configure: Add -Werror to PIE probe
From: |
Mark Cave-Ayland |
Subject: |
Re: [PULL 12/13] configure: Add -Werror to PIE probe |
Date: |
Tue, 7 Apr 2020 17:08:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 07/04/2020 16:51, Alex Bennée wrote:
> From: Richard Henderson <address@hidden>
>
> Without -Werror, the probe may succeed, but then compilation fails
> later when -Werror is added for other reasons. Shows up on windows,
> where the compiler complains about -fPIC.
>
> Signed-off-by: Richard Henderson <address@hidden>
> Signed-off-by: Alex Bennée <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> Message-Id: <address@hidden>
> Message-Id: <address@hidden>
>
> diff --git a/configure b/configure
> index 22870f38672..233c671aaa9 100755
> --- a/configure
> +++ b/configure
> @@ -2119,7 +2119,7 @@ if compile_prog "-Werror -fno-pie" "-no-pie"; then
> fi
>
> if test "$static" = "yes"; then
> - if test "$pie" != "no" && compile_prog "-fPIE -DPIE" "-static-pie"; then
> + if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE"
> "-static-pie"; then
> QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
> QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
> pie="yes"
> @@ -2132,7 +2132,7 @@ if test "$static" = "yes"; then
> elif test "$pie" = "no"; then
> QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS"
> QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS"
> -elif compile_prog "-fPIE -DPIE" "-pie"; then
> +elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
> QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
> QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
> pie="yes"
Note that even with this build fix, the native and cross-compiled Windows
binaries
crash upon startup unless --disable-pie is explicitly passed to configure (this
seems
like an unexpected side-effect of d2cd29e307: "configure: Do not force pie=no
for
non-x86").
Given that users such as Howard and https://bugs.launchpad.net/bugs/1870911 are
starting to notice, would it be best to set this configure option as the
default for
Windows builds for now?
ATB,
Mark.
- [PULL 10/13] linux-user: clean-up padding on /proc/self/maps, (continued)
- [PULL 10/13] linux-user: clean-up padding on /proc/self/maps, Alex Bennée, 2020/04/07
- [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Alex Bennée, 2020/04/07
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Aleksandar Markovic, 2020/04/10
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Richard Henderson, 2020/04/10
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Aleksandar Markovic, 2020/04/10
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Peter Maydell, 2020/04/10
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Aleksandar Markovic, 2020/04/10
- Re: [PULL 08/13] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal, Alex Bennée, 2020/04/11
[PULL 09/13] linux-user: factor out reading of /proc/self/maps, Alex Bennée, 2020/04/07
[PULL 12/13] configure: Add -Werror to PIE probe, Alex Bennée, 2020/04/07
- Re: [PULL 12/13] configure: Add -Werror to PIE probe,
Mark Cave-Ayland <=
[PULL 11/13] hw/core: properly terminate loading .hex on EOF record, Alex Bennée, 2020/04/07
[PULL 13/13] tcg/i386: Fix %r12 guest_base initialization, Alex Bennée, 2020/04/07
Re: [PULL for 5.0-rc2 00/13] various fixes, Peter Maydell, 2020/04/07