diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2023-08-05 14:56:31 +0200 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2023-10-22 14:01:30 +0100 |
commit | cbf6da166ea7993e166dcb121fc7b9ef4ec87c89 (patch) | |
tree | f9adb68d9e5137f95204cbb3cbde2d2438ec5cc1 /gcc/config.gcc | |
parent | 28d8c680aaea46137170fef2bd1c6a98301518dc (diff) | |
download | gcc-cbf6da166ea7993e166dcb121fc7b9ef4ec87c89.zip gcc-cbf6da166ea7993e166dcb121fc7b9ef4ec87c89.tar.gz gcc-cbf6da166ea7993e166dcb121fc7b9ef4ec87c89.tar.bz2 |
target: Support heap-based trampolines
Enable -ftrampoline-impl=heap by default if we are on macOS 11
or later.
Co-Authored-By: Maxim Blinov <maxim.blinov@embecosm.com>
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:
* config.gcc: Default to heap trampolines on macOS 11 and above.
* config/i386/darwin.h: Define X86_CUSTOM_FUNCTION_TEST.
* config/i386/i386.h: Define X86_CUSTOM_FUNCTION_TEST.
* config/i386/i386.cc: Use X86_CUSTOM_FUNCTION_TEST.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 0782cbc..606d3a8 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1171,6 +1171,17 @@ case ${target} in ;; esac +# Figure out if we need to enable heap trampolines by default +case ${target} in +*-*-darwin2*) + # Currently, we do this for macOS 11 and above. + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" + ;; +*) + tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" + ;; +esac + case ${target} in aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) tm_file="${tm_file} elfos.h newlib-stdint.h" |