diff options
author | jperkin <jperkin@pkgsrc.org> | 2016-10-27 10:31:05 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2016-10-27 10:31:05 +0000 |
commit | b0a6ec0b90687a42a03f796596ef58b6e0b1a84d (patch) | |
tree | 1b53197d23a75acfa40b64749be8e9cff790c16c /mk | |
parent | e6d1c9d7980f3f89c85fb57707b79a306a28651d (diff) | |
download | pkgsrc-b0a6ec0b90687a42a03f796596ef58b6e0b1a84d.tar.gz |
Add support for enabling cwrappers automatically. USE_CWRAPPERS now defaults
to "auto", which will enable cwrappers if the _OPSYS_SUPPORTS_CWRAPPERS
platform variable is set to "yes".
Switch over to cwrappers by default for Darwin, Linux, and SunOS (except when
using the sunpro compiler).
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.prefs.mk | 11 | ||||
-rw-r--r-- | mk/defaults/mk.conf | 16 | ||||
-rw-r--r-- | mk/platform/Darwin.mk | 4 | ||||
-rw-r--r-- | mk/platform/Linux.mk | 4 | ||||
-rw-r--r-- | mk/platform/SunOS.mk | 7 |
5 files changed, 30 insertions, 12 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 55516d1b4db..673b48f4062 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.387 2016/06/13 13:26:42 jperkin Exp $ +# $NetBSD: bsd.prefs.mk,v 1.388 2016/10/27 10:31:05 jperkin Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -712,8 +712,13 @@ _PKGSRC_USE_SSP= no _PKGSRC_USE_SSP= yes .endif -# Enable cwrappers if requested unless we're building the wrappers themselves. -.if ${USE_CWRAPPERS:tl} != "no" && empty(PKGPATH:Mpkgtools/cwrappers) +# Enable cwrappers if not building the wrappers themselves, and if the user has +# explicitly requested them, or if they haven't but the compiler/platform is +# known to support them. +.if empty(PKGPATH:Mpkgtools/cwrappers) && \ + (${USE_CWRAPPERS:tl} == "yes" || \ + (${USE_CWRAPPERS:tl} == "auto" && \ + ${_OPSYS_SUPPORTS_CWRAPPERS:Uno} == "yes")) _USE_CWRAPPERS= yes .else _USE_CWRAPPERS= no diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf index 49c9d58e32d..88fa89336ee 100644 --- a/mk/defaults/mk.conf +++ b/mk/defaults/mk.conf @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf,v 1.266 2016/09/18 22:17:55 agc Exp $ +# $NetBSD: mk.conf,v 1.267 2016/10/27 10:31:05 jperkin Exp $ # # This file provides default values for variables that may be overridden @@ -12,11 +12,15 @@ # NOTE TO PEOPLE EDITING THIS FILE - USE LEADING SPACES, NOT LEADING TABS. # ************************************************************************ -USE_CWRAPPERS?= no -# build packages using the newer pkgtools/cwrappers infrastructure. -# WARNING: Experimental! -# Possible: yes, no -# Default: no +USE_CWRAPPERS?= auto +# Build packages using the newer pkgtools/cwrappers infrastructure, which can +# significantly speed up builds and use fewer resources. Some compiler and +# platform combinations are not currently handled by cwrappers, so currently +# the default is "auto" which enables cwrappers automatically if the platform +# _OPSYS_SUPPORTS_CWRAPPERS variable is set to "yes". +# +# Possible: yes, no, auto +# Default: auto (automatic detection, see above) #ALLOW_VULNERABLE_PACKAGES= # allow the user to build packages which are known to be vulnerable to diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index 5087a366ce0..c8b54da504a 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.83 2016/09/06 09:50:20 jperkin Exp $ +# $NetBSD: Darwin.mk,v 1.84 2016/10/27 10:31:06 jperkin Exp $ # # Variable definitions for the Darwin operating system. @@ -153,6 +153,8 @@ BUILDLINK_TRANSFORM+= rm:-Wl,--export-dynamic BUILDLINK_TRANSFORM+= rm:-Wl,--gc-sections BUILDLINK_TRANSFORM+= rm:-Wl,--no-undefined +_OPSYS_SUPPORTS_CWRAPPERS= yes + _OPSYS_CAN_CHECK_SHLIBS= yes # check shared libraries using otool(1) # OSX strip(1) tries to remove relocatable symbols and fails on certain diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index 3e1348fda55..26bfca9aa4d 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.68 2016/09/17 05:41:37 richard Exp $ +# $NetBSD: Linux.mk,v 1.69 2016/10/27 10:31:06 jperkin Exp $ # # Variable definitions for the Linux operating system. @@ -104,6 +104,8 @@ _USE_RPATH= yes # add rpath to LDFLAGS _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip +_OPSYS_SUPPORTS_CWRAPPERS= yes + _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk # check for maximum command line length and set it in configure's environment, diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk index 5f5e1590708..bd6ffee8dc8 100644 --- a/mk/platform/SunOS.mk +++ b/mk/platform/SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: SunOS.mk,v 1.72 2016/08/25 12:08:29 jperkin Exp $ +# $NetBSD: SunOS.mk,v 1.73 2016/10/27 10:31:06 jperkin Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -112,6 +112,11 @@ _OPSYS_SYSTEM_RPATH?= /lib${LIBABISUFFIX}:/usr/lib${LIBABISUFFIX} _OPSYS_LIB_DIRS?= /lib${LIBABISUFFIX} /usr/lib${LIBABISUFFIX} _OPSYS_INCLUDE_DIRS?= /usr/include +# Sun Studio support is untested at this time, but would be strongly desired. +.if ${PKGSRC_COMPILER} != "sunpro" +_OPSYS_SUPPORTS_CWRAPPERS= yes +.endif + # support FORTIFY (with GCC) _OPSYS_SUPPORTS_FORTIFY=yes |