[70475] trunk/dports/devel

Michael Feiri mfeiri at macports.org
Sun Aug 15 14:22:47 PDT 2010


Am 11.08.2010 um 05:55 schrieb Ryan Schmidt:

> On Aug 10, 2010, at 15:53, mfeiri at macports.org wrote:
>
>> Revision: 70475
>>         http://trac.macports.org/changeset/70475
>> Author:   mfeiri at macports.org
>> Date:     2010-08-10 13:53:45 -0700 (Tue, 10 Aug 2010)
>> Log Message:
>> -----------
>> new port to enable link time optimization with a minimal amount of  
>> hacks. fix #19679 and workaround for #23580.
>
>> Added: trunk/dports/devel/ld64/Portfile
>
>> +use_configure   no
>> +build.target
>> +if {${os.major} > 9} {
>> +    build.cmd   true
>> +} else {
>> +    build.cmd   xcodebuild
>> +}
>> +
>> +destroot {
>> +    if {${os.major} > 9} {
>> +        file copy /usr/bin/ld ${destroot}${prefix}/bin
>> +        file copy /usr/bin/rebase ${destroot}${prefix}/bin
>> +        file copy /usr/share/man/man1/ld.1 ${destroot}${prefix}/ 
>> share/man/man1
>> +        file copy /usr/share/man/man1/rebase.1 ${destroot}$ 
>> {prefix}/share/man/man1
>> +    } else {
>> +        file copy ${worksrcpath}/build/Release/ld ${destroot}$ 
>> {prefix}/bin
>> +        file copy ${worksrcpath}/build/Release/rebase ${destroot}$ 
>> {prefix}/bin
>> +        file copy ${worksrcpath}/doc/man/man1/ld.1 ${destroot}$ 
>> {prefix}/share/man/man1
>> +        file copy ${worksrcpath}/doc/man/man1/rebase.1 ${destroot}$ 
>> {prefix}/share/man/man1
>> +    }
>> +}
>
> Hmm. So this means on Snow Leopard and up, you're not using the  
> downloaded distfile at all, really. You could dispense with  
> downloading the distfile at all in that case.

I will change this in the next update.

> Second, it looks like on Snow Leopard and up, you're just copying  
> Apple-provided files into the prefix. What if Apple updates those  
> files in a Mac OS X update or a security update or an Xcode update?  
> Would it be better to install symlinks rather than copy the files?

Unfortunately symlinks dont work in this case, because a different/ 
incompatible version of libLTO.dylib would be used. See issue #19679  
for a discussion of some of the approaches I tried. Copying  
unversioned binaries is clearly not optimal, but it is the best we can  
do until Apple decides to release a complete working set of source  
code for a current version of ld64, see http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00027.html

MfG, Michael



More information about the macports-dev mailing list