public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Help compiling glibc 2.31 wih System V abi for powerpc
@ 2022-04-15 22:42 Manolo Padron Martinez
  2022-04-16 11:16 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Manolo Padron Martinez @ 2022-04-15 22:42 UTC (permalink / raw)
  To: libc-help

Hi:

I'm trying to compile glibc for a device with a powerpc processor that have
an old distro.
I'm using debian and crosscompiling it.
It seems to compile but when I use readelf to check the abi of libc.so I
get UNIX - GNU.
I take a look to all .a files and I have seen that everything is compiled
with UNIX - System V except the entries related to gettimeofday and time in
libc_pic.a.

I think I've tried everything but still get that part with UNIX - GNU.
The configure options I'm trying are this:

--host=powerpc-linux-gnu --enable-oldest-abi  --prefix=/tmp/binglibc
--disable-werror CFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0 -mcall-sysv-noeabi -O2
-U HAVE_ELFV2_ABI

Any idea what I could try?

Thanks in advance

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help compiling glibc 2.31 wih System V abi for powerpc
  2022-04-15 22:42 Help compiling glibc 2.31 wih System V abi for powerpc Manolo Padron Martinez
@ 2022-04-16 11:16 ` Florian Weimer
  2022-04-16 13:15   ` Manolo Padron Martinez
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2022-04-16 11:16 UTC (permalink / raw)
  To: Manolo Padron Martinez via Libc-help

* Manolo Padron Martinez via Libc-help:

> I'm trying to compile glibc for a device with a powerpc processor that have
> an old distro.
> I'm using debian and crosscompiling it.
> It seems to compile but when I use readelf to check the abi of libc.so I
> get UNIX - GNU.
> I take a look to all .a files and I have seen that everything is compiled
> with UNIX - System V except the entries related to gettimeofday and time in
> libc_pic.a.
>
> I think I've tried everything but still get that part with UNIX - GNU.
> The configure options I'm trying are this:
>
> --host=powerpc-linux-gnu --enable-oldest-abi  --prefix=/tmp/binglibc
> --disable-werror CFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0 -mcall-sysv-noeabi -O2
> -U HAVE_ELFV2_ABI

I'm not sure if -mcall-sysv-noeabi is safe.  -U HAVE_ELFV2_ABI won't
have any effect for powerpc (32-bit).

> Any idea what I could try?

The GNU ABI probably comes from IFUNC usage, so you could try
configuring with --disable-multi-arch.  But it would have to be a
strange configuration where the ABI field would matter because your
cross-toolchain is apparently compatible with it, and glibc is as well.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help compiling glibc 2.31 wih System V abi for powerpc
  2022-04-16 11:16 ` Florian Weimer
@ 2022-04-16 13:15   ` Manolo Padron Martinez
  2022-04-16 13:41     ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Manolo Padron Martinez @ 2022-04-16 13:15 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Manolo Padron Martinez via Libc-help

First, Thanks for the answer Florian!

I still have the same problem. libc_pic.a keeps telling me that
gettimeofday and time its using GNU ABI, and when it links libc.so it
becomes GNU ABI.
The reason that I need it in System V its I have an old powerpc with and
old linux distro, when I try to cross compile something for this machine I
get problems because it has an on libc, so I need libc and If I try to use
it with GNU ABI the program said "wrong ABI format" .


On Sat, Apr 16, 2022 at 12:16 PM Florian Weimer <fweimer@redhat.com> wrote:

> * Manolo Padron Martinez via Libc-help:
>
> > I'm trying to compile glibc for a device with a powerpc processor that
> have
> > an old distro.
> > I'm using debian and crosscompiling it.
> > It seems to compile but when I use readelf to check the abi of libc.so I
> > get UNIX - GNU.
> > I take a look to all .a files and I have seen that everything is compiled
> > with UNIX - System V except the entries related to gettimeofday and time
> in
> > libc_pic.a.
> >
> > I think I've tried everything but still get that part with UNIX - GNU.
> > The configure options I'm trying are this:
> >
> > --host=powerpc-linux-gnu --enable-oldest-abi  --prefix=/tmp/binglibc
> > --disable-werror CFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0 -mcall-sysv-noeabi
> -O2
> > -U HAVE_ELFV2_ABI
>
> I'm not sure if -mcall-sysv-noeabi is safe.  -U HAVE_ELFV2_ABI won't
> have any effect for powerpc (32-bit).
>
> > Any idea what I could try?
>
> The GNU ABI probably comes from IFUNC usage, so you could try
> configuring with --disable-multi-arch.  But it would have to be a
> strange configuration where the ABI field would matter because your
> cross-toolchain is apparently compatible with it, and glibc is as well.
>
> Thanks,
> Florian
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help compiling glibc 2.31 wih System V abi for powerpc
  2022-04-16 13:15   ` Manolo Padron Martinez
@ 2022-04-16 13:41     ` Florian Weimer
  2022-04-16 21:51       ` Manolo Padron Martinez
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2022-04-16 13:41 UTC (permalink / raw)
  To: Manolo Padron Martinez; +Cc: Manolo Padron Martinez via Libc-help

* Manolo Padron Martinez:

> I still have the same problem. libc_pic.a keeps telling me that
> gettimeofday and time its using GNU ABI, and when it links libc.so it
> becomes GNU ABI.  The reason that I need it in System V its I have an
> old powerpc with and old linux distro, when I try to cross compile
> something for this machine I get problems because it has an on libc,
> so I need libc and If I try to use it with GNU ABI the program said
> "wrong ABI format" .

So you don't want to replace glibc on the target system?  Then you
shouldn't build a new glibc, but copy the target glibc into your
sysroot.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help compiling glibc 2.31 wih System V abi for powerpc
  2022-04-16 13:41     ` Florian Weimer
@ 2022-04-16 21:51       ` Manolo Padron Martinez
  2022-04-19 10:04         ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Manolo Padron Martinez @ 2022-04-16 21:51 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Manolo Padron Martinez via Libc-help

>
> So you don't want to replace glibc on the target system?  Then you
> shouldn't build a new glibc, but copy the target glibc into your
> sysroot.
>

 Again thank you Florian.

I've tried to use sysroot with configure and so on but it seems the
software i'm trying to compile its ignoring --with-sysroot flag, but I
tried to put all the libs in a directory and force it with -L and it works,
the only problem is the software i'm trying to compile use some features of
libc that are only in the new releases.
So I have to return to my original plan and try to compile glibc with
system v abi.

I'll keep trying to discover what's the reason that changes both time
functions into gnu abi. I took a look at IFUNCS (I didn't know what they
are until you tell me) but I don't see any IFUNC in those functions.

One again, any suggestion would be great.

Thanks again

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help compiling glibc 2.31 wih System V abi for powerpc
  2022-04-16 21:51       ` Manolo Padron Martinez
@ 2022-04-19 10:04         ` Florian Weimer
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Weimer @ 2022-04-19 10:04 UTC (permalink / raw)
  To: Manolo Padron Martinez; +Cc: Manolo Padron Martinez via Libc-help

* Manolo Padron Martinez:

> So I have to return to my original plan and try to compile glibc with
> system v abi.

I still don't understand why you are rebuilding glibc.  If you do not
intend to replace glibc on your target system, rebuilding glibc is
almost certainly the wrong way to approach things.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-19 10:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 22:42 Help compiling glibc 2.31 wih System V abi for powerpc Manolo Padron Martinez
2022-04-16 11:16 ` Florian Weimer
2022-04-16 13:15   ` Manolo Padron Martinez
2022-04-16 13:41     ` Florian Weimer
2022-04-16 21:51       ` Manolo Padron Martinez
2022-04-19 10:04         ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).