Bug 1100925 - 64-bit build checks only happen on msys2 if $COMPILE_ENVIRONMENT is set. r?gps
Because if $COMPILE_ENVIRONMENT is not set, configure never checks if the OS is 64-bit or not.
MozReview-Commit-ID: KgbCiGNVtne
--- a/old-configure.in
+++ b/old-configure.in
@@ -1520,33 +1520,33 @@ case "$target" in
case "$host_os" in
cygwin*|msvc*|mks*)
AC_MSG_ERROR([Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
;;
esac
case "$target" in
i*86-*)
- if test "$HAVE_64BIT_BUILD"; then
+ if test "$HAVE_64BIT_BUILD" -a "$COMPILE_ENVIRONMENT"; then
AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.])
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
LDFLAGS="$LDFLAGS -Wl,--enable-stdcall-fixup -Wl,--large-address-aware"
else
DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
LDFLAGS="$LDFLAGS -SAFESEH"
fi
AC_DEFINE(_X86_)
;;
x86_64-*)
- if test -z "$HAVE_64BIT_BUILD"; then
+ if test -z "$HAVE_64BIT_BUILD" -a "$COMPILE_ENVIRONMENT"; then
AC_MSG_ERROR([You are targeting 64-bit but using the 32-bit compiler.])
fi
if test -n "$_WIN32_MSVC"; then
DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
fi
AC_DEFINE(_AMD64_)
;;
*)