Skip to contentSkip to conversation

arm/trusted-firmware-m: remove compiler options

PATCH New Ross Burton 1 participant 3 messages Jun 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm/trusted-firmware-m: remove compiler options

The recipe supports the use of both Arm's binary GCC (aka GNU Arm Embedded Compiler, or gnu-rm) and binary Clang (aka Arm Compiler). However, armcompiler was never tested and doesn't work: 6.17 does a network operation on every call to check the license which fails with the network isolation in do_compile tasks, and 6.18 is behind a loginwall so we can't automatically fetch it in a recipe.

Simplify the recipe to hardcode the use of gnu-rm, and remove the clang support.

---
 .../trusted-firmware-m/trusted-firmware-m_1.6.0.bb       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb +5 -4
index 3a5e57ea..45334e38 100644
@@ -48,6 +48,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 DEPENDS += "cmake-native \
             ninja-native \
+            gcc-arm-none-eabi-native \
             python3-intelhex-native \
             python3-jinja2-native \
             python3-pyyaml-native \
@@ -68,14 +69,14 @@ python() {
         raise bb.parse.SkipRecipe("TFM_PLATFORM needs to be set")
 }
 
-PACKAGECONFIG ??= "cc-gnuarm"
-# What compiler to use
-PACKAGECONFIG[cc-gnuarm] = "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_GNUARM.cmake,,gcc-arm-none-eabi-native"
-PACKAGECONFIG[cc-armclang] = "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_ARMCLANG.cmake,,armcompiler-native"
+PACKAGECONFIG ??= ""
 # Whether to integrate the test suite
 PACKAGECONFIG[test-secure] = "-DTEST_S=ON,-DTEST_S=OFF"
 PACKAGECONFIG[test-nonsecure] = "-DTEST_NS=ON,-DTEST_NS=OFF"
 
+# Currently we only support using the Arm binary GCC
+EXTRA_OECMAKE += "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_GNUARM.cmake"
+
 # Don't let FetchContent download more sources during do_configure
 EXTRA_OECMAKE += "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 arm-toolchain/armcompiler: remove recipe

As far as we know nobody is actually using the Arm Compiler recipe: 6.17 does a network operation on every call to check the license and this fails with the network isolation that do_compile has in kirkstone, and 6.18 is behind a loginwall so we cannot download it in a recipe.

Unless we have actual users asking for a recipe, remove it from the layer to avoid confusion.

---
 meta-arm-toolchain/conf/layer.conf            |  3 -
 .../armcompiler/no-uname.patch                | 14 -----
 .../armcompiler_6.17.bb                       | 55 -------------------
 3 files changed, 72 deletions(-)
 delete mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/armcompiler/no-uname.patch
 delete mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/armcompiler_6.17.bb
meta-arm-toolchain/conf/layer.conf +0 -3
index dd54db82..3cb8b064 100644
@@ -10,6 +10,3 @@ BBFILE_PRIORITY_arm-toolchain = "5"
 
 LAYERDEPENDS_arm-toolchain = "core"
 LAYERSERIES_COMPAT_arm-toolchain = "kirkstone"
-
-# These variables are used for armcompiler license
-BB_BASEHASH_IGNORE_VARS:append = " ARM_TOOL_VARIANT ARMLMD_LICENSE_FILE LM_LICENSE_FILE"
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/armcompiler/no-uname.patch deleted +0 -14
deleted file mode 100644
index 7c958079..00000000
@@ -1,14 +0,0 @@
-The install script has an explicit check that the current host is x86-64, which
-means we can't build armcompiler for x86-64 targets on arm64. Pad the
-replacement host with whitespace so that the installer offset doesn't change.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <[email protected]>
-
---- a/install_x86_64.sh.orig	2021-07-06 14:11:47.632155370 +0100
-+++ b/install_x86_64.sh	2021-07-06 14:11:58.393163350 +0100
-@@ -470,3 +470,3 @@
- fi
--host=`/bin/uname -m`
-+host=x86_64         
- echo --- Host target check...[${host}]
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/armcompiler_6.17.bb deleted +0 -55

55 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 CI: remove armcompiler references

In reply to Ross Burton

Arm Compiler has been removed, so remove it from the CI.

---
 ci/base.yml                | 2 +-
 ci/toolchains.yml          | 2 --
 scripts/machine-summary.py | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)
ci/base.yml +1 -1
index 4c997463..670d8986 100644
@@ -30,7 +30,7 @@ local_conf_header:
     CONF_VERSION = "2"
     BB_NUMBER_THREADS = "16"
     PARALLEL_MAKE = "-j16"
-    LICENSE_FLAGS_ACCEPTED += "armcompiler Arm-FVP-EULA"
+    LICENSE_FLAGS_ACCEPTED += "Arm-FVP-EULA"
   setup: |
     PACKAGE_CLASSES = "package_ipk"
     PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl"
ci/toolchains.yml +0 -2
index d2dc2961..080d8d97 100644
@@ -11,9 +11,7 @@ local_conf_header:
   toolchains: |
     SDKMACHINE = "x86_64"
 
-# No target armcompiler as currently there is no arm64 build
 target:
-  - nativesdk-armcompiler
   - gcc-aarch64-none-elf
   - nativesdk-gcc-aarch64-none-elf
   - gcc-arm-none-eabi
scripts/machine-summary.py +0 -1
index 47d8ff34..c2b43dae 100755
@@ -145,7 +145,6 @@ recipes = ("virtual/kernel",
            "edk2-firmware",
            "u-boot",
            "optee-os",
-           "armcompiler-native",
            "gcc-aarch64-none-elf-native",
            "gcc-arm-none-eabi-native")
 
Signature · 1 line
2.25.1