diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2022-12-13 21:16:22 +0100 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-12-18 21:20:50 +1300 |
commit | cdae8d0559d41f9464ab54e2967e23a0ee06a358 (patch) | |
tree | 7245c112b1e1999ec2c8f715aeff4facf6de6cb5 /scripts/build/cc | |
parent | 500fe136547598da727970383cefe6280c09a658 (diff) | |
download | crosstool-ng-cdae8d0559d41f9464ab54e2967e23a0ee06a358.tar.gz crosstool-ng-cdae8d0559d41f9464ab54e2967e23a0ee06a358.tar.bz2 crosstool-ng-cdae8d0559d41f9464ab54e2967e23a0ee06a358.zip |
Enable support for building libgccjit
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 <dkm@kataplop.net>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 1d7fc065..18558533 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -45,6 +45,7 @@ cc_gcc_lang_list() { [ "${CT_CC_LANG_ADA}" = "y" ] && lang_list+=",ada" [ "${CT_CC_LANG_D}" = "y" ] && lang_list+=",d" [ "${CT_CC_LANG_JAVA}" = "y" ] && lang_list+=",java" + [ "${CT_CC_LANG_JIT}" = "y" ] && lang_list+=",jit" [ "${CT_CC_LANG_OBJC}" = "y" ] && lang_list+=",objc" [ "${CT_CC_LANG_OBJCXX}" = "y" ] && lang_list+=",obj-c++" [ "${CT_CC_LANG_GOLANG}" = "y" ] && lang_list+=",go" @@ -343,6 +344,10 @@ do_gcc_core_backend() { extra_config+=("--enable-newlib-nano-formatted-io") fi + if [ "${CT_CC_LANG_JIT}" = "y" ]; then + extra_config+=("--enable-host-shared") + fi + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then extra_config+=("--enable-__cxa_atexit") else |