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

_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to