pkgsrc-Bugs archive

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

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



>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
 



Home | Main Index | Thread Index | Old Index