8022177: Windows/MSYS builds broken
Co-authored-by: Volker Simonis <volker.simonis@gmail.com> Reviewed-by: tbell, erikj, simonis
This commit is contained in:
parent
4b27f317cd
commit
3195bc66ba
@ -377,7 +377,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_REQUIRE_PROGS(CMP, cmp)
|
||||
BASIC_REQUIRE_PROGS(COMM, comm)
|
||||
BASIC_REQUIRE_PROGS(CP, cp)
|
||||
BASIC_REQUIRE_PROGS(CPIO, cpio)
|
||||
BASIC_REQUIRE_PROGS(CUT, cut)
|
||||
BASIC_REQUIRE_PROGS(DATE, date)
|
||||
BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
|
||||
@ -427,6 +426,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
|
||||
BASIC_PATH_PROGS(DF, df)
|
||||
BASIC_PATH_PROGS(SETFILE, SetFile)
|
||||
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
@ -954,7 +954,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test x"$OPENJDK_BUILD_OS" = xwindows; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
file_to_test="$SRC_ROOT/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
|
@ -266,6 +266,14 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in MSYS causing which
|
||||
# to not find them
|
||||
if test "x$new_path" = x \
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
|
@ -900,7 +900,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
|
||||
|
||||
case "${TOOLCHAIN_TYPE}" in
|
||||
microsoft)
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="/WX"
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
;;
|
||||
solstudio)
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -173,6 +173,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_BUILD_OS)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_API)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_ENV)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
|
||||
@ -194,6 +195,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_TARGET_OS)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_ENV)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
|
||||
|
@ -106,6 +106,7 @@ OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
|
||||
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
|
||||
OPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
|
||||
|
||||
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
|
||||
OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
|
||||
|
@ -244,12 +244,22 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
||||
# Need to check if the found msvcr is correct architecture
|
||||
AC_MSG_CHECKING([found msvcr100.dll architecture])
|
||||
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
||||
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH="PE32 executable"
|
||||
else
|
||||
CORRECT_MSVCR_ARCH="PE32+ executable"
|
||||
fi
|
||||
else
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
CORRECT_MSVCR_ARCH=386
|
||||
else
|
||||
CORRECT_MSVCR_ARCH=x86-64
|
||||
fi
|
||||
fi
|
||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
|
||||
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||
AC_MSG_RESULT([ok])
|
||||
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
|
@ -46,6 +46,12 @@ else
|
||||
ARCHIVING_MSG=
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
|
||||
UNIX_PATH_PREFIX := /cygdrive
|
||||
else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
|
||||
UNIX_PATH_PREFIX :=
|
||||
endif
|
||||
|
||||
define add_native_source
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# parma 2 = the source file name (..../alfa.c or .../beta.cpp)
|
||||
@ -120,7 +126,7 @@ define add_native_source
|
||||
&& $(SED) -e '/^Note: including file:/!d' \
|
||||
-e 's|Note: including file: *||' \
|
||||
-e 's|\\|/|g' \
|
||||
-e 's|^\([a-zA-Z]\):|/cygdrive/\1|g' \
|
||||
-e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
|
||||
-e '/$(subst /,\/,$(TOPDIR))/!d' \
|
||||
-e 's|$$$$| \\|g' \
|
||||
$$($1_$2_DEP).raw) > $$($1_$2_DEP)
|
||||
|
Loading…
Reference in New Issue
Block a user