tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [pkgsrc-users] Fixes for Darwin in bootstrap-mk-files



Hi,

On Wed, May 28, 2014 at 9:39 PM, PHO <pho%cielonegro.org@localhost> wrote:
> From: Xiyue Deng <manphiz%gmail.com@localhost>
> Subject: [pkgsrc-users] Fixes for Darwin in bootstrap-mk-files
> Date: Wed, 28 May 2014 17:59:32 -0700
>
>> Hi,
>>
>> Building libexecinfo on my Mac OS X 10.9 it fails. After some digging
>> it looks like pkgsrc doesn't handle Darwin correctly. I have proposed
>> a serious of fixes in PR/48842. A summary of changes is the following:
>>
>> * Add OBJECT_FMT "MACH-O", and replace all misused "ELF" on Darwin.
>> * Fix flags (-dynamiclib, -force_load) and extensions (.dylib).
>>
>> The relevant patches are attached here as well.
>>
>> This is a rather big change to the infrastructure, and obviously it
>> needs more work. Comments are very welcome.
>>
>> Thanks.
>
> Looks almost good, but -force_load is not really equivalent to
> --whole-archive. While --whole-archive is a nullary switch to start
> including every object in archive files until --no-whole-archive
> comes, -force_load is an unary option takes one archive file at a
> time, so
>
>   (GNU) % ld --whole-archive libfoo.a libbar.a libbaz.a --no-whole-archive
>
> is equivalent to
>
>   (Apple) % ld -force_load libfoo.a -force_load libbar.a -force_load libbaz.a
>

Understood. For this particular case, it looks like ${SOLIB} can only
be one static library so it should be safe (correct me if I'm wrong).

> Secondly, Apple ld came with old MacOS X (< 10.6; I think) didn't have
> the -force_load option. GNU Libtool emulates it by manually unpacking
> archives and passing objects directly to the linker in that case:
> http://git.savannah.gnu.org/cgit/libtool.git/tree/build-aux/ltmain.in#n7727
>

It looks like bootstrap/README.MacOSX marks version 10.5 and below as
IGNORED, though I'm open to suggestions to support those systems.
Frankly, I suppose software should use
autotools/cmake/other-more-robust-build-systems instead.

Thanks for the comments.

>
> Thanks,
> _______________________________________________________
>  - PHO -                         http://cielonegro.org/
> OpenPGP public key: 1024D/1A86EF72
> Fpr: 5F3E 5B5F 535C CE27 8254  4D1A 14E7 9CA7 1A86 EF72


Home | Main Index | Thread Index | Old Index