提交 067d0678 编写于 作者: K kevinw

8022177: Windows/MSYS builds broken

Reviewed-by: erikj, tbell, erikj, simonis
Contributed-by: volker.simonis@gmail.com, erik.joelsson@oracle.com
上级 d2e2410c
...@@ -377,7 +377,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], ...@@ -377,7 +377,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_REQUIRE_PROGS(CMP, cmp) BASIC_REQUIRE_PROGS(CMP, cmp)
BASIC_REQUIRE_PROGS(COMM, comm) BASIC_REQUIRE_PROGS(COMM, comm)
BASIC_REQUIRE_PROGS(CP, cp) BASIC_REQUIRE_PROGS(CP, cp)
BASIC_REQUIRE_PROGS(CPIO, cpio)
BASIC_REQUIRE_PROGS(CUT, cut) BASIC_REQUIRE_PROGS(CUT, cut)
BASIC_REQUIRE_PROGS(DATE, date) BASIC_REQUIRE_PROGS(DATE, date)
BASIC_REQUIRE_PROGS(DIFF, [gdiff diff]) BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
...@@ -427,6 +426,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], ...@@ -427,6 +426,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_PATH_PROGS(READLINK, [greadlink readlink]) BASIC_PATH_PROGS(READLINK, [greadlink readlink])
BASIC_PATH_PROGS(DF, df) BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(SETFILE, SetFile) BASIC_PATH_PROGS(SETFILE, SetFile)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
]) ])
# Setup basic configuration paths, and platform-specific stuff related to PATHs. # Setup basic configuration paths, and platform-specific stuff related to PATHs.
...@@ -859,7 +859,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK], ...@@ -859,7 +859,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
# not be the case in cygwin in certain conditions. # not be the case in cygwin in certain conditions.
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS], 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" file_to_test="$SRC_ROOT/LICENSE"
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 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.]) 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], ...@@ -266,6 +266,14 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null` 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 if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error. # It's still not found. Now this is an unrecoverable error.
......
...@@ -179,6 +179,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD], ...@@ -179,6 +179,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN" OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_BUILD_OS) AC_SUBST(OPENJDK_BUILD_OS)
AC_SUBST(OPENJDK_BUILD_OS_API) AC_SUBST(OPENJDK_BUILD_OS_API)
AC_SUBST(OPENJDK_BUILD_OS_ENV)
AC_SUBST(OPENJDK_BUILD_CPU) AC_SUBST(OPENJDK_BUILD_CPU)
AC_SUBST(OPENJDK_BUILD_CPU_ARCH) AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
AC_SUBST(OPENJDK_BUILD_CPU_BITS) AC_SUBST(OPENJDK_BUILD_CPU_BITS)
...@@ -200,6 +201,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD], ...@@ -200,6 +201,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_TARGET_OS) AC_SUBST(OPENJDK_TARGET_OS)
AC_SUBST(OPENJDK_TARGET_OS_API) AC_SUBST(OPENJDK_TARGET_OS_API)
AC_SUBST(OPENJDK_TARGET_OS_ENV)
AC_SUBST(OPENJDK_TARGET_CPU) AC_SUBST(OPENJDK_TARGET_CPU)
AC_SUBST(OPENJDK_TARGET_CPU_ARCH) AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
AC_SUBST(OPENJDK_TARGET_CPU_BITS) AC_SUBST(OPENJDK_TARGET_CPU_BITS)
......
...@@ -101,6 +101,7 @@ OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@ ...@@ -101,6 +101,7 @@ OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
# When not cross-compiling, it is the same as the target. # When not cross-compiling, it is the same as the target.
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@ OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@ 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:=@OPENJDK_BUILD_CPU@
OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
......
...@@ -244,12 +244,22 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL], ...@@ -244,12 +244,22 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
# Need to check if the found msvcr is correct architecture # Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found msvcr100.dll architecture]) AC_MSG_CHECKING([found msvcr100.dll architecture])
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
CORRECT_MSVCR_ARCH=386 # 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 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 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]) AC_MSG_RESULT([ok])
MSVCR_DLL="$POSSIBLE_MSVCR_DLL" MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
AC_MSG_CHECKING([for msvcr100.dll]) AC_MSG_CHECKING([for msvcr100.dll])
......
...@@ -43,6 +43,12 @@ else ...@@ -43,6 +43,12 @@ else
ARCHIVING_MSG= ARCHIVING_MSG=
endif 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 define add_native_source
# param 1 = BUILD_MYPACKAGE # param 1 = BUILD_MYPACKAGE
# parma 2 = the source file name (..../alfa.c or .../beta.cpp) # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
...@@ -117,7 +123,7 @@ define add_native_source ...@@ -117,7 +123,7 @@ define add_native_source
&& $(SED) -e '/^Note: including file:/!d' \ && $(SED) -e '/^Note: including file:/!d' \
-e 's|Note: including file: *||' \ -e 's|Note: including file: *||' \
-e 's|\\|/|g' \ -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 '/$(subst /,\/,$(TOPDIR))/!d' \
-e 's|$$$$| \\|g' \ -e 's|$$$$| \\|g' \
$$($1_$2_DEP).raw) > $$($1_$2_DEP) $$($1_$2_DEP).raw) > $$($1_$2_DEP)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册