FYI: what it takes for RAM+swap to build devel/llvm40 with 4 processors or cores and WITH__DEBUG= (powerpc64 example)
Dimitry Andric
dim at FreeBSD.org
Mon Mar 27 12:53:48 UTC 2017
On 27 Mar 2017, at 12:25, Mark Millard <markmi at dsl-only.net> wrote:
>
> On 2017-Mar-27, at 2:41 AM, Dimitry Andric <dim at FreeBSD.org> wrote:
>> On 26 Mar 2017, at 23:36, Mark Millard <markmi at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-ppc/attachments/20170327/7037bb89/attachment.sig>
More information about the freebsd-ppc
mailing list