[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libjit] [PATCH 0/3] Fix build on 32-bit Cygwin
From: |
Ken Brown |
Subject: |
[Libjit] [PATCH 0/3] Fix build on 32-bit Cygwin |
Date: |
Mon, 27 Aug 2018 16:27:18 -0400 |
LibJIT currently fails to build on Cygwin because it uses the GCC
option -mno-cygwin, which has been obsolete for several years.
Moreover, the code assumes that the purpose of a build on Cygwin is to
produce native MS-Windows binaries, as evidenced by the following
snippet from configure.ac:
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_SUBST(JIT_INT64_INCLUDE)
case "$host" in
*-*-cygwin*)
platform_win32=yes
if test "x$CC" = "x" ; then
CC="gcc -mno-cygwin"
fi
If one really wants to build native Windows binaries on Cygwin, the
way to do this is to cross compile via --host=i686-w64-mingw32 or
--host=x86_64-w64-mingw32, in which case $host above will not match
*-*-cygwin*.
The purpose of this patch series is to make LibJIT build on 32-bit
Cygwin with a view toward using it within Cygwin. In particular, the
build should use the Posix API rather than the Win32 API.
I've tested the build by running the test suite (all tests pass) and
by building Emacs with libjit support.
Ken Brown (3):
Remove obsolete compiler option on Cygwin
Don't use Win32 API on Cygwin
Remove reference to __CYGWIN32__
configure.ac | 18 +-----------------
jit/jit-alloc.c | 8 ++++----
jit/jit-apply-x86.h | 3 +--
jit/jit-apply.c | 2 +-
jit/jit-config.h | 10 +++-------
jit/jit-dump.c | 12 +-----------
jit/jit-elf-read.c | 2 +-
jit/jit-insn.c | 2 +-
jit/jit-interp.c | 2 +-
jit/jit-vmem.c | 4 ++--
jitdynamic/jit-cpp-mangle.c | 6 +++---
jitdynamic/jit-dynlib.c | 27 ++-------------------------
tools/gen-apply-helper.h | 3 +--
13 files changed, 22 insertions(+), 77 deletions(-)
--
2.17.0
- [Libjit] [PATCH 0/3] Fix build on 32-bit Cygwin,
Ken Brown <=