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: Multilib mips build question


On Tue, 25 Sep 2012, Steve Ellcey  wrote:

> Before rebuilding to a single sysroot I looked at the usr/include directories
> for each of these builds and while the include files for the two mips64r2
> builds match, the usr/include/huge_vall.h and usr/include/ieee754.h files in
> the mips32r2 include directory are different then the mips64r2 ones.  I think
> this is due to the Implies files.

I advise working out what is correct for MIPS (possibly headers with ABI 
conditionals) and then creating appropriate MIPS-specific versions of 
these headers

> The ports/sysdeps/mips directory and the ports/sysdeps/mips/mips64 directory
> have Implies that contain:
> 
>         # MIPS uses IEEE 754 floating point.
>         ieee754/flt-32
>         ieee754/dbl-64
> 
> But in ports/sysdeps/mips/mips32 directory there is:
> 
>         mips
>         wordsize-32
> 
> I am not sure why this difference exists or if it should.  Can anyone
> help me understand why the mips setup is this way?

The general answer for Implies entries is that they set up a directory 
ordering that empirically is correct, and changing them is risky because 
almost any change can perturb the ordering and cause unintended changes to 
what files are used.  See discussion on libc-alpha over the past year 
about the problems with Implies files.

Accordingly, to get headers with the right conditionals in them used 
everywhere, it might well make sense to create a new mips/float (for 
example) sysdeps directory with just the two headers in question in it (in 
MIPS-specific versions allowing for the different ABIs), as if the 
directory just has the two headers then it's reasonably safe to add to the 
top of the relevant Implies files (though you need to check that does 
really work to get the desired header installed for all ABIs).

More generally, it may often be the case that headers for 64-bit ABIs work 
for 32-bit but not vice versa.  Only in 2.16 was this fixed for x86 so 
that a single unified set of headers is installed for all ABIs; it's not 
particularly surprising that MIPS still needs some work to get to that 
point of having identical headers installed whatever ABI.

-- 
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]