Patchwork package/Makefile.in: fix ABI name for EABIhf targets

login
register
mail settings
Submitter Thomas Petazzoni
Date Aug. 23, 2013, 6:40 p.m.
Message ID <1377283216-31225-1-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/269510/
State Accepted
Headers show

Comments

Thomas Petazzoni - Aug. 23, 2013, 6:40 p.m.
The current code to set ABI on ARM does the following:

ifeq ($(BR2_arm)$(BR2_armeb),y)
... set ABI without 'hf' suffix ...
else ifeq ($(BR2_ARM_EABIHF),y)
... set ABI with 'hf' suffix ...
endif

But since $(BR2_arm)$(BR2_armeb) will always be 'y' in the cases where
BR2_ARM_EABIHF is 'y', it means that the 'else' part of the condition
will never be used.

Fix this by appending 'hf' to the ABI variable when BR2_ARM_EABIHF is
selected.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
I wondering how the EABIhf stuff could have worked. Is this something
I mismerged when rebasing my patch series? Anyway, if my analysis is
correct, it's certainly something that should be part of 2013.08.
---
 package/Makefile.in | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Peter Korsgaard - Aug. 27, 2013, 8:55 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The current code to set ABI on ARM does the following:
 Thomas> ifeq ($(BR2_arm)$(BR2_armeb),y)
 Thomas> ... set ABI without 'hf' suffix ...
 Thomas> else ifeq ($(BR2_ARM_EABIHF),y)
 Thomas> ... set ABI with 'hf' suffix ...
 Thomas> endif

 Thomas> But since $(BR2_arm)$(BR2_armeb) will always be 'y' in the cases where
 Thomas> BR2_ARM_EABIHF is 'y', it means that the 'else' part of the condition
 Thomas> will never be used.

 Thomas> Fix this by appending 'hf' to the ABI variable when BR2_ARM_EABIHF is
 Thomas> selected.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas> I wondering how the EABIhf stuff could have worked. Is this something
 Thomas> I mismerged when rebasing my patch series? Anyway, if my analysis is
 Thomas> correct, it's certainly something that should be part of 2013.08.
 Thomas> ---
 Thomas>  package/Makefile.in | 8 +++-----
 Thomas>  1 file changed, 3 insertions(+), 5 deletions(-)

 Thomas> diff --git a/package/Makefile.in b/package/Makefile.in
 Thomas> index e753d6b..e93d3ba 100644
 Thomas> --- a/package/Makefile.in
 Thomas> +++ b/package/Makefile.in
 Thomas> @@ -46,12 +46,10 @@ ABI=gnueabi
 Thomas>  else
 Thomas>  ABI=eabi
 Thomas>  endif
 Thomas> -else ifeq ($(BR2_ARM_EABIHF),y)
 Thomas> -ifeq ($(LIBC),uclibc)
 Thomas> -ABI=gnueabihf
 Thomas> -else
 Thomas> -ABI=eabihf
 Thomas>  endif
 Thomas> +
 Thomas> +ifeq ($(BR2_ARM_EABIHF),y)
 Thomas> +ABI:=$(ABI)hf
 Thomas>  endif

I prefer to keep all the ARM stuff inside the arm/armeb test, so I moved
it above the endif and applied, thanks!

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index e753d6b..e93d3ba 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -46,12 +46,10 @@  ABI=gnueabi
 else
 ABI=eabi
 endif
-else ifeq ($(BR2_ARM_EABIHF),y)
-ifeq ($(LIBC),uclibc)
-ABI=gnueabihf
-else
-ABI=eabihf
 endif
+
+ifeq ($(BR2_ARM_EABIHF),y)
+ABI:=$(ABI)hf
 endif
 
 # For FSL PowerPC there's SPE