Commit e5becbf6 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Reset host flags in all cross-compiler error paths.

parent c963c414
...@@ -10340,6 +10340,10 @@ else $as_nop ...@@ -10340,6 +10340,10 @@ else $as_nop
fi fi
fi fi
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
for wine_arch in $cross_archs for wine_arch in $cross_archs
do do
case "x$with_mingw" in case "x$with_mingw" in
...@@ -10603,10 +10607,6 @@ test -n "$x86_64_CC" || x86_64_CC="false" ...@@ -10603,10 +10607,6 @@ test -n "$x86_64_CC" || x86_64_CC="false"
esac esac
fi fi
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
CFLAGS=${CROSSCFLAGS:-"-g -O2"} CFLAGS=${CROSSCFLAGS:-"-g -O2"}
LDFLAGS=$CROSSLDFLAGS LDFLAGS=$CROSSLDFLAGS
eval CC=\$${wine_arch}_CC eval CC=\$${wine_arch}_CC
...@@ -10768,9 +10768,6 @@ then : ...@@ -10768,9 +10768,6 @@ then :
as_fn_error $? "MinGW $wine_arch compiler not found. as_fn_error $? "MinGW $wine_arch compiler not found.
This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5 This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
fi fi
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
continue continue
fi fi
...@@ -10814,9 +10811,6 @@ fi ...@@ -10814,9 +10811,6 @@ fi
printf "%s\n" "none needed" >&6; } ;; printf "%s\n" "none needed" >&6; } ;;
xno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 xno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; } printf "%s\n" "unsupported" >&6; }
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
if test ${enable_archs+y} if test ${enable_archs+y}
then : then :
as_fn_error $? "MinGW $wine_arch compiler supporting C99 not found. as_fn_error $? "MinGW $wine_arch compiler supporting C99 not found.
...@@ -11964,11 +11958,12 @@ then : ...@@ -11964,11 +11958,12 @@ then :
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--build-id" as_fn_append ${wine_arch}_LDFLAGS " -Wl,--build-id"
fi } fi }
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
done done
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
if test $HOST_ARCH = aarch64 if test $HOST_ARCH = aarch64
then then
test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5 test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5
......
...@@ -833,6 +833,10 @@ AS_VAR_SET_IF([enable_archs], ...@@ -833,6 +833,10 @@ AS_VAR_SET_IF([enable_archs],
test $HOST_ARCH = unknown || cross_archs=$HOST_ARCH test $HOST_ARCH = unknown || cross_archs=$HOST_ARCH
fi]) fi])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
for wine_arch in $cross_archs for wine_arch in $cross_archs
do do
case "x$with_mingw" in case "x$with_mingw" in
...@@ -859,10 +863,6 @@ do ...@@ -859,10 +863,6 @@ do
;; ;;
esac]) esac])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
CFLAGS=${CROSSCFLAGS:-"-g -O2"} CFLAGS=${CROSSCFLAGS:-"-g -O2"}
LDFLAGS=$CROSSLDFLAGS LDFLAGS=$CROSSLDFLAGS
AS_VAR_COPY([CC],[${wine_arch}_CC]) AS_VAR_COPY([CC],[${wine_arch}_CC])
...@@ -924,9 +924,6 @@ do ...@@ -924,9 +924,6 @@ do
AS_VAR_SET_IF([enable_archs], AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([MinGW $wine_arch compiler not found. [AC_MSG_ERROR([MinGW $wine_arch compiler not found.
This is an error since --enable-archs=$wine_arch was requested.])]) This is an error since --enable-archs=$wine_arch was requested.])])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
continue continue
fi fi
...@@ -948,9 +945,6 @@ This is an error since --enable-archs=$wine_arch was requested.])]) ...@@ -948,9 +945,6 @@ This is an error since --enable-archs=$wine_arch was requested.])])
case "x$res" in case "x$res" in
x) AC_MSG_RESULT([none needed]) ;; x) AC_MSG_RESULT([none needed]) ;;
xno) AC_MSG_RESULT([unsupported]) xno) AC_MSG_RESULT([unsupported])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
AS_VAR_SET_IF([enable_archs], AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([MinGW $wine_arch compiler supporting C99 not found. [AC_MSG_ERROR([MinGW $wine_arch compiler supporting C99 not found.
This is an error since --enable-archs=$wine_arch was requested.])]) This is an error since --enable-archs=$wine_arch was requested.])])
...@@ -1040,11 +1034,12 @@ This is an error since --enable-archs=$wine_arch was requested.])]) ...@@ -1040,11 +1034,12 @@ This is an error since --enable-archs=$wine_arch was requested.])])
[AS_VAR_APPEND([${wine_arch}_CFLAGS],[" -Wl,--build-id"]) [AS_VAR_APPEND([${wine_arch}_CFLAGS],[" -Wl,--build-id"])
AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])]) AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
done done
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
if test $HOST_ARCH = aarch64 if test $HOST_ARCH = aarch64
then then
test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw.]) test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw.])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment