Mon Sep 7 11:48:35 2015 UTC ()
Disable the strip flag for install(1) by default on Darwin.  When called
without arguments, strip(1) will attempt to strip all symbols by default,
and when it is unable to do this will fail with a non-zero exit status.

Passing '-u -r' to strip(1) would in theory resolve the issue, but there
is no simple of way of doing this due to the way strip is called by the
native install program through XCode.  We would need to build a patched
bsdinstall for Darwin, so for now we just disable stripping on install,
as many packages have had to do individually up until now.


(jperkin)
diff -r1.70 -r1.71 pkgsrc/mk/platform/Darwin.mk

cvs diff -r1.70 -r1.71 pkgsrc/mk/platform/Darwin.mk (expand / switch to unified diff)

--- pkgsrc/mk/platform/Darwin.mk 2015/09/01 11:12:30 1.70
+++ pkgsrc/mk/platform/Darwin.mk 2015/09/07 11:48:35 1.71
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Darwin.mk,v 1.70 2015/09/01 11:12:30 jperkin Exp $ 1# $NetBSD: Darwin.mk,v 1.71 2015/09/07 11:48:35 jperkin Exp $
2# 2#
3# Variable definitions for the Darwin operating system. 3# Variable definitions for the Darwin operating system.
4 4
5# OS, Kernel, Xcode Version 5# OS, Kernel, Xcode Version
6# Note that Xcode gets updates on older systems sometimes. 6# Note that Xcode gets updates on older systems sometimes.
7# pkgsrc generally expects that the most up-to-date xcode available for 7# pkgsrc generally expects that the most up-to-date xcode available for
8# an OS version is installed 8# an OS version is installed
9# 9#
10# Codename OS Kernel Xcode 10# Codename OS Kernel Xcode
11# Cheetah 10.0.x 1.3.1 11# Cheetah 10.0.x 1.3.1
12# Puma 10.1 1.4.1 12# Puma 10.1 1.4.1
13# 10.1.x 5.x.y 13# 10.1.x 5.x.y
14# Jaguar 10.2.x 6.x.y 14# Jaguar 10.2.x 6.x.y
@@ -134,28 +134,32 @@ _OPSYS_PREFER.openssl?= pkgsrc # builti @@ -134,28 +134,32 @@ _OPSYS_PREFER.openssl?= pkgsrc # builti
134 134
135# flags passed to the linker to extract all symbols from static archives. 135# flags passed to the linker to extract all symbols from static archives.
136# this is GNU ld. 136# this is GNU ld.
137.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) 137.if empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
138_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force-load 138_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,-force-load
139_OPSYS_NO_WHOLE_ARCHIVE_FLAG=  139_OPSYS_NO_WHOLE_ARCHIVE_FLAG=
140.else 140.else
141_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive 141_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
142_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive 142_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
143.endif 143.endif
144 144
145_OPSYS_CAN_CHECK_SHLIBS= yes # check shared libraries using otool(1) 145_OPSYS_CAN_CHECK_SHLIBS= yes # check shared libraries using otool(1)
146 146
 147# OSX strip(1) tries to remove relocatable symbols and fails on certain
 148# objects, resulting in non-zero exit status. We can't modify strip arguments
 149# (e.g. adding "-u -r" which would fix the issue) when using install -s so for
 150# now stripping is disabled in that mode.
147_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip 151_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip
148_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip 152_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip
149 153
150# check for maximum command line length and set it in configure's environment, 154# check for maximum command line length and set it in configure's environment,
151# to avoid a test required by the libtool script that takes forever. 155# to avoid a test required by the libtool script that takes forever.
152_OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax 156_OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax
153 157
154# Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU 158# Darwin 7.7.x has poll() in libc, but no poll.h. Try to help GNU
155# configure packages that break because of this by pretending that 159# configure packages that break because of this by pretending that
156# there is no poll(). 160# there is no poll().
157.if defined(GNU_CONFIGURE) 161.if defined(GNU_CONFIGURE)
158. if !exists(/usr/include/poll.h) && !exists(/usr/include/sys/poll.h) 162. if !exists(/usr/include/poll.h) && !exists(/usr/include/sys/poll.h)
159CONFIGURE_ENV+= ac_cv_func_poll=no 163CONFIGURE_ENV+= ac_cv_func_poll=no
160. endif 164. endif
161.endif 165.endif