Browse Source

Remove obsolete compiler option on Cygwin

pull/14/merge
Ken Brown 6 years ago
committed by Aleksey Demakov
parent
commit
59340183e8
  1. 7
      ChangeLog
  2. 18
      configure.ac
  3. 10
      jit/jit-dump.c
  4. 18
      jitdynamic/jit-dynlib.c

7
ChangeLog

@ -1,3 +1,10 @@
2018-09-01 Ken Brown <kbrown@cornell.edu>
* 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 <aaptel@suse.com>
* jit/jit-rules-x86-64.c (small_block_copy, small_block_set): fix

18
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

10
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");

18
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)

Loading…
Cancel
Save