pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add support for enabling cwrappers automatically. ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8b971e78460a
branches: trunk
changeset: 354340:8b971e78460a
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Thu Oct 27 10:31:05 2016 +0000
description:
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:
mk/bsd.prefs.mk | 11 ++++++++---
mk/defaults/mk.conf | 16 ++++++++++------
mk/platform/Darwin.mk | 4 +++-
mk/platform/Linux.mk | 4 +++-
mk/platform/SunOS.mk | 7 ++++++-
5 files changed, 30 insertions(+), 12 deletions(-)
diffs (112 lines):
diff -r c70cd4e97ef9 -r 8b971e78460a mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk Thu Oct 27 10:16:02 2016 +0000
+++ b/mk/bsd.prefs.mk Thu Oct 27 10:31:05 2016 +0000
@@ -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= 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 -r c70cd4e97ef9 -r 8b971e78460a mk/defaults/mk.conf
--- a/mk/defaults/mk.conf Thu Oct 27 10:16:02 2016 +0000
+++ b/mk/defaults/mk.conf Thu Oct 27 10:31:05 2016 +0000
@@ -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 -r c70cd4e97ef9 -r 8b971e78460a mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk Thu Oct 27 10:16:02 2016 +0000
+++ b/mk/platform/Darwin.mk Thu Oct 27 10:31:05 2016 +0000
@@ -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,--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 -r c70cd4e97ef9 -r 8b971e78460a mk/platform/Linux.mk
--- a/mk/platform/Linux.mk Thu Oct 27 10:16:02 2016 +0000
+++ b/mk/platform/Linux.mk Thu Oct 27 10:31:05 2016 +0000
@@ -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 @@
_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 -r c70cd4e97ef9 -r 8b971e78460a mk/platform/SunOS.mk
--- a/mk/platform/SunOS.mk Thu Oct 27 10:16:02 2016 +0000
+++ b/mk/platform/SunOS.mk Thu Oct 27 10:31:05 2016 +0000
@@ -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_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
Home |
Main Index |
Thread Index |
Old Index