Skip to content

Commit eca7a8e

Browse files
rth7680stsquad
authored andcommitted
configure: Add -Werror to PIE probe
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 <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Message-Id: <[email protected]>
1 parent 58d5e74 commit eca7a8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ if compile_prog "-Werror -fno-pie" "-no-pie"; then
21192119
fi
21202120

21212121
if test "$static" = "yes"; then
2122-
if test "$pie" != "no" && compile_prog "-fPIE -DPIE" "-static-pie"; then
2122+
if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
21232123
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
21242124
QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS"
21252125
pie="yes"
@@ -2132,7 +2132,7 @@ if test "$static" = "yes"; then
21322132
elif test "$pie" = "no"; then
21332133
QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS"
21342134
QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS"
2135-
elif compile_prog "-fPIE -DPIE" "-pie"; then
2135+
elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
21362136
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
21372137
QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"
21382138
pie="yes"

0 commit comments

Comments
 (0)