libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libjit] [PATCH v2 1/3] Remove obsolete compiler option on Cygwin


From: Ken Brown
Subject: [Libjit] [PATCH v2 1/3] Remove obsolete compiler option on Cygwin
Date: Sat, 1 Sep 2018 10:27:46 -0400

---
 ChangeLog               |  7 +++++++
 configure.ac            | 18 +-----------------
 jit/jit-dump.c          | 10 ----------
 jitdynamic/jit-dynlib.c | 18 ------------------
 4 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e61663..09b4202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-09-01  Ken Brown  <address@hidden>
+
+       * configure.ac: Don't use -mno-cygwin in the Cygwin build.  This
+       has been unsupported since GCC 4 and causes the build to fail.
+       * jit/jit-dump.c (dump_object_code): Remove obsolete comment.
+       * jitdynamic/jit-dynlib.c (jit_dynlib_open): Remove obsolete code.
+
 2018-08-25  Aurelien Aptel  <address@hidden>
 
        * jit/jit-rules-x86-64.c (small_block_copy, small_block_set): fix
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..149cbe6 100644
--- a/jit/jit-dump.c
+++ b/jit/jit-dump.c
@@ -688,16 +688,6 @@ static void dump_object_code(FILE *stream, void *start, 
void *end)
        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.
-        */
        char s_path[BUFSIZ];
        char o_path[BUFSIZ];
        char *tmp_dir = getenv("TMP");
diff --git a/jitdynamic/jit-dynlib.c b/jitdynamic/jit-dynlib.c
index 75cf35f..960bfed 100644
--- a/jitdynamic/jit-dynlib.c
+++ b/jitdynamic/jit-dynlib.c
@@ -234,24 +234,6 @@ jit_dynlib_handle_t jit_dynlib_open(const char *name)
        void *libHandle;
        char *newName = 0;
 
-#if defined(JIT_WIN32_CYGWIN) && defined(HAVE_SYS_CYGWIN_H) && \
-    defined(HAVE_CYGWIN_CONV_TO_WIN32_PATH)
-
-       /* Use Cygwin to expand the path */
-       {
-               char buf[4096];
-               if(cygwin_conv_to_win32_path(name, buf) == 0)
-               {
-                       newName = jit_strdup(buf);
-                       if(!newName)
-                       {
-                               return 0;
-                       }
-               }
-       }
-
-#endif
-
        /* Attempt to load the library */
        libHandle = (void *)LoadLibrary((newName ? newName : name));
        if(libHandle == 0)
-- 
2.17.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]