From cdae8d0559d41f9464ab54e2967e23a0ee06a358 Mon Sep 17 00:00:00 2001 From: Marc Poulhiès Date: Tue, 13 Dec 2022 21:16:22 +0100 Subject: Enable support for building libgccjit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libgccjit is still under development and, despite its name, may also be used for ahead-of-time compilation. Documentation can be found on the gcc website: https://gcc.gnu.org/onlinedocs/jit/internals/index.html https://gcc.gnu.org/wiki/JIT With this change it's possible to enable the building of the libgccjit. It's enabled as a language (with --enable-languages=jit) even if not a language frontend at all. The main changes are related to the requirement of having everything host side built as Position Independent Code (PIC) with --enable-host-shared. GCC has the needed logic for building its dependencies (mpc, gmp, mpfr, ...) correctly when built "in-tree", which is not the case with crosstool-ng (see https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=05048fc29f0) Signed-off-by: Marc Poulhiès --- config/cc.in | 14 ++++++++++++++ config/cc/gcc.in | 1 + 2 files changed, 15 insertions(+) (limited to 'config') diff --git a/config/cc.in b/config/cc.in index 922bfeea..068d445a 100644 --- a/config/cc.in +++ b/config/cc.in @@ -20,6 +20,9 @@ config CC_SUPPORT_ADA config CC_SUPPORT_D bool +config CC_SUPPORT_JIT + bool + config CC_SUPPORT_OBJC bool @@ -53,6 +56,17 @@ config CC_LANG_FORTRAN Only select this if you know that your specific version of the compiler supports this language. +config CC_LANG_JIT + bool + prompt "JIT (EXPERIMENTAL)" + depends on CC_SUPPORT_JIT + depends on EXPERIMENTAL + help + Enable building the GCC JIT library. + + Only select this if you know that your specific version of the + compiler supports the libgccjit. + if ! BARE_METAL config CC_LANG_JAVA diff --git a/config/cc/gcc.in b/config/cc/gcc.in index e77b0716..d5b19c79 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -5,6 +5,7 @@ ## select CC_SUPPORT_JAVA if !GCC_7_or_later && OBSOLETE ## select CC_SUPPORT_ADA ## select CC_SUPPORT_D +## select CC_SUPPORT_JIT ## select CC_SUPPORT_OBJC ## select CC_SUPPORT_OBJCXX ## select CC_SUPPORT_GOLANG -- cgit v1.2.3