All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] configs/at91sam9x5ek_dev_defconfig: fix Linux compilation error
@ 2024-05-25  7:27 Dario Binacchi
  2024-05-25 16:47 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Binacchi @ 2024-05-25  7:27 UTC (permalink / raw)
  To: buildroot; +Cc: Ludovic Desroches, michael, linux-amarula, Dario Binacchi

This patch adapts the Linux commit 790756c7e0229 ("ARM: 8933/1: replace
Sun/Solaris style flag on section directive") to fix compilation errors.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 ...ce-Sun-Solaris-style-flag-on-section.patch | 71 +++++++++++++++++++
 configs/at91sam9x5ek_dev_defconfig            |  1 +
 2 files changed, 72 insertions(+)
 create mode 100644 board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch

diff --git a/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch b/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
new file mode 100644
index 000000000000..8bc5919b0411
--- /dev/null
+++ b/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
@@ -0,0 +1,71 @@
+From 25d046fbe70400c709cb00855d7f18c6000d1325 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Fri, 24 May 2024 19:10:07 +0200
+Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
+ directive
+
+The patch is an adaptation of Linux commit 790756c7e0229 ("ARM: 8933/1:
+replace Sun/Solaris style flag on section directive").
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: N/A [Buildroot specific]
+---
+ arch/arm/boot/compressed/head.S  | 2 +-
+ arch/arm/boot/compressed/piggy.S | 2 +-
+ arch/arm/mm/proc-arm920.S        | 2 +-
+ arch/arm/mm/proc-arm926.S        | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
+index e205bbbe2794..8527e7fa80c1 100644
+--- a/arch/arm/boot/compressed/head.S
++++ b/arch/arm/boot/compressed/head.S
+@@ -114,7 +114,7 @@
+ #endif
+ 		.endm
+ 
+-		.section ".start", #alloc, #execinstr
++		.section ".start", "ax"
+ /*
+  * sort out different calling conventions
+  */
+diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S
+index 0284f84dcf38..27577644ee72 100644
+--- a/arch/arm/boot/compressed/piggy.S
++++ b/arch/arm/boot/compressed/piggy.S
+@@ -1,5 +1,5 @@
+ /* SPDX-License-Identifier: GPL-2.0 */
+-	.section .piggydata,#alloc
++	.section .piggydata, "a"
+ 	.globl	input_data
+ input_data:
+ 	.incbin	"arch/arm/boot/compressed/piggy_data"
+diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
+index 7a14bd4414c9..5d4319708362 100644
+--- a/arch/arm/mm/proc-arm920.S
++++ b/arch/arm/mm/proc-arm920.S
+@@ -448,7 +448,7 @@ arm920_crval:
+ 
+ 	.align
+ 
+-	.section ".proc.info.init", #alloc
++	.section ".proc.info.init", "a"
+ 
+ 	.type	__arm920_proc_info,#object
+ __arm920_proc_info:
+diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
+index fb827c633693..8cf78c608c42 100644
+--- a/arch/arm/mm/proc-arm926.S
++++ b/arch/arm/mm/proc-arm926.S
+@@ -474,7 +474,7 @@ arm926_crval:
+ 
+ 	.align
+ 
+-	.section ".proc.info.init", #alloc
++	.section ".proc.info.init", "a"
+ 
+ 	.type	__arm926_proc_info,#object
+ __arm926_proc_info:
+-- 
+2.43.0
+
diff --git a/configs/at91sam9x5ek_dev_defconfig b/configs/at91sam9x5ek_dev_defconfig
index 824aa8b1f7f3..bc034019b441 100644
--- a/configs/at91sam9x5ek_dev_defconfig
+++ b/configs/at91sam9x5ek_dev_defconfig
@@ -8,6 +8,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 
 # System Configuration
+BR2_GLOBAL_PATCH_DIR="board/atmel/at91sam9x5ek_dev/patches"
 # Needed for usb-utils
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/at91sam9x5ek_dev_defconfig: fix Linux compilation error
  2024-05-25  7:27 [Buildroot] [PATCH 1/1] configs/at91sam9x5ek_dev_defconfig: fix Linux compilation error Dario Binacchi
@ 2024-05-25 16:47 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2024-05-25 16:47 UTC (permalink / raw)
  To: Dario Binacchi; +Cc: Ludovic Desroches, michael, linux-amarula, buildroot

>>>>> "Dario" == Dario Binacchi <dario.binacchi@amarulasolutions.com> writes:

 > This patch adapts the Linux commit 790756c7e0229 ("ARM: 8933/1: replace
 > Sun/Solaris style flag on section directive") to fix compilation errors.

 > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 > ---
 >  ...ce-Sun-Solaris-style-flag-on-section.patch | 71 +++++++++++++++++++
 >  configs/at91sam9x5ek_dev_defconfig            |  1 +
 >  2 files changed, 72 insertions(+)
 >  create mode 100644 board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch

 > diff --git a/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch b/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
 > new file mode 100644
 > index 000000000000..8bc5919b0411
 > --- /dev/null
 > +++ b/board/atmel/at91sam9x5ek_dev/patches/linux/0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
 > @@ -0,0 +1,71 @@
 > +From 25d046fbe70400c709cb00855d7f18c6000d1325 Mon Sep 17 00:00:00 2001
 > +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 > +Date: Fri, 24 May 2024 19:10:07 +0200
 > +Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
 > + directive
 > +
 > +The patch is an adaptation of Linux commit 790756c7e0229 ("ARM: 8933/1:
 > +replace Sun/Solaris style flag on section directive").
 > +
 > +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 > +Upstream: N/A [Buildroot specific]

How about instead directly taking the backport of this to the 4.19.y
stable tree, E.G.:

commit 762d2dcd9e233e3025f8627ea65f23e568045edb
Author: Nick Desaulniers <ndesaulniers@google.com>
Date:   Mon Nov 4 19:31:45 2019 +0100

    ARM: 8933/1: replace Sun/Solaris style flag on section directive

    [ Upstream commit 790756c7e0229dedc83bf058ac69633045b1000e ]

    It looks like a section directive was using "Solaris style" to declare
    the section flags. Replace this with the GNU style so that Clang's
    integrated assembler can assemble this directive.

    The modified instances were identified via:
    $ ag \.section | grep #

    Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
    Link: https://github.com/ClangBuiltLinux/linux/issues/744
    Link: https://bugs.llvm.org/show_bug.cgi?id=43759
    Link: https://reviews.llvm.org/D69296

    Acked-by: Nicolas Pitre <nico@fluxnic.net>
    Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
    Reviewed-by: Stefan Agner <stefan@agner.ch>
    Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    Suggested-by: Fangrui Song <maskray@google.com>
    Suggested-by: Jian Cai <jiancai@google.com>
    Suggested-by: Peter Smith <peter.smith@linaro.org>
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Doesn't that directly apply without any further adoptions?

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-25 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-25  7:27 [Buildroot] [PATCH 1/1] configs/at91sam9x5ek_dev_defconfig: fix Linux compilation error Dario Binacchi
2024-05-25 16:47 ` Peter Korsgaard

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.