mirror of
https://git.yoctoproject.org/poky
synced 2026-06-09 15:50:16 +00:00
clang-cross: trim the recipes
As a single clang-native build is a cross-compiler for all targets, this recipe should simply create target-prefixed symlinks. As such, it doesn't need to pull in the common clang include files, or set TOOLCHAIN. Unsetting PACKAGES isn't needed as cross inherits nopackages. The sysroot preprocessing is used to stage bindir, but cross recipes already stage this directory. There doesn't appear to be a need to copy clang, so these are now linked too. SSTATE_SCAN_FILES only works on actual files not symlinks, so setting it is pointless. (From OE-Core rev: 5d96ed55acf7b9a908241222097ad809355de7cf) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c77b545ae1
commit
aa1c6f7519
@@ -3,21 +3,15 @@
|
||||
|
||||
SUMMARY = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)"
|
||||
HOMEPAGE = "http://clang.llvm.org/"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
SECTION = "devel"
|
||||
|
||||
PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}"
|
||||
BPN = "clang"
|
||||
|
||||
require common-clang.inc
|
||||
require common-source.inc
|
||||
inherit cross-canadian
|
||||
|
||||
DEPENDS += "nativesdk-clang binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
|
||||
# We have to point gcc at a sysroot but we don't need to rebuild if this changes
|
||||
# e.g. we switch between different machines with different tunes.
|
||||
EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH"
|
||||
TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
|
||||
DEPENDS = "nativesdk-clang binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
@@ -28,10 +22,7 @@ do_install() {
|
||||
ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
|
||||
done
|
||||
}
|
||||
SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \
|
||||
*-llvm-ranlib *-llvm-nm *-lld *-ld.lld *-llvm-as *-llvm-strip \
|
||||
*-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \
|
||||
*-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov"
|
||||
|
||||
do_install:append() {
|
||||
cross_canadian_bindirlinks
|
||||
}
|
||||
|
||||
@@ -3,39 +3,22 @@
|
||||
|
||||
SUMMARY = "Cross compiler wrappers for LLVM based C/C++ compiler"
|
||||
HOMEPAGE = "http://clang.llvm.org/"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
SECTION = "devel"
|
||||
|
||||
PN = "clang-cross-${TARGET_ARCH}"
|
||||
BPN = "clang"
|
||||
|
||||
require common-clang.inc
|
||||
require common-source.inc
|
||||
inherit cross
|
||||
TOOLCHAIN = "clang"
|
||||
DEPENDS += "clang-native virtual/cross-binutils"
|
||||
|
||||
#INHIBIT_PACKAGE_STRIP = "1"
|
||||
INHIBIT_SYSROOT_STRIP = "1"
|
||||
DEPENDS = "clang-native virtual/cross-binutils"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
for tool in clang-tidy lld ld.lld llvm-profdata \
|
||||
install -d ${D}${bindir}
|
||||
for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata \
|
||||
llvm-nm llvm-ar llvm-as llvm-ranlib llvm-strip llvm-objcopy llvm-objdump llvm-readelf \
|
||||
llvm-addr2line llvm-dwp llvm-size llvm-strings llvm-cov
|
||||
do
|
||||
ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
|
||||
done
|
||||
install -m 0755 ${STAGING_BINDIR_NATIVE}/clang ${D}${bindir}/${TARGET_PREFIX}clang
|
||||
install -m 0755 ${STAGING_BINDIR_NATIVE}/clang ${D}${bindir}/${TARGET_PREFIX}clang++
|
||||
}
|
||||
SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-lld *-ld.lld \
|
||||
*-llvm-nm *-llvm-ar *-llvm-as *-llvm-ranlib *-llvm-strip \
|
||||
*-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \
|
||||
*-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov"
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess"
|
||||
|
||||
clangcross_sysroot_preprocess () {
|
||||
sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
|
||||
}
|
||||
PACKAGES = ""
|
||||
|
||||
@@ -3,17 +3,15 @@
|
||||
|
||||
SUMMARY = "SDK Cross compiler wrappers for LLVM based C/C++ compiler"
|
||||
HOMEPAGE = "http://clang.llvm.org/"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0-with-LLVM-exception;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
SECTION = "devel"
|
||||
|
||||
PN = "clang-crosssdk-${SDK_SYS}"
|
||||
BPN = "clang"
|
||||
|
||||
require common-clang.inc
|
||||
require common-source.inc
|
||||
inherit crosssdk
|
||||
TOOLCHAIN = "clang"
|
||||
DEPENDS += "clang-native nativesdk-clang-glue virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
|
||||
|
||||
DEPENDS = "clang-native nativesdk-clang-glue virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
@@ -24,12 +22,7 @@ do_install() {
|
||||
ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
|
||||
done
|
||||
}
|
||||
SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-lld *-ld.lld \
|
||||
*-llvm-nm *-llvm-ar *-llvm-as *-llvm-ranlib *-llvm-strip \
|
||||
*-llvm-objcopy *-llvm-objdump *-llvm-readelf *-llvm-addr2line \
|
||||
*-llvm-dwp *-llvm-size *-llvm-strings *-llvm-cov"
|
||||
|
||||
sysroot_stage_all () {
|
||||
sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
|
||||
}
|
||||
|
||||
PACKAGES = ""
|
||||
|
||||
Reference in New Issue
Block a user