aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2024-02-10 14:44:41 +0000
committerIain Sandoe <iain@sandoe.co.uk>2024-02-12 15:03:12 +0000
commit5e39897ee2c73938fa940c4792d987608aeeebcd (patch)
tree0eb96f27c53c6cfbdd7a7838e222562c03b9cd0e /gcc
parent1e94648ab7b370c5867e146c7f59603e2e6ba2e6 (diff)
downloadgcc-5e39897ee2c73938fa940c4792d987608aeeebcd.zip
gcc-5e39897ee2c73938fa940c4792d987608aeeebcd.tar.gz
gcc-5e39897ee2c73938fa940c4792d987608aeeebcd.tar.bz2
x86, libgcc: Implement ia32 basic heap trampoline [PR113855].
The initial heap trampoline implementation was targeting 64b platforms. As the PR demonstrates this creates an issue where it is expected that the same symbols are exported for 32 and 64b. Rather than conditionalize the exports and code-gen on x86_64, this patch provides a basic implementation of the IA32 trampoline. This also avoids potential user confusion, when a 32b target has 64b multilibs, and vice versa; which is the case for Darwin. PR target/113855 gcc/ChangeLog: * config/i386/darwin.h (DARWIN_HEAP_T_LIB): Moved to be available to all sub-targets. * config/i386/darwin32-biarch.h (DARWIN_HEAP_T_LIB): Delete. * config/i386/darwin64-biarch.h (DARWIN_HEAP_T_LIB): Delete. libgcc/ChangeLog: * config.host: Add trampoline support to x?86-linux. * config/i386/heap-trampoline.c (trampoline_insns): Provide a variant for IA32. (union ix86_trampoline): Likewise. (__gcc_nested_func_ptr_created): Implement a basic trampoline for IA32.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/darwin.h3
-rw-r--r--gcc/config/i386/darwin32-biarch.h3
-rw-r--r--gcc/config/i386/darwin64-biarch.h3
3 files changed, 2 insertions, 7 deletions
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index 8e64b4e..bf9c45d 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -119,9 +119,10 @@ along with GCC; see the file COPYING3. If not see
/* We default to x86_64 for single-arch builds, bi-arch overrides. */
#define DARWIN_ARCH_SPEC "x86_64"
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
+#endif
+
#undef DARWIN_HEAP_T_LIB
#define DARWIN_HEAP_T_LIB " -lheapt_w "
-#endif
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff --git a/gcc/config/i386/darwin32-biarch.h b/gcc/config/i386/darwin32-biarch.h
index 2180f5a..051ad12 100644
--- a/gcc/config/i386/darwin32-biarch.h
+++ b/gcc/config/i386/darwin32-biarch.h
@@ -27,9 +27,6 @@ along with GCC; see the file COPYING3. If not see
#undef DARWIN_SUBARCH_SPEC
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
-#undef DARWIN_HEAP_T_LIB
-#define DARWIN_HEAP_T_LIB " %{m64:-lheapt_w}"
-
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
DARWIN_EXTRA_SPECS \
diff --git a/gcc/config/i386/darwin64-biarch.h b/gcc/config/i386/darwin64-biarch.h
index 6208007..8543679 100644
--- a/gcc/config/i386/darwin64-biarch.h
+++ b/gcc/config/i386/darwin64-biarch.h
@@ -28,9 +28,6 @@ along with GCC; see the file COPYING3. If not see
#undef DARWIN_SUBARCH_SPEC
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
-#undef DARWIN_HEAP_T_LIB
-#define DARWIN_HEAP_T_LIB "%{!m32:-lheapt_w}"
-
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
DARWIN_EXTRA_SPECS \