diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-11-12 14:22:58 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-11-12 14:22:58 +0000 |
commit | 6fc8ee4fa695940657da550101ed79da923fb0fe (patch) | |
tree | 750afd7418929def64b8dc2763263f653416e991 /mk/bsd.prefs.mk | |
parent | 9b5a438016d5026cab40691562b916c7ddc144b0 (diff) | |
download | pkgsrc-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/bsd.prefs.mk')
-rw-r--r-- | mk/bsd.prefs.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 9bd3ab7badc..237a37c22a6 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.401 2018/10/29 01:50:00 sevan Exp $ +# $NetBSD: bsd.prefs.mk,v 1.402 2018/11/12 14:22:58 jperkin Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -766,6 +766,20 @@ _PKGSRC_USE_STACK_CHECK=no _PKGSRC_USE_STACK_CHECK=yes .endif +# Enable CTF conversion if the user requested it, the OPSYS supports it, there +# is a tool for it, and the package supports it. We also need to explicitly +# turn on _INSTALL_UNSTRIPPED as conversion is impossible on stripped files. +# +.if ${PKGSRC_USE_CTF:Uno:tl} == "yes" && \ + ${_OPSYS_SUPPORTS_CTF:Uno:tl} == "yes" && \ + defined(TOOLS_PLATFORM.ctfconvert) && \ + ${CTF_SUPPORTED:Uyes:tl} == "yes" +_PKGSRC_USE_CTF= yes +_INSTALL_UNSTRIPPED= # defined +.else +_PKGSRC_USE_CTF= no +.endif + # 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. |