This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: Building glibc on MIPS with -mplt


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


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