Message ID | 20220117150002.16976-1-anders.dellien@arm.com |
---|---|
State | New |
Headers | show |
Series | [1/3] arm-toolchain: Fetch prebuilt Android Clang, version r416183b | expand |
Can you also add this recipe to the ci/toolchains.yml job? Ross On Mon, 17 Jan 2022 at 15:02, Anders Dellien <anders.dellien@arm.com> wrote: > > From: Usama Arif <usama.arif@arm.com> > > This Clang version is present in Android master > (as of October 8, 2021) > > Signed-off-by: Usama Arif <usama.arif@arm.com> > Signed-off-by: Anders Dellien <anders.dellien@arm.com> > Change-Id: I957742ee943ef68119fd7c7e2bd8ee62b717b31c > --- > .../androidclang_r416183b.bb | 50 +++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > > diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > new file mode 100644 > index 00000000..316cbb93 > --- /dev/null > +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > @@ -0,0 +1,50 @@ > +# SPDX-License-Identifier: MIT > +# > +# Copyright (c) 2021 Arm Limited > +# > + > +SUMMARY = "Android Clang compiler" > +DESCRIPTION = "Android Clang compiler, version r416183b. This is based on Clang 12.0.5 \ > +Intended usage is to build kernel images that match the output of the Android (hermetic) \ > +build system" > + > +LICENSE = "MIT" > + > +LIC_FILES_CHKSUM = "file://MODULE_LICENSE_MIT;md5=d41d8cd98f00b204e9800998ecf8427e" > + > +ANDROID_CLANG_VERSION = "clang-r416183b" > +ANDROID_CLANG_HASH = "bd96dfe349c962681f0e5388af874c771ef96670" > + > +COMPATIBLE_HOST = "x86_64.*-linux" > + > +SRC_URI = "https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/${ANDROID_CLANG_HASH}/${ANDROID_CLANG_VERSION}.tar.gz;subdir=${ANDROID_CLANG_VERSION}" > + > +# We need to set the checksum to "ignore" because the tarball is dynamically generated and has a new checksum every time > +# (the contents are the same, but the time stamp differs) > +BB_STRICT_CHECKSUM = "ignore" > + > +S = "${WORKDIR}/${ANDROID_CLANG_VERSION}" > + > +do_install() { > + # We should really use ${libexecdir} here, but that as some files have invalid RPATH > + # this results in lots of warning. So using ${datadir} for now > + install -d ${D}${datadir}/${ANDROID_CLANG_VERSION}/ > + > + cp --no-preserve=ownership -r ${S}/. ${D}${datadir}/${ANDROID_CLANG_VERSION}/ > + > + install -d ${D}${bindir} > + # Symlink all executables into bindir > + for f in ${D}${datadir}/${ANDROID_CLANG_VERSION}/bin/*; do > + ln -rs $f ${D}${bindir}/$(basename $f) > + done > +} > + > +INHIBIT_DEFAULT_DEPS = "1" > + > +INSANE_SKIP:${PN} = "already-stripped libdir staticdev file-rdeps arch dev-so" > + > +INHIBIT_SYSROOT_STRIP = "1" > +INHIBIT_PACKAGE_STRIP = "1" > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" > + > +BBCLASSEXTEND = "native nativesdk" > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#2840): https://lists.yoctoproject.org/g/meta-arm/message/2840 > Mute This Topic: https://lists.yoctoproject.org/mt/88485376/1676615 > Group Owner: meta-arm+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [ross@burtonini.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Mon, 17 Jan 2022 at 20:32, Anders Dellien <anders.dellien@arm.com> wrote: > > From: Usama Arif <usama.arif@arm.com> > > This Clang version is present in Android master > (as of October 8, 2021) > Is there any specific motivation to use a pre-built Android clang compiler rather than one built from source using meta-clang? -Sumit > Signed-off-by: Usama Arif <usama.arif@arm.com> > Signed-off-by: Anders Dellien <anders.dellien@arm.com> > Change-Id: I957742ee943ef68119fd7c7e2bd8ee62b717b31c > --- > .../androidclang_r416183b.bb | 50 +++++++++++++++++++ > 1 file changed, 50 insertions(+) > create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > > diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > new file mode 100644 > index 00000000..316cbb93 > --- /dev/null > +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb > @@ -0,0 +1,50 @@ > +# SPDX-License-Identifier: MIT > +# > +# Copyright (c) 2021 Arm Limited > +# > + > +SUMMARY = "Android Clang compiler" > +DESCRIPTION = "Android Clang compiler, version r416183b. This is based on Clang 12.0.5 \ > +Intended usage is to build kernel images that match the output of the Android (hermetic) \ > +build system" > + > +LICENSE = "MIT" > + > +LIC_FILES_CHKSUM = "file://MODULE_LICENSE_MIT;md5=d41d8cd98f00b204e9800998ecf8427e" > + > +ANDROID_CLANG_VERSION = "clang-r416183b" > +ANDROID_CLANG_HASH = "bd96dfe349c962681f0e5388af874c771ef96670" > + > +COMPATIBLE_HOST = "x86_64.*-linux" > + > +SRC_URI = "https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/${ANDROID_CLANG_HASH}/${ANDROID_CLANG_VERSION}.tar.gz;subdir=${ANDROID_CLANG_VERSION}" > + > +# We need to set the checksum to "ignore" because the tarball is dynamically generated and has a new checksum every time > +# (the contents are the same, but the time stamp differs) > +BB_STRICT_CHECKSUM = "ignore" > + > +S = "${WORKDIR}/${ANDROID_CLANG_VERSION}" > + > +do_install() { > + # We should really use ${libexecdir} here, but that as some files have invalid RPATH > + # this results in lots of warning. So using ${datadir} for now > + install -d ${D}${datadir}/${ANDROID_CLANG_VERSION}/ > + > + cp --no-preserve=ownership -r ${S}/. ${D}${datadir}/${ANDROID_CLANG_VERSION}/ > + > + install -d ${D}${bindir} > + # Symlink all executables into bindir > + for f in ${D}${datadir}/${ANDROID_CLANG_VERSION}/bin/*; do > + ln -rs $f ${D}${bindir}/$(basename $f) > + done > +} > + > +INHIBIT_DEFAULT_DEPS = "1" > + > +INSANE_SKIP:${PN} = "already-stripped libdir staticdev file-rdeps arch dev-so" > + > +INHIBIT_SYSROOT_STRIP = "1" > +INHIBIT_PACKAGE_STRIP = "1" > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" > + > +BBCLASSEXTEND = "native nativesdk" > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#2840): https://lists.yoctoproject.org/g/meta-arm/message/2840 > Mute This Topic: https://lists.yoctoproject.org/mt/88485376/1777089 > Group Owner: meta-arm+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [sumit.garg@linaro.org] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi, The reason we need this is that we would like to use a Yocto-built BSP to boot our Android stack (which includes GPU support), and for that to work we need to build it with this specific compiler. Thanks, Anders
On Mon, 17 Jan 2022 15:00:00 +0000, Anders Dellien wrote: > This Clang version is present in Android master > (as of October 8, 2021) Applied, thanks! [1/3] arm-toolchain: Fetch prebuilt Android Clang, version r416183b commit: c4fb4f53cb3fcf87d08e93ae30f4a6734bd16c7b [2/3] arm-toolchain: Support linux-arm64-ack build with Android Clang commit: db56f59865383eb91273570645b7063bbf391716 [3/3] arm: update Android common kernel and config commit: daa8388dadb4ebc24e3884ceb596cdb9f166ea25 Best regards,
diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb new file mode 100644 index 00000000..316cbb93 --- /dev/null +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: MIT +# +# Copyright (c) 2021 Arm Limited +# + +SUMMARY = "Android Clang compiler" +DESCRIPTION = "Android Clang compiler, version r416183b. This is based on Clang 12.0.5 \ +Intended usage is to build kernel images that match the output of the Android (hermetic) \ +build system" + +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://MODULE_LICENSE_MIT;md5=d41d8cd98f00b204e9800998ecf8427e" + +ANDROID_CLANG_VERSION = "clang-r416183b" +ANDROID_CLANG_HASH = "bd96dfe349c962681f0e5388af874c771ef96670" + +COMPATIBLE_HOST = "x86_64.*-linux" + +SRC_URI = "https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/${ANDROID_CLANG_HASH}/${ANDROID_CLANG_VERSION}.tar.gz;subdir=${ANDROID_CLANG_VERSION}" + +# We need to set the checksum to "ignore" because the tarball is dynamically generated and has a new checksum every time +# (the contents are the same, but the time stamp differs) +BB_STRICT_CHECKSUM = "ignore" + +S = "${WORKDIR}/${ANDROID_CLANG_VERSION}" + +do_install() { + # We should really use ${libexecdir} here, but that as some files have invalid RPATH + # this results in lots of warning. So using ${datadir} for now + install -d ${D}${datadir}/${ANDROID_CLANG_VERSION}/ + + cp --no-preserve=ownership -r ${S}/. ${D}${datadir}/${ANDROID_CLANG_VERSION}/ + + install -d ${D}${bindir} + # Symlink all executables into bindir + for f in ${D}${datadir}/${ANDROID_CLANG_VERSION}/bin/*; do + ln -rs $f ${D}${bindir}/$(basename $f) + done +} + +INHIBIT_DEFAULT_DEPS = "1" + +INSANE_SKIP:${PN} = "already-stripped libdir staticdev file-rdeps arch dev-so" + +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "native nativesdk"