pkgsrc-Bugs archive

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

Re: pkg/48842: Wrong flag for linker to extract all symbols from static archives



On Wed, May 28, 2014 at 1:50 AM,  <manphiz%gmail.com@localhost> wrote:
>>Number:         48842
>>Category:       pkg
>>Synopsis:       Wrong flag for linker to extract all symbols from static 
>>archives
>>Confidential:   no
>>Severity:       serious
>>Priority:       high
>>Responsible:    pkg-manager
>>State:          open
>>Class:          change-request
>>Submitter-Id:   net
>>Arrival-Date:   Wed May 28 08:50:01 +0000 2014
>>Originator:     Xiyue Deng
>>Release:        pkgsrc-current
>>Organization:
>>Environment:
> Darwin Xiyues-MBP.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 
> 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
>>Description:
> The flag for linker to extract all symbols from static archives in Darwin is 
> wrong. It assumes ld is GNU ld which is wrong. The correct flag should be 
> "-Wl,-force_load". A patch is supplied.
>>How-To-Repeat:
>
>>Fix:
> $NetBSD$
>
> --- mk/platform/Darwin.mk.orig  2013-12-31 11:13:43.000000000 +0000
> +++ mk/platform/Darwin.mk
> @@ -120,9 +120,8 @@ _OPSYS_PREFER.linux-pam?=   native
>  _OPSYS_PREFER.mit-krb5?=       native
>
>  # flags passed to the linker to extract all symbols from static archives.
> -# this is GNU ld.
> -_OPSYS_WHOLE_ARCHIVE_FLAG=     -Wl,--whole-archive
> -_OPSYS_NO_WHOLE_ARCHIVE_FLAG=  -Wl,--no-whole-archive
> +_OPSYS_WHOLE_ARCHIVE_FLAG=     -Wl,-force_load
> +_OPSYS_NO_WHOLE_ARCHIVE_FLAG=
>
>  _OPSYS_CAN_CHECK_SHLIBS=       no # can't use readelf in 
> check/bsd.check-vars.mk
>
>

Forgot to mention, package affected by this issue includes
libexecinfo. Details see
http://mail-index.netbsd.org/pkgsrc-users/2014/05/26/msg019743.html.


Home | Main Index | Thread Index | Old Index