pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Thu Oct 27 10:31:06 UTC 2016

Modified Files:
        pkgsrc/mk: bsd.prefs.mk
        pkgsrc/mk/defaults: mk.conf
        pkgsrc/mk/platform: Darwin.mk Linux.mk SunOS.mk

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.387 -r1.388 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -u -r1.266 -r1.267 pkgsrc/mk/defaults/mk.conf
cvs rdiff -u -r1.83 -r1.84 pkgsrc/mk/platform/Darwin.mk
cvs rdiff -u -r1.68 -r1.69 pkgsrc/mk/platform/Linux.mk
cvs rdiff -u -r1.72 -r1.73 pkgsrc/mk/platform/SunOS.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.387 pkgsrc/mk/bsd.prefs.mk:1.388
--- pkgsrc/mk/bsd.prefs.mk:1.387        Mon Jun 13 13:26:42 2016
+++ pkgsrc/mk/bsd.prefs.mk      Thu Oct 27 10:31:05 2016
@@ -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

Index: pkgsrc/mk/defaults/mk.conf
diff -u pkgsrc/mk/defaults/mk.conf:1.266 pkgsrc/mk/defaults/mk.conf:1.267
--- pkgsrc/mk/defaults/mk.conf:1.266    Sun Sep 18 22:17:55 2016
+++ pkgsrc/mk/defaults/mk.conf  Thu Oct 27 10:31:05 2016
@@ -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

Index: pkgsrc/mk/platform/Darwin.mk
diff -u pkgsrc/mk/platform/Darwin.mk:1.83 pkgsrc/mk/platform/Darwin.mk:1.84
--- pkgsrc/mk/platform/Darwin.mk:1.83   Tue Sep  6 09:50:20 2016
+++ pkgsrc/mk/platform/Darwin.mk        Thu Oct 27 10:31:06 2016
@@ -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-dy
 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

Index: pkgsrc/mk/platform/Linux.mk
diff -u pkgsrc/mk/platform/Linux.mk:1.68 pkgsrc/mk/platform/Linux.mk:1.69
--- pkgsrc/mk/platform/Linux.mk:1.68    Sat Sep 17 05:41:37 2016
+++ pkgsrc/mk/platform/Linux.mk Thu Oct 27 10:31:06 2016
@@ -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,

Index: pkgsrc/mk/platform/SunOS.mk
diff -u pkgsrc/mk/platform/SunOS.mk:1.72 pkgsrc/mk/platform/SunOS.mk:1.73
--- pkgsrc/mk/platform/SunOS.mk:1.72    Thu Aug 25 12:08:29 2016
+++ pkgsrc/mk/platform/SunOS.mk Thu Oct 27 10:31:06 2016
@@ -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
 _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