From owner-freebsd-hackers@freebsd.org Tue Aug 15 04:26:40 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13BACDDE5D4 for ; Tue, 15 Aug 2017 04:26:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-82.reflexion.net [208.70.210.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B849982670 for ; Tue, 15 Aug 2017 04:26:38 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 15817 invoked from network); 15 Aug 2017 04:24:56 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 15 Aug 2017 04:24:56 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.2) with SMTP; Tue, 15 Aug 2017 00:19:57 -0400 (EDT) Received: (qmail 11288 invoked from network); 15 Aug 2017 04:19:57 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Aug 2017 04:19:57 -0000 Received: from [192.168.1.26] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id ED45CEC7B2C; Mon, 14 Aug 2017 21:19:56 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: poudriere use vs. later having debug information and source around in case of problems Message-Id: Date: Mon, 14 Aug 2017 21:19:56 -0700 To: Bryan Drewery , FreeBSD Toolchain , freebsd-hackers X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2017 04:26:40 -0000 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