summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNicolás Bértolo <nicolasbertolo@gmail.com>2020-05-22 17:54:41 -0300
committerDavid Malcolm <dmalcolm@redhat.com>2020-05-28 14:43:58 -0400
commitc83027f32d9cca84959c7d6a1e519a0129731501 (patch)
tree4dad20ef88f0f41236b4da3f2e2c90c5ce1da512 /configure.ac
parentccf4e86dc01d8c89a8d56b228757a689d1fcc564 (diff)
jit: port libgccjit to Windows
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com> /ChangeLog: * configure.ac: Don't require --enable-host-shared when building for Mingw. * configure: Regenerate. 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com> gcc/ChangeLog: * Makefile.in: don't look for libiberty in the "pic" subdirectory when building for Mingw. Add dependency on xgcc with the proper extension. 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com> gcc/c/ChangeLog: * Make-lang.in: Remove extra slash. 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com> gcc/jit/ChangeLog: * Make-lang.in: Remove extra slash. Build libgccjit.dll and its import library in Windows. * config-lang.in: Update comment about --enable-host-shared. * jit-w32.h: New file. * jit-w32.c: New file. (print_last_error): New function that prints the error string corresponding to GetLastError(). (get_TOKEN_USER_current_user): Helper function used for getting the SID belonging to the current user. (create_directory_for_current_user): Helper function to create a directory with permissions such that only the current user can access it. (win_mkdtemp): Create a temporary directory using Windows APIs. * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary, FreeLibrary and GetProcAddress instead of libdl. * jit-result.h, jit-result.c: Introduce result::handle_t to abstract over the types used for dynamic library handles. * jit-tempdir.c: Do not use mkdtemp() in Windows, use win_mkdtemp().
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac33
1 files changed, 20 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index a67801371a4..59bd92a3e53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2079,9 +2079,14 @@ if test -d ${srcdir}/gcc; then
esac
# Disable jit if -enable-host-shared not specified
- case ${add_this_lang}:${language}:${host_shared} in
- yes:jit:no)
- # PR jit/64780: explicitly specify --enable-host-shared
+ # but not if building for Mingw. All code in Windows
+ # is position independent code (PIC).
+ case $target in
+ *mingw*) ;;
+ *)
+ case ${add_this_lang}:${language}:${host_shared} in
+ yes:jit:no)
+ # PR jit/64780: explicitly specify --enable-host-shared
AC_MSG_ERROR([
Enabling language "jit" requires --enable-host-shared.
@@ -2092,16 +2097,18 @@ If you want to build both the jit and the regular compiler, it is often
best to do this via two separate configure/builds, in separate
directories, to avoid imposing the performance cost of
--enable-host-shared on the regular compiler.])
- ;;
- all:jit:no)
- AC_MSG_WARN([--enable-host-shared required to build $language])
- add_this_lang=unsupported
- ;;
- *:jit:no)
- # Silently disable.
- add_this_lang=unsupported
- ;;
- esac
+ ;;
+ all:jit:no)
+ AC_MSG_WARN([--enable-host-shared required to build $language])
+ add_this_lang=unsupported
+ ;;
+ *:jit:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+ ;;
+ esac
# Disable a language that is unsupported by the target.
case "${add_this_lang}: $unsupported_languages " in