On Sun, Jan 28, 2024 at 02:07:32PM +0000, Iain Sandoe wrote:
> This removes the heap trampoline support functions from libgcc.a and
> adds them to libgcc_eh.a.  They are also present in libgcc_s.
> 
>       PR libgcc/113403
> 
> libgcc/ChangeLog:
> 
>       * config/aarch64/t-heap-trampoline: Move the heap trampoline
>       support functions from libgcc.a to libgcc_eh.a.
>       * config/i386/t-heap-trampoline: Likewise.

LGTM.
I'd also default to -shared-libgcc when linking using gcc driver with
the new trampoline option in options unless -static-libgcc has been used,
but that can be done incrementally.

> diff --git a/libgcc/config/aarch64/t-heap-trampoline 
> b/libgcc/config/aarch64/t-heap-trampoline
> index b22480800b2..6468fb8704f 100644
> --- a/libgcc/config/aarch64/t-heap-trampoline
> +++ b/libgcc/config/aarch64/t-heap-trampoline
> @@ -16,4 +16,5 @@
>  # along with GCC; see the file COPYING3.  If not see
>  # <http://www.gnu.org/licenses/>.
>  
> -LIB2ADD += $(srcdir)/config/aarch64/heap-trampoline.c
> +LIB2ADDEH += $(srcdir)/config/aarch64/heap-trampoline.c
> +LIB2ADDEHSHARED += $(srcdir)/config/aarch64/heap-trampoline.c
> diff --git a/libgcc/config/i386/t-heap-trampoline 
> b/libgcc/config/i386/t-heap-trampoline
> index 613f635b1f6..728c1e26a92 100644
> --- a/libgcc/config/i386/t-heap-trampoline
> +++ b/libgcc/config/i386/t-heap-trampoline
> @@ -16,4 +16,5 @@
>  # along with GCC; see the file COPYING3.  If not see
>  # <http://www.gnu.org/licenses/>.
>  
> -LIB2ADD += $(srcdir)/config/i386/heap-trampoline.c
> +LIB2ADDEH += $(srcdir)/config/i386/heap-trampoline.c
> +LIB2ADDEHSHARED += $(srcdir)/config/aarch64/heap-trampoline.c
> -- 
> 2.39.2 (Apple Git-143)

        Jakub

Reply via email to