From cd8976fe997de657b8abb82e77cecbd990bebcfd Mon Sep 17 00:00:00 2001 From: jperkin Date: Mon, 7 Sep 2015 11:48:35 +0000 Subject: 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. --- mk/platform/Darwin.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mk') diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index bc124fe4eef..3a47fdf5fbb 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.70 2015/09/01 11:12:30 jperkin Exp $ +# $NetBSD: Darwin.mk,v 1.71 2015/09/07 11:48:35 jperkin Exp $ # # Variable definitions for the Darwin operating system. @@ -144,8 +144,12 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive _OPSYS_CAN_CHECK_SHLIBS= yes # check shared libraries using otool(1) +# OSX strip(1) tries to remove relocatable symbols and fails on certain +# objects, resulting in non-zero exit status. We can't modify strip arguments +# (e.g. adding "-u -r" which would fix the issue) when using install -s so for +# now stripping is disabled in that mode. _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-Wl,-x} # cc(1) option to strip -_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip # check for maximum command line length and set it in configure's environment, # to avoid a test required by the libtool script that takes forever. -- cgit v1.2.3