Date: Mon, 14 Aug 2017 21:19:56 -0700 From: Mark Millard <markmi@dsl-only.net> To: Bryan Drewery <bdrewery@FreeBSD.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org> Subject: poudriere use vs. later having debug information and source around in case of problems Message-ID: <EB51C81B-8C2B-4316-8C01-05EF01BF1DD1@dsl-only.net>
next in thread | raw e-mail | index | archive | help
I've been exploring ports-mgmt/poudriere-devel use, not for building all the ports or huge sets of them but for building those comparatively few that I normally build and install because I use them. Historically I have used: portmaster -DK to leave source code and build materials around for reference in case of problems, leaving them where the debug information then indicates. (Of course more is left around than may be needed but I have the storage space to allow this.) I've also built with debug information (but avoiding disabling optimizations). Currently I do this via adding to /usr/ports/Mk/bsd.port.mk a: ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG to control the behavior and avoiding WITH_DEBUG for ports that give it problematical alternate interpretations ( webkit-qt5* back when I was using it and llvm* ). In /etc/make.conf this use looks like: #From a local /usr/ports/Mk/bsd.port.mk extension: ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG= # .if ${.CURDIR:M*/devel/llvm*} #WITH_DEBUG= .elif ${.CURDIR:M*/www/webkit-qt5*} #WITH_DEBUG= .else WITH_DEBUG= .endif MALLOC_PRODUCTION= In bsd.port.mk it looks like: # svnlite diff /usr/ports/Mk/bsd.port.mk Index: /usr/ports/Mk/bsd.port.mk =================================================================== --- /usr/ports/Mk/bsd.port.mk (revision 447082) +++ /usr/ports/Mk/bsd.port.mk (working copy) @@ -1645,7 +1645,11 @@ STRIP_CMD= ${TRUE} .endif DEBUG_FLAGS?= -g +.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG) +CFLAGS:= ${CFLAGS} ${DEBUG_FLAGS} +.else CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} +.endif .if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} .endif (Noted just to give an idea of the context.) So far I do not see a way of using poudriere to leave the material in place to support debug activity and source inspections and the like if a program later fails. (Note this is not about build-time failures.) Have I missed something? Are there any hooks for doing such? === Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EB51C81B-8C2B-4316-8C01-05EF01BF1DD1>