On Wed, Jan 31, 2024 at 12:59:27PM +0100, Jakub Jelinek wrote:
> On Sun, Jan 28, 2024 at 02:07:32PM +0000, Iain Sandoe wrote:
> > --- 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
> > --- 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
>
> I'm seeing
> ../../../libgcc/shared-object.mk:14: warning: overriding recipe for target
> 'heap-trampoline.o'
> ../../../libgcc/shared-object.mk:14: warning: ignoring old recipe for target
> 'heap-trampoline.o'
> ../../../libgcc/shared-object.mk:17: warning: overriding recipe for target
> 'heap-trampoline_s.o'
> ../../../libgcc/shared-object.mk:17: warning: ignoring old recipe for target
> 'heap-trampoline_s.o'
>
> Shouldn't we go with following patch?
> I can test it on x86_64-linux and i686-linux, but can't test it e.g. on
> Darwin easily.
>
> 2024-01-31 Jakub Jelinek <[email protected]>
>
> * config/i386/t-heap-trampoline: Add to LIB2ADDEHSHARED
> i386/heap-trampoline.c rather than aarch64/heap-trampoline.c.
Bootstrapped/regtested on x86_64-linux and i686-linux successfully.
Jakub