This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [POWERPC] Don't override gcc -mcpu with wrong asm .machine


On Fri, Oct 20, 2017 at 10:02:12PM -0200, Tulio Magno Quites Machado Filho wrote:
> Alan Modra <amodra@gmail.com> writes:
> 
> > On Fri, Oct 20, 2017 at 03:51:54PM -0200, Tulio Magno Quites Machado Filho wrote:
> >> I understand that ppc64le was never tested on POWER4, but I'm afraid this
> >> failure is actually showing there is another problem.
> >
> > Yes, why is powerpc64/multiarch/memcmp-power4.S being compiled for
> > powerpc64le?
> 
> powerpc64 code is reused in powerpc64le.  It has been working well, but I
> believe we can improve how the Implies mechanism is being used.

Yes, powerpc64le is only supported on power8 and later machines, so
there is no point in having LE code in any of the power4 through
power7 directories, or compiling it.  Adding multi-arch code into the
shared lib that will never be used just bloats it.

I have a fairly large patch in progress to fix this.

Also, if power8 or later includes code from earlier directories then
it would be cleaner to not do so if to support LE we need to put
power7 instructions in power4 directories, as is done in
power4/memcmp.S.

> >   And even with --disable-multiarch!
> 
> Do you mean --disable-multi-arch?
> In my tests, powerpc64/power8/memcmp.S is being used instead.

Ugh, yes, I typoed the option in my configure script.  With
--disable-mult-arch I don't get any power4 code.

BTW, do you know why strcmp and strncmp are ifunc only in libc.so and
not in libc.a?

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]