Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] gnu-efi: Make setjmp.S portable to ARM
@ 2015-09-07  2:19 wenzong.fan
  2015-09-07 14:08 ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: wenzong.fan @ 2015-09-07  2:19 UTC (permalink / raw)
  To: openembedded-core

From: Wenzong Fan <wenzong.fan@windriver.com>

This patch fixes the following error:

  .../lib/arm/setjmp.S:18: Error: unrecognized symbol type ""
  .../lib/arm/setjmp.S:26: Error: unrecognized symbol type ""

The problem is the assembly syntax that is used is not portable to ARM,
where the '@' symbol is a comment:

  > Note on targets where the @ character is the start of a comment
  > (eg ARM) then another character is used instead. For example the
  > ARM port uses the % character.

(From https://sourceware.org/binutils/docs-2.25/as/Section.html#Section)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
 .../gnu-efi-Make-setjmp.S-portable-to-ARM.patch    | 50 ++++++++++++++++++++++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb          |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
new file mode 100644
index 0000000..ced128a
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
@@ -0,0 +1,50 @@
+From 8a356d4b6a242ce63b73920d3ed33f88f9e12fe3 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Sun, 6 Sep 2015 05:20:43 -0400
+Subject: [PATCH] gnu-efi: Make setjmp.S portable to ARM
+
+This patch fixes the following error:
+
+  .../lib/arm/setjmp.S:18: Error: unrecognized symbol type ""
+  .../lib/arm/setjmp.S:26: Error: unrecognized symbol type ""
+
+The problem is the assembly syntax that is used is not portable to ARM,
+where the '@' symbol is a comment:
+
+  > Note on targets where the @ character is the start of a comment
+  > (eg ARM) then another character is used instead. For example the
+  > ARM port uses the % character.
+
+(From https://sourceware.org/binutils/docs-2.25/as/Section.html#Section)
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ lib/arm/setjmp.S | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/arm/setjmp.S b/lib/arm/setjmp.S
+index 6e3fbf0..85c8705 100644
+--- a/lib/arm/setjmp.S
++++ b/lib/arm/setjmp.S
+@@ -15,7 +15,7 @@ BASIS,
+ 	.text
+ 	.arm
+ 	.globl	setjmp
+-	.type	setjmp, @function
++	.type	setjmp, %function
+ setjmp:
+ 	mov	r3, r13
+ 	stmia	r0, {r3-r12,r14}
+@@ -23,6 +23,6 @@ setjmp:
+ 	bx	lr
+ 
+ 	.globl	longjmp
+-	.type	longjmp, @function
++	.type	longjmp, %function
+ longjmp:
+ 	ldmia	r0, {r3-r12,r14}
+-- 
+1.9.1
+
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
index 8cc22ca..1a1ba40 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
@@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=9;md5=2240d
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
            file://parallel-make-archives.patch \
            file://lib-Makefile-fix-parallel-issue.patch \
+           file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch \
           "
 
 SRC_URI[md5sum] = "15a4bcbc18a9a5e8110ed955970622e6"
-- 
1.9.1



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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-07  2:19 [PATCH] gnu-efi: Make setjmp.S portable to ARM wenzong.fan
@ 2015-09-07 14:08 ` Burton, Ross
  2015-09-07 14:15   ` Phil Blundell
  2015-09-08  1:24   ` wenzong fan
  0 siblings, 2 replies; 7+ messages in thread
From: Burton, Ross @ 2015-09-07 14:08 UTC (permalink / raw)
  To: wenzong fan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

On 7 September 2015 at 03:19, <wenzong.fan@windriver.com> wrote:

> +  > Note on targets where the @ character is the start of a comment
> +  > (eg ARM) then another character is used instead. For example the
> +  > ARM port uses the % character.
>

Is the documentation badly written or does this now broke the build on x86?

Ross

[-- Attachment #2: Type: text/html, Size: 771 bytes --]

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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-07 14:08 ` Burton, Ross
@ 2015-09-07 14:15   ` Phil Blundell
  2015-09-07 14:18     ` Burton, Ross
  2015-09-08  1:24   ` wenzong fan
  1 sibling, 1 reply; 7+ messages in thread
From: Phil Blundell @ 2015-09-07 14:15 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Mon, 2015-09-07 at 15:08 +0100, Burton, Ross wrote:
> 
> 
> On 7 September 2015 at 03:19, <wenzong.fan@windriver.com> wrote:
> 
>         +  > Note on targets where the @ character is the start of a
>         comment
>         +  > (eg ARM) then another character is used instead. For
>         example the
>         +  > ARM port uses the % character.
>         
> 
> 
> Is the documentation badly written or does this now broke the build on
> x86?

Surely the ARM assembly code would never have worked on x86 anyway.
It's a bit of a mystery how the original code ever worked for anyone on
ARM, given that binutils has behaved this way for nearly 20 years, but
this patch does seem like an improvement.

I agree that the commit message leaves a little bit to be desired
though.

p.


[-- Attachment #2: Type: text/html, Size: 1337 bytes --]

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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-07 14:15   ` Phil Blundell
@ 2015-09-07 14:18     ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2015-09-07 14:18 UTC (permalink / raw)
  To: Phil Blundell; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On 7 September 2015 at 15:15, Phil Blundell <pb@pbcl.net> wrote:

> Surely the ARM assembly code would never have worked on x86 anyway.  It's
> a bit of a mystery how the original code ever worked for anyone on ARM,
> given that binutils has behaved this way for nearly 20 years, but this
> patch does seem like an improvement.
>

Ah I failed to read the patch correctly and thought this was in some magic
arch-agnostic assembler file.  Yeah god knows how this ever worked :)

Ross

[-- Attachment #2: Type: text/html, Size: 842 bytes --]

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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-07 14:08 ` Burton, Ross
  2015-09-07 14:15   ` Phil Blundell
@ 2015-09-08  1:24   ` wenzong fan
  2015-09-08 11:58     ` Gary Thomas
  1 sibling, 1 reply; 7+ messages in thread
From: wenzong fan @ 2015-09-08  1:24 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 09/07/2015 10:08 PM, Burton, Ross wrote:
>
> On 7 September 2015 at 03:19, <wenzong.fan@windriver.com
> <mailto:wenzong.fan@windriver.com>> wrote:
>
>     +  > Note on targets where the @ character is the start of a comment
>     +  > (eg ARM) then another character is used instead. For example the
>     +  > ARM port uses the % character.
>
>
> Is the documentation badly written or does this now broke the build on x86?

The lib/arm/setjmp.S is introduced by gnu-efi 3.0.3, there's not such 
assembler file in 3.0.2.

It only fails while building qemuarm target.

Thanks
Wenzong

>
> Ross


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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-08  1:24   ` wenzong fan
@ 2015-09-08 11:58     ` Gary Thomas
  2015-09-08 11:59       ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2015-09-08 11:58 UTC (permalink / raw)
  To: openembedded-core

On 2015-09-07 19:24, wenzong fan wrote:
> On 09/07/2015 10:08 PM, Burton, Ross wrote:
>>
>> On 7 September 2015 at 03:19, <wenzong.fan@windriver.com
>> <mailto:wenzong.fan@windriver.com>> wrote:
>>
>>     +  > Note on targets where the @ character is the start of a comment
>>     +  > (eg ARM) then another character is used instead. For example the
>>     +  > ARM port uses the % character.
>>
>>
>> Is the documentation badly written or does this now broke the build on x86?
>
> The lib/arm/setjmp.S is introduced by gnu-efi 3.0.3, there's not such assembler file in 3.0.2.
>
> It only fails while building qemuarm target.

Since this file is [obviously] only built on ARM targets,
perhaps the patch should only be applied there?  e.g. use
   SRC_URI_arm = "file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch"
instead of adding it to SRC_URI

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: [PATCH] gnu-efi: Make setjmp.S portable to ARM
  2015-09-08 11:58     ` Gary Thomas
@ 2015-09-08 11:59       ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2015-09-08 11:59 UTC (permalink / raw)
  To: Gary Thomas; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

On 8 September 2015 at 12:58, Gary Thomas <gary@mlbassoc.com> wrote:

> Since this file is [obviously] only built on ARM targets,
> perhaps the patch should only be applied there?  e.g. use
>   SRC_URI_arm = "file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch"
> instead of adding it to SRC_URI
>

IMHO, no need to complicate matters like that.

Ross

[-- Attachment #2: Type: text/html, Size: 768 bytes --]

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

end of thread, other threads:[~2015-09-08 11:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07  2:19 [PATCH] gnu-efi: Make setjmp.S portable to ARM wenzong.fan
2015-09-07 14:08 ` Burton, Ross
2015-09-07 14:15   ` Phil Blundell
2015-09-07 14:18     ` Burton, Ross
2015-09-08  1:24   ` wenzong fan
2015-09-08 11:58     ` Gary Thomas
2015-09-08 11:59       ` Burton, Ross

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