From nobody Tue Sep 03 22:41:12 2024 X-Original-To: freebsd-ports@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 4Wz0wQ5kVJz5MZRf for ; Tue, 03 Sep 2024 22:41:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (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 4Wz0wQ3G42z4GLm for ; Tue, 3 Sep 2024 22:41:26 +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=1725403284; bh=9mgGV/qxRXeZvETCCjuzo30Ss6tGb6cWemqHNNJa2uw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=hU2IKXsq26GFownOGxDoA3SQtTuyTwebYxX3Itg99SkATh9/fuO/Rxh+FaRzbOB52/v2+1V11WaNhPmIvRRV2KFbPUvSrou3NFtSwjTTG6Vzf/UfKT+ertQCCS0BHUoGoXKkSPgcQ+631EIkR7AlT5PwclTD0GDW4UkTbZEttG9ih1113T0/3ifZAVWSbPGtZ4uVi7/p7lpIiPqyHEoUo68qkdTfYoBKJ2dYkyIjE3chOCEPxXiBRql0vz5tf9CLfHasO/ToyEAgeB+N0cFKYjPtrm1K78BvOQ4mcXlsMZxamPreT+2GEU1shwwy8fs9pcdz/27pIGJIz3XH4R6Osg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1725403284; bh=IacsPinKSHX4PilqMIgdtIxQGBCv7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nl5srEIRJG671OEqDP71NywL9vIhVShQ24CoUsRyiutc.L Y8yG5NKm8CccrF0LOLKDP2pHQdlN.bfWwlA0Z75HDX0C030037_Hw7mdCk1hMUSgSTw1y6yWBbF0 zK3CkTguHEqeDQc70KyKFkupyrh15tddDYjVGYSmfdzD6xS.HpxboGvgMaPgHDsUdKmdqCWiDeG0 .Bw89nk9jQEmYgKDxlc1YCUGFG9zRRKvV4z3ZALiTcctLPip4fODjwBqqB6ITswUGWt1IXyA7bjA sTBsBxySeL8wnGi8ky2GFZjgbww7tTASnBszVWYp8DVkjEl6y7VguI98C0unyKPzNoLMF6p_VCYO 0nIWA4bEOelqGXALllFyUCe6fZIHeyECktcCJf52oomwUDoHIEI.dOR1Y6fv8CPhdpsAg8lWsJtv HOJesG25rhs51iS1SwYmQpW_VnKSAJsHb55fsNKSFyyovT2XFv3fM9z9hiQZ8P7MHCNqXI.mu_.7 WLvKcT2kBi9lJrAp4AOrEAxMuYnHkrOTrNimgocjf X-Sonic-MF: X-Sonic-ID: ddee546b-0981-4fc8-8a5a-adb3644d2e5e Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Tue, 3 Sep 2024 22:41:24 +0000 Received: by hermes--production-gq1-5d95dc458-dxlpk (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4ba3705a8c3afb2f4da41e83db7a9632; Tue, 03 Sep 2024 22:41:23 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: For an armv7 context, /usr/local/llvm1[789]/lib/clang/1[789]/include/arm_bf16.h does not exist: one thing blocking a firefox build via llvm1[78] From: Mark Millard In-Reply-To: Date: Tue, 3 Sep 2024 15:41:12 -0700 Cc: FreeBSD Mailing List , FreeBSD ARM List , FreeBSD Toolchain , Tomoaki AOKI Content-Transfer-Encoding: quoted-printable Message-Id: <67D7CB10-48E1-4E4F-A632-087CF7B2ADD0@yahoo.com> References: <75609A57-7B50-40F5-88A8-0278CCCC018B@yahoo.com> <5BEBBFCB-A877-4124-B07F-D4C6D25B7026@yahoo.com> <02BE22BE-7E86-43D1-86D8-85A527625AD6@yahoo.com> To: Brooks Davis X-Mailer: Apple Mail (2.3776.700.51) 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] X-Rspamd-Queue-Id: 4Wz0wQ3G42z4GLm >> . . . >=20 > I've gone ahead and added arm_bf16.h back in my latest llvm19 update. = (I > just realized I did something more convoluted than necessicary and = will > fix it in the next update.) >=20 > I'm still not sure how a file in a list in cmake named > aarch64_only_generated_files ends up on an ARM only build, but so it = goes. > I'll merge to 17 and 18 as time permits. Well, I expect that you were depending on an error in clang/lib/Headers/CMakeLists.txt . Details follow . . . clang/lib/Headers/CMakeLists.txt has: # Generate header files and copy them to the build directory if(ARM IN_LIST LLVM_TARGETS_TO_BUILD OR AArch64 IN_LIST = LLVM_TARGETS_TO_BUILD) . . . # Generate arm_bf16.h clang_generate_header(-gen-arm-bf16 arm_bf16.td arm_bf16.h) . . . Both ARM and AArch64 generate the file. Later (in the '. . .' text there is filtering via other lists of headers formed: list(APPEND aarch64_only_generated_files "${CMAKE_CURRENT_BINARY_DIR}/arm_sve.h" "${CMAKE_CURRENT_BINARY_DIR}/arm_sme.h" "${CMAKE_CURRENT_BINARY_DIR}/arm_bf16.h" "${CMAKE_CURRENT_BINARY_DIR}/arm_vector_types.h" ) But, DDI0487K_a_a-profile_architecture_reference_manual.pdf indicates that there are two BF16 features, one for AArch32 and one for AArch64: FEAT_AA32BF16 and: FEAT_BF16 That matches up with the clang code: clang/lib/Basic/Targets/ARM.cpp has: if (HasBFloat16) { Builder.defineMacro("__ARM_FEATURE_BF16", "1"); Builder.defineMacro("__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", "1"); Builder.defineMacro("__ARM_BF16_FORMAT_ALTERNATIVE", "1"); } ( so: AArch32 is handled by ARM.cpp ) and clang/lib/Basic/Targets/AArch64.cpp has: if (HasBFloat16) { Builder.defineMacro("__ARM_FEATURE_BF16", "1"); Builder.defineMacro("__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", "1"); Builder.defineMacro("__ARM_BF16_FORMAT_ALTERNATIVE", "1"); } ( so: AArch64 is handled by AArch64.cpp ). That leads aarch64_only_generated_files looking to just be wrong relative to bf16. I'd expect that: "${CMAKE_CURRENT_BINARY_DIR}/arm_bf16.h" should have instead been listed in: list(APPEND arm_common_generated_files "${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h" "${CMAKE_CURRENT_BINARY_DIR}/arm_fp16.h" ) I expect that this comes down to Target ARM being what supports AArch32 (and, so, its FEAT_AA32BF16) even for armv8. Target AArch64 looks to just support FEAT_BF16. =3D=3D=3D Mark Millard marklmi at yahoo.com