Patchwork [U-Boot,v2,3/3] Makefile: fix readelf usage

login
register
mail settings
Submitter Andreas Bießmann
Date July 2, 2013, 6:37 a.m.
Message ID <1372747057-85539-4-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/256289/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Andreas Bießmann - July 2, 2013, 6:37 a.m.
Some OS (like OS X) do not provide a generic readelf. We should enforce to use
the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Lubomir Popov <lpopov@mm-sol.com>
---
Changes in v2: None

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/Makefile b/Makefile
index ba1c10b..446c2f8 100644
--- a/Makefile
+++ b/Makefile
@@ -747,7 +747,7 @@  endif	# config.mk
 # ARM relocations should all be R_ARM_RELATIVE.
 checkarmreloc: $(obj)u-boot
 	@if test "R_ARM_RELATIVE" != \
-		"`readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \
+		"`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \
 		then echo "$< contains relocations other than \
 		R_ARM_RELATIVE"; false; fi