Date: Mon, 27 Mar 2017 14:53:39 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Mark Millard <markmi@dsl-only.net> Cc: FreeBSD Ports <freebsd-ports@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: FYI: what it takes for RAM+swap to build devel/llvm40 with 4 processors or cores and WITH__DEBUG= (powerpc64 example) Message-ID: <F73D89C4-4E7F-469E-8613-17427231E5C0@FreeBSD.org> In-Reply-To: <45E32F4F-A238-47AA-8E1E-7AD4D9E857D9@dsl-only.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <markmi@dsl-only.net> wrote: > > On 2017-Mar-27, at 2:41 AM, Dimitry Andric <dim@FreeBSD.org> wrote: >> On 26 Mar 2017, at 23:36, Mark Millard <markmi@dsl-only.net> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F73D89C4-4E7F-469E-8613-17427231E5C0>