From nobody Mon Aug 05 06:15:45 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcmQs37Qlz5SdM6 for ; Mon, 05 Aug 2024 06:16:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-20.consmr.mail.gq1.yahoo.com (sonic310-20.consmr.mail.gq1.yahoo.com [98.137.69.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcmQq4HTrz4bmy for ; Mon, 5 Aug 2024 06:16:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=He2s5+3a; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1722838561; bh=vjGz+OGqZtyZf7xob4dFBl8jytjd+h04D9TP7Pk4Y6o=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=He2s5+3afUSlvIFgHlk/FPaN0Fo5Oa411vULikZ9dimIoVcHVbHwuO+Q88iFimTnNvsjbdB14qGEmP6oM4JvSXSHOHqrbb0w4wN9dCok5n9yOY3ASRTvPKimNQGDt9RNtQFbwtHhS4ubKRQsFPjCNOHZNlVpCH2YtTXP4dQui40zJPwJU4UhUrotlZVh6zCUdU4ZbvFUmT9t38OQxn10RfCEjjz5dyp0tBaTXpdb6ApuFTeRg0K9FPwZnt/8A4MKbtztcYtfUTIG1iWkkYsNdfXW1dWOXIYHWHFzadSSB1xBx2Dc6p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IG.M6EiUZisNSrSZ3k89nsVVFh3SDo5cnISJeyUTzpA5YvAU7fCf PYhQ_8zYvtcyzK3F2hkvv6z.ZknZ9fMLYcGHHVBt.YVverGXn3j.eFgCmg_Ps8sfb1Fg2zAKSiQR o0oP6zHk5vWS6y57U28OL6LXsMU7PYFSwdBRXlgx4qiRXJmKS8PWbSM2DXnBMvwsZwWQMsj8CGqt rR2FkdmeGKtM1gybVoJBjO.0L58cqHN.j.SRA4_vN0w2wdinU8Ow0YUUGxZ7XaPLJXfeBbbIu56F Fe4fCcGiyAYkz8qfeaBtjp6WgJD6rFZqQEeNDrhXX2HmCGEVqNGM5D0Y0LRnNufQ3qrhSUlV.f0c fx4B.YWxhp7A858.rrCBI5K3CEUC98D26R5jGNyVdTisX8qok9gv9b9Kg4_aF.ynmpVTB9oMYBTc sTZs8aCMR9HGoMdS2RgX5CPWJ5HKqHOdVAFcE_mW8CJM9DMOpkK68RZCKavGC2mrcuau.S.IVKMD 3PJDWsSGarXaNtn0po4g53vU.MyUlNgfn7EBpgdRrzlhsMc0bqE._Kf0FdModjOJXsJySFaPiymw FjOT6RIeOzgplBKjEo6TGi1Xb5FXmPX2M4cGPBmJzRwYKu.a1zXRMZzAeZSNUuY.SfKBIDbuV9lE 8rFCm7TYTf8dnci7aupGd20Jdb8t83HukcLtq6Cv1F6DudJNl4UrMF0eTNGYtwW6QUGk6TxQArdt iYA-- X-Sonic-MF: X-Sonic-ID: 381ff592-bc21-495a-bb83-8e759561c448 Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Mon, 5 Aug 2024 06:16:01 +0000 Received: by hermes--production-gq1-5d95dc458-c8wt4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 31cd73eac0c109e33501e5d70b6e6d54; Mon, 05 Aug 2024 06:15:56 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Any known way to build devel/llvm* ( such as devel/llvm19 ) with --threads=1 for its linker activity during the build? Date: Sun, 4 Aug 2024 23:15:45 -0700 References: <4FFD603F-E67C-4B62-B91B-8BE365EAA050@yahoo.com> <82E78798-C376-45C4-80FE-96AD14229419@yahoo.com> To: FreeBSD Toolchain , FreeBSD ARM List In-Reply-To: <82E78798-C376-45C4-80FE-96AD14229419@yahoo.com> Message-Id: <3D14B8AB-E8BF-497C-A84F-90F01A572FA5@yahoo.com> X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.91 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.907]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.146:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.146:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-Rspamd-Queue-Id: 4WcmQq4HTrz4bmy On Aug 4, 2024, at 14:31, Mark Millard wrote: > On Aug 3, 2024, at 23:07, Mark Millard wrote: >=20 >> My recent attempts to build devel/llvm18 and devel/llvm19 in an armv7 = context (native or aarch64-as-armv7) have had /usr/bin/ld failures that = stop the build and report as: >>=20 >> LLVM ERROR: out of memory >> Allocation failed >>=20 >> (no system OOM activity or notices, so just a process = size/fragmentation issue, or so I would expect). >>=20 >> On native armv7 I also had rust 1.79.0 fail that way so --but = aarch64-as-armv7 built it okay. >>=20 >> I'm curious if --threads=3D1 use for the linker might allow the = devel/llvm* builds to complete at this point. Similarly for rust. (top = showed that the ld activity was multi-threaded.) >>=20 >> Note: The structure of the poudriere-devel based native build = attempts is historical and it used to work. Similarly for the = aarch64-as-armv7 based build attempts. For now I'd just be exploring = changes that might allow much of my historical overall structure to = still work. But I expect that things are just growing to the point = building is starting to be problematical with process address spaces = that are bounded by a limit somewhat under 4 GiBytes. >>=20 >>=20 >> Native armv7 was a 2 GiByte OrangePi+ 2ed (4 cores) that had >> at boot time: >>=20 >> AVAIL_RAM+SWAP =3D=3D 1958Mi+3685Mi =3D=3D 5643Mi >>=20 >> and later had "Max(imum)Obs(erved)" figures: >>=20 >> Mem: . . ., >> 1728Mi MaxObsActive, 275192Ki MaxObsWired, 1952Mi = MaxObs(Act+Wir+Lndry) >>=20 >> Swap: 3685Mi Total, . . ., >> 1535Mi MaxObsUsed, 3177Mi MaxObs(Act+Lndry+SwapUsed), >> 3398Mi MaxObs(A+Wir+L+SU), 3449Mi (A+W+L+SU+InAct) >>=20 >>=20 >> The aarch64-as-armv7 was a Win DevKit 2023 that has 8 cores and: >>=20 >> AVAIL_RAM+SWAP =3D=3D 31311Mi+120831Mi =3D=3D 152142Mi >>=20 >> So lots of 4 GiByte or smaller processes would fit. >>=20 >=20 > Absent finding a way to get --threads=3D1 to be what is used, I > made the following crude way to test, built it, installed it > in the armv7 directory tree used for aarch64-as-armv7, and > then started an aarch64-as-armv7 test of building devel/llvm19 > to see what the consequences are (leading whitespace details > might not be preserved): >=20 > # git -C /usr/main-src/ diff contrib/llvm-project/ > diff --git a/contrib/llvm-project/lld/ELF/Driver.cpp = b/contrib/llvm-project/lld/ELF/Driver.cpp > index 8b2c32b15348..299daf7dd6fa 100644 > --- a/contrib/llvm-project/lld/ELF/Driver.cpp > +++ b/contrib/llvm-project/lld/ELF/Driver.cpp > @@ -1587,6 +1587,9 @@ static void readConfigs(opt::InputArgList &args) = { > arg->getValue() + "'"); > parallel::strategy =3D hardware_concurrency(threads); > config->thinLTOJobs =3D v; > + } else if (sizeof(void*) <=3D 4) { > + log("set maximum concurrency to 1, specify --threads=3D to = change"); > + parallel::strategy =3D hardware_concurrency(1); > } else if (parallel::strategy.compute_thread_count() > 16) { > log("set maximum concurrency to 16, specify --threads=3D to = change"); > parallel::strategy =3D hardware_concurrency(16); >=20 > Basically, if the process address space has to be "small", avoid > any default memory use tradeoffs that multi-threading the linker > might involve --even if that means taking more time. >=20 > We will see if: >=20 > [00:00:33] [07] [00:00:00] Building devel/llvm19@default | = llvm19-19.1.0.r1 >=20 > still fails to build as armv7 vs. if the change leads it to > manage to build as armv7. The link attempt for "-o bin/llvm-exegesis" still failed: LLVM ERROR: out of memory Allocation failed A potentially interesting note is that: https://llvm.org/docs/CommandGuide/llvm-exegesis.html reports: QUOTE llvm-exegesis currently only supports X86 (64-bit only), ARM (AArch64 = only), MIPS, and PowerPC (PowerPC64LE only) on Linux for benchmarking. = Not all benchmarking functionality is guaranteed to work on every = platform. llvm-exegesis also has a separate analysis mode that is = supported on every platform that LLVM is. END QUOTE =3D=3D=3D Mark Millard marklmi at yahoo.com