Date: Sun, 13 Aug 2023 23:37:56 +0200 From: Juraj Lutter <otis@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com> Cc: Mike Karels <mike@karels.net>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Current FreeBSD <freebsd-current@freebsd.org> Subject: Re: Error crosscompiling 14.0-ALPHA1 on amd64 for arm64.aarch64 Message-ID: <D9B03C8B-6A38-4638-BA65-2FB9F70A1C10@FreeBSD.org> In-Reply-To: <3C630E2F-959E-46BC-8DAE-DA19C3A6912E@yahoo.com> References: <3B0BBEB1-D16C-405A-B2FA-F53022CFC925.ref@yahoo.com> <3B0BBEB1-D16C-405A-B2FA-F53022CFC925@yahoo.com> <3AE647E3-B988-4387-BF56-A2DB6533B5FD@FreeBSD.org> <B1A70DF1-994F-47D9-95F2-B79E559EF747@yahoo.com> <3C630E2F-959E-46BC-8DAE-DA19C3A6912E@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 13 Aug 2023, at 23:13, Mark Millard <marklmi@yahoo.com> wrote:
>
> On Aug 13, 2023, at 14:01, Mark Millard <marklmi@yahoo.com> wrote:
>
>> On Aug 13, 2023, at 13:19, Juraj Lutter <otis@freebsd.org> wrote:
>>
>>>> On 13 Aug 2023, at 21:13, Mark Millard <marklmi@yahoo.com> wrote:
>>>>
>>>> But the offical CI builds on amd64 do not have the problem.
>>>>
>>>> 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.
>>>
>>> My src.conf:
>>>
>>> WITHOUT_PROFILE=yes
>>> WITHOUT_TESTS=yes
>>> WITHOUT_STATIC=yes
>>>
>>> WITHOUT_LLVM_TARGET_ALL=yes
>>
>> Starting below this is wrong presuming all
>> builds are actually done on amd64:
>>
>>> .if "${TARGET}" == "arm64" && "${TARGET_ARCH}" == "aarch64"
>>> KERNCONF?=GENERIC-MMCCAM
>>> REPODIR?=/data/poudriere/packages/pkgbase
>>> MODULES_EXTRA="rpi_ft5406"
>>> WITH_LLVM_TARGET_AARCH64=yes
>>> WITH_LLVM_TARGET_ARM=yes
>>> .else
>>> KERNCONF?=GENERIC-NODEBUG
>>> REPODIR?=/data/poudriere/packages/pkgbase
>>> WITH_LLVM_TARGET_AARCH64=yes
>>> WITH_LLVM_TARGET_X86=yes
>>> .endif
>>
>> Ending here.
>>
>> 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.
>>
>> You want the one llvm/clang/lld toolchain that includes
>> everything required to build any/all of:
>>
>> A) amd64
>> B) i386 for amd64's lib32
>> C) aarch64
>> D) armv7 for aarch64's lib32
>>
>> So the *_LLVM_TARGET_* parts would be more like:
>>
>> WITHOUT_PROFILE=yes
>> WITHOUT_TESTS=yes
>> WITHOUT_STATIC=yes
>>
>> WITHOUT_LLVM_TARGET_ALL=yes
>> WITH_LLVM_TARGET_AARCH64=yes
>> WITH_LLVM_TARGET_X86=yes
>> WITH_LLVM_TARGET_AARCH64=yes
>> WITH_LLVM_TARGET_ARM=yes
>
If you look closer, you will see that:
WITH_LLVM_TARGET_AARCH64=yes
WITH_LLVM_TARGET_X86=yes
is in effect when I do “make buildworld” without any TARGET and TARGET_ARCH, i.e. when I build the OS for the host (that is, 14.0/amd64).
But once I specify make TARGET=arm64 TARGET_ARCH=aarch64, only the lines:
WITH_LLVM_TARGET_AARCH64=yes
WITH_LLVM_TARGET_ARM=yes
are in effect. The line “WITH_LLVM_TARGET_ARM=yes” has only been added today for a test, but it did not make any difference.
—
Juraj Lutter
otis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D9B03C8B-6A38-4638-BA65-2FB9F70A1C10>
