This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: nd at arm dot com, "james.greenhalgh" <james dot greenhalgh at arm dot com>, "richard.earnshaw" <richard dot earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 20 Nov 2017 09:39:25 -0800
- Subject: Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <1502138666.3962.95.camel@cavium.com> <59A03627.4060106@arm.com> <1503944731.28672.134.camel@cavium.com> <59A54F1C.3010806@arm.com> <1504200277.3182.22.camel@cavium.com> <59CCDD8A.9020703@arm.com> <1506716977.15649.41.camel@cavium.com> <59D24F48.4060906@arm.com> <1507057058.15649.72.camel@cavium.com> <1508868696.19854.53.camel@cavium.com>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Re-ping with a CC to the Aarch64 maintainers.
Steve Ellcey
sellcey@cavium.com
On Tue, 2017-10-24 at 11:11 -0700, Steve Ellcey wrote:
> Ping.
>
> Steve Ellcey
> sellcey@cavium.com
>
> On Tue, 2017-10-03 at 11:57 -0700, Steve Ellcey wrote:
> >
> > On Mon, 2017-10-02 at 15:38 +0100, Szabolcs Nagy wrote:
> > >
> > >
> > >
> > > looks good to me, but i cannot approve.
> > >
> > > (this will make libatomic depend on ifuncs on aarch64*-linux-gnu.)
> > If you build GCC with default options, ifunc is enabled on aarch64
> > and
> > used by libatomic but if you configure with '--disable-gnu-
> > indirect-
> > function' then GCC will not recognize the 'resolver' attribute and
> > libatomic will build the 'old' way and not use IFUNC's.
> >
> > It seems like using '--disable-version-specific-runtime-libs' should
> > allow GCC to recognize the 'resolver' attribute for IFUNCs but to not
> > use them when building libatomic but when I tried that I got ifuncs
> > in
> > libatomic anyway. I think that is a bug and I will look into it some
> > more.
> >
> > The recent alias checking improvements made to GCC and which caused
> > some glibc build problems also caused the ifunc check in libatomic to
> > fail. That problem has been fixed but it involved a change to
> > libatomic/ibatomic_i.h that conflicted with this patch so I am
> > including an updated version that will apply cleanly to the top of
> > tree. Only libatomic_i.h changed.
> >
> > Steve Ellcey
> > sellcey@cavium.com
> >
> > 2017-10-03 Steve Ellcey <sellcey@cavium.com>
> >
> > * Makefile.am (ARCH_AARCH64_LINUX): Add IFUNC_OPTIONS and
> > libatomic_la_LIBADD.
> > * config/linux/aarch64/host-config.h: New file.
> > * configure.ac (IFUNC_RESOLVER_ARGS): Define.
> > (ARCH_AARCH64_LINUX): New conditional for IFUNC builds.
> > * configure.tgt (aarch64): Set ARCH and try_ifunc.
> > (aarch64*-*-linux*) Update config_path.
> > (aarch64*-*-linux*) Set IFUNC_RESOLVER_ARGS.
> > * libatomic_i.h (GEN_SELECTOR): Add IFUNC_RESOLVER_ARGS
> > argument.
> > * Makefile.in: Regenerate.
> > * auto-config.h.in: Regenerate.
> > * configure: Regenerate.