Build failure for 5.1.0-RC2 on Mac OS 10.8

Jack Howarth howarth at bromo.med.uc.edu
Wed Dec 12 20:39:01 CET 2012


On Wed, Dec 12, 2012 at 08:23:47AM +0100, Torbjorn Granlund wrote:
> What is the advantage of your Apple-specific code compared to the one I
> put into the repo?
> 
> Sure, using "long" is more compact that using quad.  But I don't think
> the new code runs slower.  Do you disagree?
> 
> I hesitate to change the code again for these reasons:
> 
> 1. The repo code seem to work already, see gmplib.org/devel/tm-date.html
> 2. We're late in the release process.
> 3. Your code variant almost surely will not work on non-darwin systems, so
>    we'd need to invent new m4 macros.
> 4. I am busy writing my disertation.  :-)

Torbjorn,
    The darwin linker developer says that we should avoid your approach and use his
for the following reason.

 The use of absolute addresses (in the .quad table) means the code is not PIC, so it 
 cannot be used in a PIE executable which is the default for x86_64 programs (on Lion and later).

I have tested my patch on Xcode 4.5.2 on darwin12, Xcode 4.5.2 on darwin11,
Xcode 4.2 on darwin10 and Xcode 3.2.6 on darwin10. David Fang will be able
to test darwin9 shortly.
        Jack
ps Note that darwin11 and later is ahead of most distros in that all executables are built
as PIC and linked as pie to fully support Address Space Layout Randomization.

> 
>   > Xcode 4.5.2 on darwin12
>   > Xcode 4.5.2 on darwin11
>   > Xcode 4.2 on darwin10
>   > Xcode 3.2.6 on darwin10
>   > Xcode 3.1.4 on darwin9
> 
> Any chance you could check the present GMP code on these machines?
> 
> PS. You're now the GMP project's unofficial darwin guru.  :-)
> 
> -- 
> Torbjörn


More information about the gmp-bugs mailing list