From owner-freebsd-ports@freebsd.org Mon Mar 27 12:53:48 2017 Return-Path: Delivered-To: freebsd-ports@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 7A131D2043C; Mon, 27 Mar 2017 12:53:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42BC6A09; Mon, 27 Mar 2017 12:53:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::5868:2545:a766:52d] (unknown [IPv6:2001:470:7a58:0:5868:2545:a766:52d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C37DA1F968; Mon, 27 Mar 2017 14:53:45 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_54747A7A-60FC-41AE-A610-0C40033DAA05"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: FYI: what it takes for RAM+swap to build devel/llvm40 with 4 processors or cores and WITH__DEBUG= (powerpc64 example) Date: Mon, 27 Mar 2017 14:53:39 +0200 In-Reply-To: <45E32F4F-A238-47AA-8E1E-7AD4D9E857D9@dsl-only.net> Cc: FreeBSD Ports , FreeBSD PowerPC ML , FreeBSD Toolchain , FreeBSD Current To: Mark Millard References: <3EDEF0B7-59C5-4648-9737-6682E18645BC@dsl-only.net> <39C60316-F905-490D-B0AB-BC24D7F351A2@dsl-only.net> <7F94CE59-D2CC-4D6F-B1CD-FF3D1F8EDCE7@FreeBSD.org> <45E32F4F-A238-47AA-8E1E-7AD4D9E857D9@dsl-only.net> X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 12:53:48 -0000 --Apple-Mail=_54747A7A-60FC-41AE-A610-0C40033DAA05 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 27 Mar 2017, at 12:25, Mark Millard wrote: > > On 2017-Mar-27, at 2:41 AM, Dimitry Andric wrote: >> On 26 Mar 2017, at 23:36, Mark Millard wrote: ... >>> Installed packages to be REMOVED: >>> llvm40-4.0.0.r4 >>> >>> Number of packages to be removed: 1 >>> >>> The operation will free 49 GiB. >> >> Yes, this is big. But there is no real need to build the llvm ports >> with debug information, unless you want to hack on llvm itself. And >> in that case, you are better served by a Subversion checkout or Git >> clone from upstream instead. ... > Historically unless something extreme like this ends up > involved I build everything using WITH_DEBUG= or explicit > -g's in order to have better information on any failure. The problem with the ports implementation of WITH_DEBUG is that it always disables all optimizations, without a possibility to override. Which bloats the resulting object files, libraries and executables, and especially so for large C++ projects such as LLVM. I can recommend the following workaround. If you want to build a port with optimizations disabled, you can always pass -O0 in CFLAGS. -Dimitry Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 436685) +++ Mk/bsd.port.mk (working copy) @@ -1646,7 +1646,7 @@ MAKE_ENV+= DONTSTRIP=yes STRIP_CMD= ${TRUE} .endif DEBUG_FLAGS?= -g -CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} +CFLAGS:= ${CFLAGS} ${DEBUG_FLAGS} .if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} .endif --Apple-Mail=_54747A7A-60FC-41AE-A610-0C40033DAA05 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAljZC1kACgkQsF6jCi4glqNJ9ACaA7mkaSbBsbXWA54kbVSMwc/k vn8AoIAUO0WmGfOZ1OWXdQfDsgreAgpo =6gZ8 -----END PGP SIGNATURE----- --Apple-Mail=_54747A7A-60FC-41AE-A610-0C40033DAA05--