[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libjit] [PATCH 1/3] Remove obsolete compiler option on Cygwin
From: |
Ken Brown |
Subject: |
[Libjit] [PATCH 1/3] Remove obsolete compiler option on Cygwin |
Date: |
Mon, 27 Aug 2018 16:27:19 -0400 |
GCC no longer supports -mno-cygwin. The proper way to build a native
Win32 application on Cygwin is to cross compile via
--host=i686-w64-mingw32 or --host=x86_64-w64-mingw32.
---
configure.ac | 18 +-----------------
jit/jit-dump.c | 12 +-----------
2 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8cfae73..8a13704 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,27 +35,11 @@ case "$host" in
esac
AC_MSG_RESULT($JIT_ARCH)
-dnl Turn off the cygwin library if building for Win32.
dnl Note: We have to include <stdlib.h> if we will be using "__int64"
dnl because otherwise the mingw32 compiler won't define it correctly.
-AC_MSG_CHECKING([if building for some Win32 platform])
+AC_MSG_CHECKING([if building for Win32])
AC_SUBST(JIT_INT64_INCLUDE)
case "$host" in
- *-*-cygwin*)
- platform_win32=yes
- if test "x$CC" = "x" ; then
- CC="gcc -mno-cygwin"
- fi
- if test "x$CXX" = "x" ; then
- if test "x$CC" = "xcl" ; then
- CXX="cl"
- else
- CXX="g++ -mno-cygwin"
- fi
- fi
- suppress_libm=yes
- JIT_INT64_INCLUDE='#include <stdlib.h>'
- ;;
*-*-mingw*)
platform_win32=yes
if test "x$CC" = "xcl" ; then
diff --git a/jit/jit-dump.c b/jit/jit-dump.c
index 7d59e6c..9f6b4e2 100644
--- a/jit/jit-dump.c
+++ b/jit/jit-dump.c
@@ -687,17 +687,7 @@ static void dump_object_code(FILE *stream, void *start,
void *end)
FILE *file;
int ch;
-#if JIT_WIN32_PLATFORM
- /*
- * NOTE: If libjit is compiled on cygwin with -mno-cygwin flag then
- * fopen("/tmp/foo.s", ...) will use the root folder of the current
- * drive. That is the full file name will be like "c:/tmp/foo". But
- * the ``as'' and ``objdump'' utilities still use the cygwin's root.
- * So "as /tmp/foo.s" will look for "c:/cygwin/tmp/foo.s". To avoid
- * this ambiguity the file name has to contian the drive spec (e.g.
- * fopen("c:/tmp/foo.s", ...) and "as c;/tmp/foo.s"). Here we assume
- * that the TMP or TEMP environment variables always contain it.
- */
+#if JIT_WIN32_NATIVE
char s_path[BUFSIZ];
char o_path[BUFSIZ];
char *tmp_dir = getenv("TMP");
--
2.17.0