* [Buildroot] [PATCH 1/1] package/makedumpfile: fix build for powerpc target
@ 2020-09-09 16:41 Alexander Egorenkov
2020-09-09 21:20 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Egorenkov @ 2020-09-09 16:41 UTC (permalink / raw)
To: buildroot
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
---
...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
diff --git a/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch b/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch
new file mode 100644
index 0000000000..ba75463ec4
--- /dev/null
+++ b/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch
@@ -0,0 +1,28 @@
+From 18acea4df1d02f0275606fa4e73292d7759bdf15 Mon Sep 17 00:00:00 2001
+From: Alexander Egorenkov <egorenar-dev@posteo.net>
+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 <egorenar-dev@posteo.net>
+---
+ 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
+
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/makedumpfile: fix build for powerpc target
2020-09-09 16:41 [Buildroot] [PATCH 1/1] package/makedumpfile: fix build for powerpc target Alexander Egorenkov
@ 2020-09-09 21:20 ` Thomas Petazzoni
2020-09-10 7:08 ` Alexander Egorenkov
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2020-09-09 21:20 UTC (permalink / raw)
To: buildroot
Hello Alexander,
On Wed, 9 Sep 2020 18:41:04 +0200
Alexander Egorenkov <egorenar-dev@posteo.net> wrote:
> Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
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
> diff --git a/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch b/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch
> new file mode 100644
> index 0000000000..ba75463ec4
> --- /dev/null
> +++ b/package/makedumpfile/0003-Makefile-fix-ARCH-for-TARGET-powerpc.patch
> @@ -0,0 +1,28 @@
> +From 18acea4df1d02f0275606fa4e73292d7759bdf15 Mon Sep 17 00:00:00 2001
> +From: Alexander Egorenkov <egorenar-dev@posteo.net>
> +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 <egorenar-dev@posteo.net>
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:
else
MAKEDUMPFILE_TARGET = $(BR2_ARCH)
endif
and then of course, pass TARGET=$(MAKEDUMPFILE_TARGET)
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/makedumpfile: fix build for powerpc target
2020-09-09 21:20 ` Thomas Petazzoni
@ 2020-09-10 7:08 ` Alexander Egorenkov
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Egorenkov @ 2020-09-10 7:08 UTC (permalink / raw)
To: buildroot
> 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.
>
> 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:
>
> else
> MAKEDUMPFILE_TARGET = $(BR2_ARCH)
> endif
>
> and 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-10 7:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-09 16:41 [Buildroot] [PATCH 1/1] package/makedumpfile: fix build for powerpc target Alexander Egorenkov
2020-09-09 21:20 ` Thomas Petazzoni
2020-09-10 7:08 ` Alexander Egorenkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.