Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2017 23:04:15 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        Alexey Dokuchaev <danfe@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, Johannes M Dieterich <jmd@FreeBSD.org>, Matthew Rezny <rezny@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:  <7C9A1030-E489-489C-A17B-4981DE429FEA@FreeBSD.org>
In-Reply-To: <20170330175519.GA34411@spindle.one-eyed-alien.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> <20170330170648.GA38004@FreeBSD.org> <B2BA1E9F-3B85-46AC-8FAF-32054D675102@FreeBSD.org> <20170330175519.GA34411@spindle.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_592CEB00-EFD3-48EB-AA9E-58C9F49FC2FF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 30 Mar 2017, at 19:55, Brooks Davis <brooks@freebsd.org> wrote:
>=20
> On Thu, Mar 30, 2017 at 07:26:19PM +0200, Dimitry Andric wrote:
...
>>=20
>> As said, this is because of WITH_DEBUG.  Don't use that for the llvm
>> ports, for now.  It will also allow you to build them with much less =
RAM
>> in the machine: especially linking can take multiple GB when =
debuginfo
>> is enabled, and optimization is off.
>=20
> I'm looking into improving WITH_DEBUG.

I stole the following method from graphics/darktable:

Index: devel/llvm40/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- devel/llvm40/Makefile	(revision 436685)
+++ devel/llvm40/Makefile	(working copy)
@@ -236,6 +236,11 @@ NOT_FOR_ARCH=3D	ia64

 .include <bsd.port.pre.mk>

+.if defined(WITH_DEBUG)
+CMAKE_BUILD_TYPE=3D	RelWithDebInfo
+STRIP=3D
+.endif
+
 _CRTLIBDIR=3D	=
${LLVM_PREFIX:S|${PREFIX}/||}/lib/clang/${LLVM_RELEASE}/lib/freebsd
 .if ${ARCH} =3D=3D "amd64"
 _COMPILER_RT_LIBS=3D \

This appears to work for me.


> P.S. Somewhat off topice, but related.  FAIR WARNING: the days of
> self-hosted 32-bit systems are numbered.  Switching to lld from our
> ancient BFD linker will probably buy us some time, but I'd be =
surprised
> if you will be able to build LLVM+CLANG with a 2GB address space in 5
> years.  The sooner people make their peace with this, the better.

Yes, with that above RelWithDebInfo change, GNU ld tends to use ~5G of
memory to link the larger llvm executables, so that is definitely beyond
i386, even if you run it in a jail on an amd64 host.

And if you would want to use link time optimization, the requirements
will increase even more...

-Dimitry


--Apple-Mail=_592CEB00-EFD3-48EB-AA9E-58C9F49FC2FF
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

iEYEARECAAYFAljdctQACgkQsF6jCi4glqOAPACg7xTJA7vHB7TjgbXTSEJIZWYZ
IncAoIDyrx2mNKWkPlV8Xathqx4p1FY9
=4mOQ
-----END PGP SIGNATURE-----

--Apple-Mail=_592CEB00-EFD3-48EB-AA9E-58C9F49FC2FF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C9A1030-E489-489C-A17B-4981DE429FEA>