mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-06 04:42:16 +00:00
arm/hafnium: remove python symlink workaround
Hafnium drops a python symlink into HOSTTOOLS_DIR, which is visible to all recipes, so building hafnium changes the build environment. Hafnium, since 6c63a26 (2.4 onwards), uses python3 in its own hashbangs. The prebuilt clang currently uses python hangbangs but this is fixed in git, and can be temporarily worked around with a patch instead. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
34
meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch
Normal file
34
meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
Update Clang hashbangs to call python3 instead of python, as that doesn't exist
|
||||
in our hosttools.
|
||||
|
||||
Upstream-Status: Backport [partial, fixed upstream]
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
diff --git a/linux-x64/clang/bin/clang b/prebuilts/linux-x64/clang/bin/clang
|
||||
index 081cb20a..ce9cc267 100755
|
||||
--- a/prebuilts/linux-x64/clang/bin/clang
|
||||
+++ b/prebuilts/linux-x64/clang/bin/clang
|
||||
@@ -1 +1 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
diff --git a/prebuilts/linux-x64/clang/bin/clang++ b/prebuilts/linux-x64/clang/bin/clang++
|
||||
index 081cb20a..ce9cc267 100755
|
||||
--- a/prebuilts/linux-x64/clang/bin/clang++
|
||||
+++ b/prebuilts/linux-x64/clang/bin/clang++
|
||||
@@ -1 +1 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
diff --git a/prebuilts/linux-x64/clang/bin/clang-tidy b/prebuilts/linux-x64/clang/bin/clang-tidy
|
||||
index 081cb20a..ce9cc267 100755
|
||||
--- a/prebuilts/linux-x64/clang/bin/clang-tidy
|
||||
+++ b/prebuilts/linux-x64/clang/bin/clang-tidy
|
||||
@@ -1 +1 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
diff --git a/prebuilts/linux-x64/clang/bin/scan-view b/prebuilts/linux-x64/clang/bin/scan-view
|
||||
index 6165432e..07effbca 100755
|
||||
--- a/prebuilts/linux-x64/clang/bin/scan-view
|
||||
+++ b/prebuilts/linux-x64/clang/bin/scan-view
|
||||
@@ -1 +1 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
@@ -8,6 +8,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
inherit deploy python3native pkgconfig
|
||||
|
||||
SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https \
|
||||
file://hashbang.patch \
|
||||
file://pkg-config-native.patch"
|
||||
SRCREV = "3a149eb219467c0d9336467ea1fb9d3fb65da94b"
|
||||
S = "${WORKDIR}/git"
|
||||
@@ -33,12 +34,6 @@ DEPENDS = "bison-native bc-native openssl-native"
|
||||
# set project to build
|
||||
EXTRA_OEMAKE += "PROJECT=${HAFNIUM_PROJECT}"
|
||||
|
||||
do_compile:prepend() {
|
||||
# Hafnium expects 'python'. Create symlink python to python3
|
||||
real=$(which ${PYTHON})
|
||||
ln -snf $real $(dirname $real)/python
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d -m 755 ${D}/firmware
|
||||
for bldfile in ${HAFNIUM_INSTALL_TARGET}; do
|
||||
|
||||
Reference in New Issue
Block a user