From: Sam Edwards Date: Sat, 15 Mar 2025 22:18:08 +0000 (-0700) Subject: makefile: Add READELF command variable X-Git-Tag: v2025.07-rc1~119^2~15^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=586bb720e776396208df399874665ae8c6eb81e8;p=pandora-u-boot.git makefile: Add READELF command variable This allows setting READELF=llvm-readelf in order to use the LLVM version of the readelf utility. It also aligns with the practice of not using $(CROSS_COMPILE) in any build recipes directly, reducing the number of places where $(CROSS_COMPILE) is used. Signed-off-by: Sam Edwards Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- diff --git a/Makefile b/Makefile index 05a93813afa..fb5cd67745f 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,7 @@ LDR = $(CROSS_COMPILE)ldr STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump +READELF = $(CROSS_COMPILE)readelf LEX = flex YACC = bison AWK = awk @@ -2177,7 +2178,7 @@ System.map: u-boot # ARM relocations should all be R_ARM_RELATIVE (32-bit) or # R_AARCH64_RELATIVE (64-bit). checkarmreloc: u-boot - @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ + @RELOC="`$(READELF) -r -W $< | cut -d ' ' -f 4 | \ grep R_A | sort -u`"; \ if test "$$RELOC" != "R_ARM_RELATIVE" -a \ "$$RELOC" != "R_AARCH64_RELATIVE"; then \