From 7b3596ba1521f201c9416fc7a0385cb7e6c6f495 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Feb 2011 17:29:46 +0100 Subject: Build Win64 Erlang emulator using MSYS Still does not run, just compiles. --- erts/configure.in | 76 ++++++++++++++++--------------------------------------- 1 file changed, 22 insertions(+), 54 deletions(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index 10d303e241..8798adf3a5 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -387,8 +387,8 @@ case $host_os in # otherwise since we pass it a 32-bit value). # # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. - AC_MSG_WARN([Reverting to 32-bit time_t]) - CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" + # AC_MSG_WARN([Reverting to 32-bit time_t]) + # CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" ;; darwin*) CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE" @@ -398,53 +398,7 @@ case $host_os in esac - -MIXED_CYGWIN=no - -AC_MSG_CHECKING(for mixed cygwin and native VC++ environment) -if test "X$host" = "Xwin32" -a "x$GCC" != x"yes"; then - if test -x /usr/bin/cygpath; then - CFLAGS="-O2" - MIXED_CYGWIN=yes - AC_MSG_RESULT([yes]) - MIXED_CYGWIN_VC=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_VC" - else - AC_MSG_RESULT([undeterminable]) - AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!) - fi -else - AC_MSG_RESULT([no]) - MIXED_CYGWIN_VC=no -fi -AC_SUBST(MIXED_CYGWIN_VC) - -AC_MSG_CHECKING(for mixed cygwin and native MinGW environment) -if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then - if test -x /usr/bin/cygpath; then - CFLAGS="-O2" - MIXED_CYGWIN=yes - AC_MSG_RESULT([yes]) - MIXED_CYGWIN_MINGW=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_CYGWIN_MINGW" - else - AC_MSG_RESULT([undeterminable]) - AC_MSG_ERROR(Seems to be mixed windows but not with cygwin, cannot handle this!) - fi -else - AC_MSG_RESULT([no]) - MIXED_CYGWIN_MINGW=no -fi -AC_SUBST(MIXED_CYGWIN_MINGW) - -AC_MSG_CHECKING(if we mix cygwin with any native compiler) -if test "X$MIXED_CYGWIN" = "Xyes" ; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_SUBST(MIXED_CYGWIN) +LM_WINDOWS_ENVIRONMENT dnl dnl Flags to the C compiler @@ -2584,7 +2538,7 @@ static void new_fp_exception(void) * Implement unmask_fpe() and check_fpe() based on CPU/OS combination */ -#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__) && !defined(__CYGWIN__) +#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) static void unmask_x87(void) { @@ -3637,7 +3591,7 @@ elif test "x$with_ssl_zlib" = "xyes" || test "x$with_ssl_zlib" = "x"; then AC_MSG_WARN([Cannot search for zlib; missing cross system root (erl_xcomp_sysroot).]) SSL_LINK_WITH_ZLIB=no STATIC_ZLIB_LIBS= - elif test "x$MIXED_CYGWIN" = "xyes"; then + elif test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then SSL_LINK_WITH_ZLIB=no STATIC_ZLIB_LIBS= else @@ -3766,6 +3720,20 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in extra_dir=`cygpath $ssl_install_dir` fi fi + elif test "x$MIXED_MSYS" = "xyes"; then + AC_CHECK_PROG(REGTOOL, reg_query.sh, reg_query.sh, false) + if test "$ac_cv_prog_REGTOOL" != false; then + if test "x$ARCH" = "xamd64"; then + rp="HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/OpenSSL (64-bit)_is1" + else + rp="HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall/OpenSSL_is1" + fi + key="Inno Setup: App Path" + if "$ac_cv_prog_REGTOOL" "$rp" "$key" > /dev/null; then + ssl_install_dir=`"$ac_cv_prog_REGTOOL" "$rp" "$key"` + extra_dir=`win2msys_path.sh "$ssl_install_dir"` + fi + fi fi # We search for OpenSSL in the common OS standard locations. SSL_APP=ssl @@ -3781,7 +3749,7 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then is_real_ssl=yes SSL_ROOT="$dir" - if test "x$MIXED_CYGWIN" = "xyes" ; then + if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then if test -f "$dir/lib/VC/libeay32.lib"; then SSL_RUNTIME_LIBDIR="$rdir/lib/VC" SSL_LIBDIR="$dir/lib/VC" @@ -3856,7 +3824,7 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in ]) CPPFLAGS=$old_CPPFLAGS if test "x$ssl_found" = "xyes"; then - if test "x$MIXED_CYGWIN" = "xyes" ; then + if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then ssl_linkable=yes else saveCFLAGS="$CFLAGS" @@ -3968,7 +3936,7 @@ dnl so it is - be adoptable SSL_ROOT="$with_ssl" SSL_CRYPTO_LIBNAME=crypto SSL_SSL_LIBNAME=ssl - if test "x$MIXED_CYGWIN" = "xyes" && test -d "$with_ssl/lib/VC"; then + if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes" && test -d "$with_ssl/lib/VC"; then if test -f "$with_ssl/lib/VC/libeay32.lib"; then SSL_LIBDIR="$with_ssl/lib/VC" SSL_CRYPTO_LIBNAME=libeay32 -- cgit v1.2.3 From e78a1582dc13d770bf1a9de64ff817369c741ef5 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 25 Oct 2011 12:31:54 +0200 Subject: Make Win64 build work both under MSYS and Cygwin --- erts/configure.in | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index 8798adf3a5..a171c6ec2b 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -383,12 +383,6 @@ case $host_os in # The ethread library requires _WIN32_WINNT of at least 0x0403. # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS. CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0500 -DWINVER=0x0500" - # _USE_32BIT_TIME_T is needed when using VC++ 2005 (ctime() will fail - # otherwise since we pass it a 32-bit value). - # - # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. - # AC_MSG_WARN([Reverting to 32-bit time_t]) - # CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" ;; darwin*) CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE" @@ -619,6 +613,19 @@ esac AC_SUBST(OPSYS) AC_SUBST(ARCH) +# Need to add this adjustment after we know the architecture, will fail on 64bit +# This should be temporary, USE_32BIT_TIME_T should go away before R15B +case $host_os in + win32) + # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. + if test "x$ARCH" != "xamd64"; then + AC_MSG_WARN([Reverting to 32-bit time_t]) + CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" + fi + ;; + *) + ;; +esac dnl Check consistency of os and darwin-switches @@ -3703,16 +3710,23 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in AC_CHECK_PROG(REGTOOL, regtool, regtool, false) if test "$ac_cv_prog_REGTOOL" != false; then wrp="/machine/software/microsoft/windows/currentversion/" - urp="uninstall/openssl_is1/inno setup: app path" + if test "x$ARCH" = "xamd64"; then + urp="uninstall/openssl (64-bit)_is1/inno setup: app path" + regtool_subsystem=-w + else + urp="uninstall/openssl (32-bit)_is1/inno setup: app path" + regtool_subsystem=-W + fi rp="$wrp$urp" - if regtool -q get "$rp" > /dev/null; then + if regtool -q $regtool_subsystem get "$rp" > /dev/null; then true else - urp="uninstall/openssl (32-bit)_is1/inno setup: app path" + # Fallback to unspecified wordlength + urp="uninstall/openssl_is1/inno setup: app path" rp="$wrp$urp" fi - if regtool -q get "$rp" > /dev/null; then - ssl_install_dir=`regtool -q get "$rp"` + if regtool -q $regtool_subsystem get "$rp" > /dev/null; then + ssl_install_dir=`regtool -q $regtool_subsystem get "$rp"` # Try hard to get rid of spaces... if cygpath -d "$ssl_install_dir" > /dev/null 2>&1; then ssl_install_dir=`cygpath -d "$ssl_install_dir"` @@ -3742,9 +3756,20 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in SSL_CRYPTO_LIBNAME=crypto SSL_SSL_LIBNAME=ssl + + if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then + if test "x$ARCH" = "xamd64"; then + std_win_ssl_locations="/cygdrive/c/OpenSSL-Win64 /c/OpenSSL-Win64 /opt/local64/pgm/OpenSSL" + else + std_win_ssl_locations="/cygdrive/c/OpenSSL-Win32 /c/OpenSSL-Win32 /cygdrive/c/OpenSSL /c/OpenSSL /opt/local/pgm/OpenSSL" + fi + else + std_win_ssl_locations="" + fi + AC_MSG_CHECKING(for OpenSSL >= 0.9.7 in standard locations) - for rdir in $extra_dir /cygdrive/c/OpenSSL $std_ssl_locations; do + for rdir in $extra_dir $std_win_ssl_locations $std_ssl_locations; do dir="$erl_xcomp_sysroot$rdir" if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then is_real_ssl=yes -- cgit v1.2.3 From b9f27af621b302d20a070926376b404e745cbb07 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 1 Dec 2011 10:54:37 +0100 Subject: Back to not using 32bit time_t --- erts/configure.in | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index a171c6ec2b..4174439d76 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -613,19 +613,6 @@ esac AC_SUBST(OPSYS) AC_SUBST(ARCH) -# Need to add this adjustment after we know the architecture, will fail on 64bit -# This should be temporary, USE_32BIT_TIME_T should go away before R15B -case $host_os in - win32) - # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. - if test "x$ARCH" != "xamd64"; then - AC_MSG_WARN([Reverting to 32-bit time_t]) - CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" - fi - ;; - *) - ;; -esac dnl Check consistency of os and darwin-switches -- cgit v1.2.3