Makefile: fix readelf usage
authorAndreas Bießmann <[email protected]>
Tue, 2 Jul 2013 06:37:37 +0000 (08:37 +0200)
committerTom Rini <[email protected]>
Wed, 3 Jul 2013 13:35:48 +0000 (09:35 -0400)
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 <[email protected]>
Acked-by: Jeroen Hofstee <[email protected]>
Tested-by: Lubomir Popov <[email protected]>
Makefile

index ba1c10b2dc2fe5a0dfc21455785a52f9aacf560d..446c2f8e6398ef268e4125b6f9a1eeefcfdf3961 100644 (file)
--- 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