Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41
@ 2024-05-05 11:22 Fabrice Fontaine
  2024-05-05 16:12 ` Yann E. MORIN
  2024-05-22  6:20 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-05-05 11:22 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Fabrice Fontaine

Fix the following x86_64 build failure with binutils 2.41:

purgatory/arch/i386/entry32-16.S:23: Error: 64bit mode not supported on `i386'.

Fixes:
 - http://autobuild.buildroot.org/results/60f2f163b491879a8ea7f2d56a6b0d38b3cf439c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...uilding-on-x86_64-with-binutils-2-41.patch | 94 +++++++++++++++++++
 1 file changed, 94 insertions(+)
 create mode 100644 package/kexec/0001-Fix-building-on-x86_64-with-binutils-2-41.patch

diff --git a/package/kexec/0001-Fix-building-on-x86_64-with-binutils-2-41.patch b/package/kexec/0001-Fix-building-on-x86_64-with-binutils-2-41.patch
new file mode 100644
index 0000000000..ae44c21fe1
--- /dev/null
+++ b/package/kexec/0001-Fix-building-on-x86_64-with-binutils-2-41.patch
@@ -0,0 +1,94 @@
+From 328de8e00e298f00d7ba6b25dc3950147e9642e6 Mon Sep 17 00:00:00 2001
+From: Michel Lind <salimma@fedoraproject.org>
+Date: Tue, 30 Jan 2024 04:14:31 -0600
+Subject: Fix building on x86_64 with binutils 2.41
+
+Newer versions of the GNU assembler (observed with binutils 2.41) will
+complain about the ".arch i386" in files assembled with "as --64",
+with the message "Error: 64bit mode not supported on 'i386'".
+
+Fix by moving ".arch i386" below the relevant ".code32" directive, so
+that the assembler is no longer expecting 64-bit instructions to be used
+by the time that the ".arch i386" directive is encountered.
+
+Based on similar iPXE fix:
+https://github.com/ipxe/ipxe/commit/6ca597eee
+
+Signed-off-by: Michel Lind <michel@michel-slm.name>
+Signed-off-by: Simon Horman <horms@kernel.org>
+Upstream: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=328de8e00e298f00d7ba6b25dc3950147e9642e6
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ purgatory/arch/i386/entry32-16-debug.S | 2 +-
+ purgatory/arch/i386/entry32-16.S       | 2 +-
+ purgatory/arch/i386/entry32.S          | 2 +-
+ purgatory/arch/i386/setup-x86.S        | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
+index 5167944d..12e11649 100644
+--- a/purgatory/arch/i386/entry32-16-debug.S
++++ b/purgatory/arch/i386/entry32-16-debug.S
+@@ -25,10 +25,10 @@
+ 	.globl entry16_debug_pre32
+ 	.globl entry16_debug_first32
+ 	.globl entry16_debug_old_first32
+-	.arch i386
+ 	.balign 16
+ entry16_debug:
+ 	.code32
++	.arch i386
+ 	/* Compute where I am running at (assumes esp valid) */
+ 	call	1f
+ 1:	popl	%ebx
+diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S
+index c051aab0..eace0958 100644
+--- a/purgatory/arch/i386/entry32-16.S
++++ b/purgatory/arch/i386/entry32-16.S
+@@ -20,10 +20,10 @@
+ #undef i386	
+ 	.text
+ 	.globl entry16, entry16_regs
+-	.arch i386
+ 	.balign 16
+ entry16:
+ 	.code32
++	.arch i386
+ 	/* Compute where I am running at (assumes esp valid) */
+ 	call	1f
+ 1:	popl	%ebx
+diff --git a/purgatory/arch/i386/entry32.S b/purgatory/arch/i386/entry32.S
+index f7a494f1..8ce9e316 100644
+--- a/purgatory/arch/i386/entry32.S
++++ b/purgatory/arch/i386/entry32.S
+@@ -20,10 +20,10 @@
+ #undef i386
+ 
+ 	.text
+-	.arch	i386
+ 	.globl entry32, entry32_regs
+ entry32:
+ 	.code32
++	.arch	i386
+ 
+ 	/* Setup a gdt that should that is generally usefully */
+ 	lgdt	%cs:gdt
+diff --git a/purgatory/arch/i386/setup-x86.S b/purgatory/arch/i386/setup-x86.S
+index 201bb2cb..a212eed4 100644
+--- a/purgatory/arch/i386/setup-x86.S
++++ b/purgatory/arch/i386/setup-x86.S
+@@ -21,10 +21,10 @@
+ #undef i386
+ 
+ 	.text
+-	.arch	i386
+ 	.globl purgatory_start
+ purgatory_start:
+ 	.code32
++	.arch	i386
+ 
+ 	/* Load a gdt so I know what the segment registers are */
+ 	lgdt	%cs:gdt
+-- 
+cgit 1.2.3-korg
+
-- 
2.43.0

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

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

* Re: [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41
  2024-05-05 11:22 [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41 Fabrice Fontaine
@ 2024-05-05 16:12 ` Yann E. MORIN
  2024-05-22  6:20 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-05-05 16:12 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Julien Olivain, buildroot

Fabrice, All,

On 2024-05-05 13:22 +0200, Fabrice Fontaine spake thusly:
> Fix the following x86_64 build failure with binutils 2.41:
> 
> purgatory/arch/i386/entry32-16.S:23: Error: 64bit mode not supported on `i386'.
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/60f2f163b491879a8ea7f2d56a6b0d38b3cf439c
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41
  2024-05-05 11:22 [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41 Fabrice Fontaine
  2024-05-05 16:12 ` Yann E. MORIN
@ 2024-05-22  6:20 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-05-22  6:20 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Julien Olivain, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following x86_64 build failure with binutils 2.41:
 > purgatory/arch/i386/entry32-16.S:23: Error: 64bit mode not supported on `i386'.

 > Fixes:
 >  - http://autobuild.buildroot.org/results/60f2f163b491879a8ea7f2d56a6b0d38b3cf439c

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2024.02.x, thanks.

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

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

end of thread, other threads:[~2024-05-22  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05 11:22 [Buildroot] [PATCH 1/1] package/kexec: fix x86_64 build with binutils 2.41 Fabrice Fontaine
2024-05-05 16:12 ` Yann E. MORIN
2024-05-22  6:20 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox