* Building glibc on MIPS with -mplt
@ 2012-02-16 10:01 Aurelien Jarno
2012-02-16 12:53 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2012-02-16 10:01 UTC (permalink / raw)
To: libc-ports
Hi,
I am trying to build glibc, in the o32, n32 and n64 ABI with a GCC
compiler defaulting to -mplt. While it works on the o32 and n64 ABI,
it doesn't work on the n32 ABI, for which I get some functions without
cancellation, as detected by tst-cancel-wrappers.sh.
After some investigation it appears that sysdep-cancel.h for mips64
(that is for n32 and n64) doesn't handle the non -fPIC case, while the
version for mips32 does handle it since commit 63fb881a, that is the
commit handling PLT support. Strangely it works for n64 as -fPIC seems
to be enabled even with -mplt.
First of all, I would like to have your opinion on having a GCC compiler
defaulting to -mplt (that is configured with --with-mips-plt), is it a
good thing or not? Secondly does it make sense to try to build the glibc
with -mplt, or -mno-plt is a better option for this? In one case we can
force -mno-plt if needed in the configure script, in the other case we
should fix sysdep-cancel.h for mips64.
Thanks,
Aurelien
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Building glibc on MIPS with -mplt
2012-02-16 10:01 Building glibc on MIPS with -mplt Aurelien Jarno
@ 2012-02-16 12:53 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2012-02-16 12:53 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: libc-ports
On Thu, 16 Feb 2012, Aurelien Jarno wrote:
> I am trying to build glibc, in the o32, n32 and n64 ABI with a GCC
> compiler defaulting to -mplt. While it works on the o32 and n64 ABI,
> it doesn't work on the n32 ABI, for which I get some functions without
> cancellation, as detected by tst-cancel-wrappers.sh.
That sounds like a bug, not "doesn't work" (I've seen those failures for
n32 before but not investigated them).
> After some investigation it appears that sysdep-cancel.h for mips64
> (that is for n32 and n64) doesn't handle the non -fPIC case, while the
> version for mips32 does handle it since commit 63fb881a, that is the
> commit handling PLT support. Strangely it works for n64 as -fPIC seems
> to be enabled even with -mplt.
As I recall, non-PIC isn't actually beneficial for n64 (64-bit addresses
take too many instructions to load).
> First of all, I would like to have your opinion on having a GCC compiler
> defaulting to -mplt (that is configured with --with-mips-plt), is it a
> good thing or not? Secondly does it make sense to try to build the glibc
> with -mplt, or -mno-plt is a better option for this? In one case we can
> force -mno-plt if needed in the configure script, in the other case we
> should fix sysdep-cancel.h for mips64.
Building with -mplt (configuring the compiler --with-mips-plt) is a good
idea. That is, sysdep-cancel.h should be fixed as needed.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-16 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 10:01 Building glibc on MIPS with -mplt Aurelien Jarno
2012-02-16 12:53 ` Joseph S. Myers
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).