The MAKE_ENV incantation results in PTXdist defining variables like AS
and LD that point at the respective tools in the cross toolchain.

This was unused as TF-A doesn't consult the AS setting in the
environment, and unneeded, because we already supply a CROSS_COMPILE
option, which is used to derive the correct tools.

This will expectedly change with TF-A v2.11, which should merge commit
cc277de81692 ("build: refactor toolchain detection"), currently sitting
in the integration branch[1].

This will start accepting AS to be set from the environment and not only
from the make arguments. This will break using the default cross env as
TF-A assumes AS to point at a C compiler and not at an assembler.

This will result in build issues, like[2]:

  - hang during tool discovery, because `as -v` keeps waiting for input,
    unlike gcc -v

  - Assembler errors during build, because GCC-specific options (e.g.
    -DMACRO=VAL) are now passed to as(1).

Avoid these issues by not defining the CROSS_ENV.

[1]: https://github.com/ARM-software/arm-trusted-firmware/commit/cc277de8169
[2]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27163

Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de>
---
v1 -> v2:
  - reword commit message after new findings about history of AS in
    TF-A.
---
 rules/tf-a.make | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rules/tf-a.make b/rules/tf-a.make
index 54fe7d1e37d8..b8c477476c74 100644
--- a/rules/tf-a.make
+++ b/rules/tf-a.make
@@ -74,8 +74,6 @@ TF_A_CONF_TOOL        := NO
 # Compile
 # ----------------------------------------------------------------------------
 
-TF_A_MAKE_ENV  := $(CROSS_ENV)
-
 $(STATEDIR)/tf-a.compile:
        @$(call targetinfo)
 
-- 
2.39.2


Reply via email to