configure: Reset host flags in all cross-compiler error paths.
This commit is contained in:
parent
c963c4141a
commit
e5becbf6a8
2 changed files with 16 additions and 26 deletions
21
configure
vendored
21
configure
vendored
|
@ -10340,6 +10340,10 @@ else $as_nop
|
|||
fi
|
||||
fi
|
||||
|
||||
saved_CC=$CC
|
||||
saved_CFLAGS=$CFLAGS
|
||||
saved_LDFLAGS=$LDFLAGS
|
||||
|
||||
for wine_arch in $cross_archs
|
||||
do
|
||||
case "x$with_mingw" in
|
||||
|
@ -10603,10 +10607,6 @@ test -n "$x86_64_CC" || x86_64_CC="false"
|
|||
esac
|
||||
fi
|
||||
|
||||
saved_CC=$CC
|
||||
saved_CFLAGS=$CFLAGS
|
||||
saved_LDFLAGS=$LDFLAGS
|
||||
|
||||
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
|
||||
LDFLAGS=$CROSSLDFLAGS
|
||||
eval CC=\$${wine_arch}_CC
|
||||
|
@ -10768,9 +10768,6 @@ then :
|
|||
as_fn_error $? "MinGW $wine_arch compiler not found.
|
||||
This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
|
||||
fi
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
continue
|
||||
fi
|
||||
|
||||
|
@ -10814,9 +10811,6 @@ fi
|
|||
printf "%s\n" "none needed" >&6; } ;;
|
||||
xno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
|
||||
printf "%s\n" "unsupported" >&6; }
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
if test ${enable_archs+y}
|
||||
then :
|
||||
as_fn_error $? "MinGW $wine_arch compiler supporting C99 not found.
|
||||
|
@ -11964,11 +11958,12 @@ then :
|
|||
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--build-id"
|
||||
fi }
|
||||
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
done
|
||||
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
|
||||
if test $HOST_ARCH = aarch64
|
||||
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
|
||||
|
|
21
configure.ac
21
configure.ac
|
@ -833,6 +833,10 @@ AS_VAR_SET_IF([enable_archs],
|
|||
test $HOST_ARCH = unknown || cross_archs=$HOST_ARCH
|
||||
fi])
|
||||
|
||||
saved_CC=$CC
|
||||
saved_CFLAGS=$CFLAGS
|
||||
saved_LDFLAGS=$LDFLAGS
|
||||
|
||||
for wine_arch in $cross_archs
|
||||
do
|
||||
case "x$with_mingw" in
|
||||
|
@ -859,10 +863,6 @@ do
|
|||
;;
|
||||
esac])
|
||||
|
||||
saved_CC=$CC
|
||||
saved_CFLAGS=$CFLAGS
|
||||
saved_LDFLAGS=$LDFLAGS
|
||||
|
||||
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
|
||||
LDFLAGS=$CROSSLDFLAGS
|
||||
AS_VAR_COPY([CC],[${wine_arch}_CC])
|
||||
|
@ -924,9 +924,6 @@ do
|
|||
AS_VAR_SET_IF([enable_archs],
|
||||
[AC_MSG_ERROR([MinGW $wine_arch compiler not found.
|
||||
This is an error since --enable-archs=$wine_arch was requested.])])
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
continue
|
||||
fi
|
||||
|
||||
|
@ -948,9 +945,6 @@ This is an error since --enable-archs=$wine_arch was requested.])])
|
|||
case "x$res" in
|
||||
x) AC_MSG_RESULT([none needed]) ;;
|
||||
xno) AC_MSG_RESULT([unsupported])
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
AS_VAR_SET_IF([enable_archs],
|
||||
[AC_MSG_ERROR([MinGW $wine_arch compiler supporting C99 not found.
|
||||
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}_LDFLAGS],[" -Wl,--build-id"])])
|
||||
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
done
|
||||
|
||||
CC=$saved_CC
|
||||
CFLAGS=$saved_CFLAGS
|
||||
LDFLAGS=$saved_LDFLAGS
|
||||
|
||||
if test $HOST_ARCH = aarch64
|
||||
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.])
|
||||
|
|
Loading…
Add table
Reference in a new issue