From nobody Sun Aug 13 22:11:48 2023 X-Original-To: freebsd-toolchain@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 4RPBbB01nCz4qHH6 for ; Sun, 13 Aug 2023 22:12:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (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 4RPBb95zPPz4RFB for ; Sun, 13 Aug 2023 22:12:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691964724; bh=L5BM6LaDPNSIoulUb1X+rUJQwERAz8hucaQtdkK+2OI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=ffLlsvZWLFxRe+5xNtVXAMcd1TgvdXqjLJV7RR+D0kNI+mTsstNqcHkPUZQE0EngqNe2i3g+o8Rl90w9itC/op2+VdkSGkW0LjQ/0a3FB9Ua9/CyeGJNxclzp9UaB5JTjH+ZwrqukHw4BwxJyhiR4nhBs4GxGI2lSVnJQ5mjKajKyXa6ZALniYG58278elJWXIQk9O/fS0/T7+MLq5upNN2diIHJcTAA/gybAPAC4Ff5NRFnoTe6enDxwwNzoAwJs2MSNvgYDeGjh0JUlx5scXDZucmtIleIdU7Dj+IbPBo4BAY0ruuzBX0Ty3mrGL6hCai485ELIlClQVAsqL9S9g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691964724; bh=3x3TFOky43UWTggZMyygg2fAwBS4Hix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BEkdN4vcz5rvtj9RH4j2un7U4cCnb5_JWGyUB08HVMJMOl68q1smwnJOJqGY91ra 3Hs_VtYuOPFi0DMZRQXARWQLlQBJngvSOUXol8p1GpeBVpVfySFc0CcbgSoZG52rqFkH1JpUddl1 2wUt3kcDJ3f3kM13BM8u6qapqfeP.8ZtWWtgOp2QITqE5Pnrg91n5ka4TcHdV42BK6buZes50e8y 2W7AIyBOg0n81I0BgJiWIryzt5R1JYqTYDjuLCkegrEIxTaHd3DSrKneY._2Dprt01VqSxDE8Fpf eLg1dWCXjqAGqmYf4PLCIMaxpla9esQe5NmFZ9zRTVhjFfNBup7mHo9QkNd6SOv2nA9B0cSDIUGF Zsxrx2SqUz7BGAb4LNxugsELfA73aJyA0PNyGo8DROXXp.RUayNXgXuyAWyqYHh7ZSKCebrVa06Q lx7jqtsgnP_w_fm9FI.zwtNAQ7mvVt.JvfwLqef3S6XU0KkBNyhAIkGxA_pXl3VetEB5dZUTaVwG x1dMH1CD.J8WdS9xyxrF7Ovrg_IqzkhdvJ3EV2HT10uwTp02yvwEyIyxw0BNF9Wg5_QuBOCCqo1_ b_g-- X-Sonic-MF: X-Sonic-ID: a3b3e44f-e94f-4330-af32-c84ba81fe1e4 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Sun, 13 Aug 2023 22:12:04 +0000 Received: by hermes--production-bf1-865889d799-7x4p2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e8e496810bd251cd28f0700eba45e041; Sun, 13 Aug 2023 22:12:01 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Error crosscompiling 14.0-ALPHA1 on amd64 for arm64.aarch64 From: Mark Millard In-Reply-To: Date: Sun, 13 Aug 2023 15:11:48 -0700 Cc: Mike Karels , FreeBSD Toolchain , Current FreeBSD Content-Transfer-Encoding: quoted-printable Message-Id: References: <3B0BBEB1-D16C-405A-B2FA-F53022CFC925.ref@yahoo.com> <3B0BBEB1-D16C-405A-B2FA-F53022CFC925@yahoo.com> <3AE647E3-B988-4387-BF56-A2DB6533B5FD@FreeBSD.org> <3C630E2F-959E-46BC-8DAE-DA19C3A6912E@yahoo.com> To: Juraj Lutter X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RPBb95zPPz4RFB X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] On Aug 13, 2023, at 14:37, Juraj Lutter wrote: > On 13 Aug 2023, at 23:13, Mark Millard wrote: >>=20 >> On Aug 13, 2023, at 14:01, Mark Millard wrote: >>=20 >>> On Aug 13, 2023, at 13:19, Juraj Lutter wrote: >>>=20 >>>>> On 13 Aug 2023, at 21:13, Mark Millard wrote: >>>>>=20 >>>>> But the offical CI builds on amd64 do not have the problem. >>>>>=20 >>>>> We still have not found what is different about your context from = the >>>>> standard context used for CI builds and snapshot builds, all of = which >>>>> have worked find building on amd64 to target aarch64 with armv7 = support. >>>>=20 >>>> My src.conf: >>>>=20 >>>> WITHOUT_PROFILE=3Dyes >>>> WITHOUT_TESTS=3Dyes >>>> WITHOUT_STATIC=3Dyes >>>>=20 >>>> WITHOUT_LLVM_TARGET_ALL=3Dyes >>>=20 >>> Starting below this is wrong presuming all >>> builds are actually done on amd64: >>>=20 >>>> .if "${TARGET}" =3D=3D "arm64" && "${TARGET_ARCH}" =3D=3D "aarch64" >>>> KERNCONF?=3DGENERIC-MMCCAM >>>> REPODIR?=3D/data/poudriere/packages/pkgbase >>>> MODULES_EXTRA=3D"rpi_ft5406" >>>> WITH_LLVM_TARGET_AARCH64=3Dyes >>>> WITH_LLVM_TARGET_ARM=3Dyes >>>> .else >>>> KERNCONF?=3DGENERIC-NODEBUG >>>> REPODIR?=3D/data/poudriere/packages/pkgbase >>>> WITH_LLVM_TARGET_AARCH64=3Dyes >>>> WITH_LLVM_TARGET_X86=3Dyes >>>> .endif >>>=20 >>> Ending here. >>>=20 >>> This is written as if there were separate toolchains for >>> each target. That is not how llvm/clang/lld works, >>> unlike gcc. One toolchain covers all the targets. That >>> is what the FreBSD llvm support is structured for. >>>=20 >>> You want the one llvm/clang/lld toolchain that includes >>> everything required to build any/all of: >>>=20 >>> A) amd64 >>> B) i386 for amd64's lib32 >>> C) aarch64 >>> D) armv7 for aarch64's lib32 >>>=20 >>> So the *_LLVM_TARGET_* parts would be more like: >>>=20 >>> WITHOUT_PROFILE=3Dyes >>> WITHOUT_TESTS=3Dyes >>> WITHOUT_STATIC=3Dyes >>>=20 >>> WITHOUT_LLVM_TARGET_ALL=3Dyes >>> WITH_LLVM_TARGET_AARCH64=3Dyes >>> WITH_LLVM_TARGET_X86=3Dyes >>> WITH_LLVM_TARGET_AARCH64=3Dyes >>> WITH_LLVM_TARGET_ARM=3Dyes >>=20 >=20 > If you look closer, you will see that: >=20 > WITH_LLVM_TARGET_AARCH64=3Dyes Looks like the above was my typing mistake: WITH_LLVM_TARGET_AMD64 ? > WITH_LLVM_TARGET_X86=3Dyes >=20 > is in effect when I do =E2=80=9Cmake buildworld=E2=80=9D without any = TARGET and TARGET_ARCH, i.e. when I build the OS for the host (that is, = 14.0/amd64). WITH_LLVM_TARGET_??? and WITHOUT_LLVM_TARGET_??? control building the LLVM/clang/lld toolchain. What matters is when the llvm/clang/lld materials are built and = installed, and when they are used. The way the builds work for building aarch64 and armv7 buildworld and/or buildkernel materials on amd64, the one-and-the-same toolchain is used thus inside one buildworld/buildkernel run: A) some amd64 files are generated that are later poteitnally run by the amd64 system. (So there is amd64 code generation involved.) B) lots of aarch64/armv7 files are generated that are not run by the amd64 system. (So there is aarch64/armv7 code generation involved too.) The same toolchain is used for both (A) and (B) inside one buildworld run. The toolchain has to support all those targets inside the one buildworld/buildkernel run. The whole type of analysis of avoiding having targets you intend to use not being in some of your toolchain builds is just inappropriate for FreeBSD and how it uses LLVM. Prat of the point of LLVM is to avoid having distinct tool chains (or toolchain builds) for different targets of interest. One toolchain is sufficient. You need to quit using the conditional logic for=20 ???_LLVM_TARGET_??? definitions if your builds are going to systematically work. What you are doing is not like what the CI or snapshot build so that work just fine. no FreeBSD documentatino suggests what you are doing. Make things work more like those and things should work just fine. > But once I specify make TARGET=3Darm64 TARGET_ARCH=3Daarch64, only the = lines: >=20 > WITH_LLVM_TARGET_AARCH64=3Dyes > WITH_LLVM_TARGET_ARM=3Dyes And that is a problem with what you are doing, givne your use of WITHOUT_LLVM_TARGET_ALL=3Dyes . > are in effect. The line =E2=80=9CWITH_LLVM_TARGET_ARM=3Dyes=E2=80=9D = has only been added today for a test, but it did not make any = difference. As I would expect. Make sure that all the targets you are going to build for have "WITH_" status all the time in the amd64 build system, not just sometimes. "WITHOUT_" status should only be for targets that you will never use when building via the amd64 build system. =3D=3D=3D Mark Millard marklmi at yahoo.com