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

login
register
mail settings
Submitter Andreas Bießmann
Date June 30, 2013, 11:15 a.m.
Message ID <1372590906-75089-4-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/255879/
State Superseded
Headers show

Comments

Andreas Bießmann - June 30, 2013, 11:15 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>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Lubomir Popov - July 1, 2013, 7 p.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>
Albert ARIBAUD - July 4, 2013, 12:09 p.m.
Hi Andreas,

On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bießmann
<andreas.devel@googlemail.com> wrote:

> 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>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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

Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>

Tom, do I take this in u-boot-arm and then deliver this later in my PR,
or do you want to pick it directly in mainline?

Amicalement,
Andreas Bießmann - July 4, 2013, 1:25 p.m.
Hi Albert,

On 07/04/2013 02:09 PM, Albert ARIBAUD wrote:
> Hi Andreas,
> 
> On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bießmann
> <andreas.devel@googlemail.com> wrote:
> 
>> 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>
>> ---
>>  Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)

<snip>

> 
> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> 
> Tom, do I take this in u-boot-arm and then deliver this later in my PR,
> or do you want to pick it directly in mainline?

It is in fact in master [1].

Regards,

Andreas Bießmann

[1]
http://git.denx.de/?p=u-boot.git;a=commit;h=c1273d7162bd4bf795f8637cac3532a490dd9024
Albert ARIBAUD - July 4, 2013, 2:02 p.m.
Hi Andreas,

On Thu, 04 Jul 2013 15:25:53 +0200, "Andreas Bießmann"
<andreas.devel@googlemail.com> wrote:

> Hi Albert,
> 
> On 07/04/2013 02:09 PM, Albert ARIBAUD wrote:
> > Hi Andreas,
> > 
> > On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bießmann
> > <andreas.devel@googlemail.com> wrote:
> > 
> >> 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>
> >> ---
> >>  Makefile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> <snip>
> 
> > 
> > Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > 
> > Tom, do I take this in u-boot-arm and then deliver this later in my PR,
> > or do you want to pick it directly in mainline?
> 
> It is in fact in master [1].

Good! :) I'd missed the 'applied' reply to it.

> Regards,
> 
> Andreas Bießmann
> 
> [1]
> http://git.denx.de/?p=u-boot.git;a=commit;h=c1273d7162bd4bf795f8637cac3532a490dd9024

Amicalement,

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