package/makedumpfile: fix build for powerpc target
PATCH 1/1 package/makedumpfile: fix build for powerpc target
--- ...Makefile-fix-ARCH-for-TARGET-powerpc.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch
package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 18acea4df1d02f0275606fa4e73292d7759bdf15 Mon Sep 17 00:00:00 2001 +From: Alexander Egorenkov <[email protected]> +Date: Wed, 9 Sep 2020 18:35:05 +0200 +Subject: [PATCH] Makefile: fix ARCH for TARGET powerpc + +TARGET 'ppc' and 'powerpc' shall result in ARCH 'powerpc32'. + +Signed-off-by: Alexander Egorenkov <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index ef20672..b55821c 100644 +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,7 @@ endif + ARCH := $(shell echo ${TARGET} | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ +- -e s/ppc64/powerpc64/ -e s/ppc/powerpc32/) ++ -e s/ppc64/powerpc64/ -e s/ppc/powerpc32/ -e s/powerpc/powerpc32/) + + CROSS := + ifneq ($(TARGET), $(HOST_ARCH)) +-- +2.28.0 +
Signature · 1 line
2.28.0
PATCH 1/1 package/makedumpfile: fix build for powerpc target
Hello Alexander,
Quoted 1 line · On Wed, 9 Sep 2020 18:41:04 +0200 Alexander Egorenkov…
Signed-off-by Alexander Egorenkov <[email protected]>
Is there an autobuilder failure for this? If so, there should be a link to it in your commit log. See for example this commit log:
https://git.buildroot.org/buildroot/commit/?id=a85ae8b297fd0526f57fe99d73087dd840ea6219
Quoted 6 lines
package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch new file +0
-0
package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch line 8
Quoted 8 lines
package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch new file +8
-0@@ -0,0 +1,28 @@ +From 18acea4df1d02f0275606fa4e73292d7759bdf15 Mon Sep 17 00:00:00 2001 +From: Alexander Egorenkov <[email protected]> +Date: Wed, 9 Sep 2020 18:35:05 +0200 +Subject: [PATCH] Makefile: fix ARCH for TARGET powerpc + +TARGET 'ppc' and 'powerpc' shall result in ARCH 'powerpc32'. + +Signed-off-by: Alexander Egorenkov <[email protected]>
I'm not sure the best solution here is to patch makedumpfile. Indeed, Buildroot's makedumpfile.mk is passing TARGET=$(BR2_ARCH), but there is nothing that "forces" makedumpfile to understand the BR2_ARCH values.
So instead, I think we should have some logic in makedumpfile.mk that calculates the correct TARGET values depending on the CPU architecture. Something along the lines of:
ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)MAKEDUMPFILE_TARGET = ...
else ifeq ($(BR2_arm)$(BR2_armeb),y)MAKEDUMPFILE_TARGET = ...
else ifeq ...
...
endif
Perhaps if for some architectures the BR2_ARCH value is OK, you could finish this if sequence by:
elseMAKEDUMPFILE_TARGET = $(BR2_ARCH)
endif
and then of course, pass TARGET=$(MAKEDUMPFILE_TARGET)
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/makedumpfile: fix build for powerpc target
Quoted 6 lines
Is there an autobuilder failure for this? If so, there should be a link to it in your commit log. See for example this commit log:
https://git.buildroot.org/buildroot/commit/?id=a85ae8b297fd0526f57fe99d73087dd840ea6219
Fixed.
Quoted 17 lines
I'm not sure the best solution here is to patch makedumpfile. Indeed, Buildroot's makedumpfile.mk is passing TARGET=$(BR2_ARCH), but there is nothing that "forces" makedumpfile to understand the
BR2_ARCHvalues.So instead, I think we should have some logic in makedumpfile.mk that calculates the correct TARGET values depending on the CPU architecture. Something along the lines of:
ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
MAKEDUMPFILE_TARGET= ...
else ifeq ($(BR2_arm)$(BR2_armeb),y)MAKEDUMPFILE_TARGET= ...
else ifeq ...
...
endif
Quoted 8 lines
Perhaps if for some architectures the
BR2_ARCHvalue is OK, you could finish this if sequence by:else
MAKEDUMPFILE_TARGET= $(BR2_ARCH)
endifand then of course, pass TARGET=$(MAKEDUMPFILE_TARGET)
Fixed. I find your suggestion a lot cleaner and like it better.
The new version of patch is on the way.
Thanks for your constructive criticism
Regards
Alex