summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2018-11-12 14:22:58 +0000
committerjperkin <jperkin@pkgsrc.org>2018-11-12 14:22:58 +0000
commit6fc8ee4fa695940657da550101ed79da923fb0fe (patch)
tree750afd7418929def64b8dc2763263f653416e991 /mk/platform
parent9b5a438016d5026cab40691562b916c7ddc144b0 (diff)
downloadpkgsrc-6fc8ee4fa695940657da550101ed79da923fb0fe.tar.gz
mk: Add CTF infrastructure support.
Platform support is determined by _OPSYS_SUPPORTS_CTF from mk/platform, the user enables support by setting PKGSRC_USE_CTF=yes, and packages can explicitly disable support with CTF_SUPPORTED=no or skip certain files with CTF_FILES_SKIP. The path to ctfconvert is configured via TOOLS_PLATFORM.ctfconvert. If all of the requisite variables are enabled, a compiler-specific debug flag is passed via the wrappers to ensure we have DWARF information to convert, _INSTALL_UNSTRIPPED is explicitly defined to avoid binaries being stripped prior to conversion, and the conversion is performed during the install stage. It is recommended that users who enable the feature also set STRIP_DEBUG=yes to reduce the final binary size once the conversion has been performed. This has been used for the past year in Joyent SmartOS builds. FreeBSD is marked as supported but is untested.
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/FreeBSD.mk3
-rw-r--r--mk/platform/SunOS.mk13
2 files changed, 7 insertions, 9 deletions
diff --git a/mk/platform/FreeBSD.mk b/mk/platform/FreeBSD.mk
index fac7fc22486..973b6ed645c 100644
--- a/mk/platform/FreeBSD.mk
+++ b/mk/platform/FreeBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: FreeBSD.mk,v 1.36 2017/10/03 13:18:00 jperkin Exp $
+# $NetBSD: FreeBSD.mk,v 1.37 2018/11/12 14:22:58 jperkin Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -77,6 +77,7 @@ PKG_HAVE_KQUEUE= # defined
_OPSYS_SUPPORTS_SSP= yes
.endif
+_OPSYS_SUPPORTS_CTF= yes # Compact Type Format conversion.
_OPSYS_SUPPORTS_CWRAPPERS= yes
_OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
_OPSYS_CAN_CHECK_SSP= no # only supports libssp at this time
diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk
index c7cd4837fca..bd7f920bbd1 100644
--- a/mk/platform/SunOS.mk
+++ b/mk/platform/SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.78 2018/11/05 19:26:38 schmonz Exp $
+# $NetBSD: SunOS.mk,v 1.79 2018/11/12 14:22:58 jperkin Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -127,13 +127,10 @@ _OPSYS_INCLUDE_DIRS?= /usr/include
_OPSYS_SUPPORTS_CWRAPPERS= yes
.endif
-# support FORTIFY (with GCC)
-_OPSYS_SUPPORTS_FORTIFY=yes
-
-# support stack protection (with GCC)
-_OPSYS_SUPPORTS_SSP?= yes
-
-_OPSYS_CAN_CHECK_SHLIBS= yes # requires readelf
+_OPSYS_SUPPORTS_CTF= yes # Compact Type Format conversion.
+_OPSYS_SUPPORTS_FORTIFY= yes # Requires GCC
+_OPSYS_SUPPORTS_SSP?= yes # Requires GCC
+_OPSYS_CAN_CHECK_SHLIBS= yes # Requires readelf
# 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.