Skip to contentSkip to conversation

package/libbsd: fix sh4aeb build

PATCH Applied Fabrice Fontaine 3 participants 3 messages Jun 7, 2022 – Aug 16, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libbsd: fix sh4aeb build

Fix the following sh4aeb build failure:

In file included from nlist.c:44:
nlist.c: In function '__elf_is_okay__':
local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?

  223 | #define ELF_TARG_DATA   ELFDATA2LMSB
      |                         ^~~~~~~~~~~~

Fixes:
- http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b

---
 ...01-src-local-elf.h-fix-big-endian-sh.patch | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch
package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch new file +39 -0
new file mode 100644
index 0000000000..8612d268f8
@@ -0,0 +1,39 @@
+From 93c9f8aa72349a4fe33e2a732100c76f3904eb80 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 7 Jun 2022 19:27:13 +0200
+Subject: [PATCH] src/local-elf.h: fix big endian sh
+
+Fix the following build failure with big endian sh (e.g. sh4aeb):
+
+In file included from nlist.c:44:
+nlist.c: In function '__elf_is_okay__':
+local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?
+  223 | #define ELF_TARG_DATA   ELFDATA2LMSB
+      |                         ^~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/19]
+---
+ src/local-elf.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/local-elf.h b/src/local-elf.h
+index 1dd3b42..8c4794f 100644
+--- a/src/local-elf.h
++++ b/src/local-elf.h
+@@ -230,7 +230,7 @@
+ #if defined(__LITTLE_ENDIAN__)
+ #define ELF_TARG_DATA	ELFDATA2LSB
+ #elif defined(__BIG_ENDIAN__)
+-#define ELF_TARG_DATA	ELFDATA2LMSB
++#define ELF_TARG_DATA	ELFDATA2MSB
+ #else
+ #error Unknown SH endianness
+ #endif
+-- 
+2.35.1
+
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 5 lines · Fabrice Fontaine

Fix the following sh4aeb build failure:

In file included from nlist.c:44:
nlist.c: In function '__elf_is_okay__':
local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?

Quoted 7 lines
   223 | #define ELF_TARG_DATA   ELFDATA2LMSB
       |                         ^~~~~~~~~~~~

Fixes:
- http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b

Applied to master, thanks.

Regards,
Arnout

Quoted 40 lines
---
  ...01-src-local-elf.h-fix-big-endian-sh.patch | 39 +++++++++++++++++++
  1 file changed, 39 insertions(+)

create mode 100644 package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch

package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch new file +29 -0
new file mode 100644
index 0000000000..8612d268f8
@@ -0,0 +1,39 @@
+From 93c9f8aa72349a4fe33e2a732100c76f3904eb80 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 7 Jun 2022 19:27:13 +0200
+Subject: [PATCH] src/local-elf.h: fix big endian sh
+
+Fix the following build failure with big endian sh (e.g. sh4aeb):
+
+In file included from nlist.c:44:
+nlist.c: In function '__elf_is_okay__':
+local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?
+  223 | #define ELF_TARG_DATA   ELFDATA2LMSB
+      |                         ^~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/19]
+---
+ src/local-elf.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/local-elf.h b/src/local-elf.h
+index 1dd3b42..8c4794f 100644
+--- a/src/local-elf.h
++++ b/src/local-elf.h
+@@ -230,7 +230,7 @@
+ #if defined(__LITTLE_ENDIAN__)

package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch line 39

Quoted 10 lines
package/libbsd/0001-src-local-elf.h-fix-big-endian-sh.patch new file +10 -0
+ #define ELF_TARG_DATA	ELFDATA2LSB
+ #elif defined(__BIG_ENDIAN__)
+-#define ELF_TARG_DATA	ELFDATA2LMSB
++#define ELF_TARG_DATA	ELFDATA2MSB
+ #else
+ #error Unknown SH endianness
+ #endif
+--
+2.35.1
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Fabrice Fontaine
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Fix the following sh4aeb build failure:
In file included from nlist.c:44:
nlist.c: In function '__elf_is_okay__':
local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'?

Quoted 7 lines
  223 | #define ELF_TARG_DATA   ELFDATA2LMSB
      |                         ^~~~~~~~~~~~

Fixes:
- http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b

Committed to 2022.05.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot