]> Git Repo - buildroot-mgba.git/commitdiff
package/tcf-agent: fix x86 build
authorFabrice Fontaine <[email protected]>
Fri, 1 Mar 2024 21:37:22 +0000 (22:37 +0100)
committerArnout Vandecappelle <[email protected]>
Sun, 7 Apr 2024 16:04:42 +0000 (18:04 +0200)
Fix the following x86 build failure raised since bump to version 1.8.0
in commit 81802e263a12e173e0e1028449d1e1e11b2e5974 and
https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/commit/8df5540c53b862d516ac25f908c2fff4a547b4a6:

/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'unpack_elf_symbol_info':
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: error: 'STT_ARM_16BIT' undeclared (first use in this function)
 2079 |         if (info->type == STT_ARM_16BIT) {
      |                           ^~~~~~~~~~~~~
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: note: each undeclared identifier is reported only once for each function it appears in
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'create_symbol_addr_search_index':
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2228:78: error: 'STT_ARM_16BIT' undeclared (first use in this function)
 2228 |                     if (type == STT_FUNC || type == STT_ARM_TFUNC || type == STT_ARM_16BIT) {
      |                                                                              ^~~~~~~~~~~~~

Fixes: 81802e263a12e173e0e1028449d1e1e11b2e5974
 - http://autobuild.buildroot.org/results/8388acf59689ed7e621bdf158483e3df1cf9bef7

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Arnout Vandecappelle <[email protected]>
package/tcf-agent/0001-agent-tcf-services-tcf_elf.c-fix-x86-build.patch [new file with mode: 0644]

diff --git a/package/tcf-agent/0001-agent-tcf-services-tcf_elf.c-fix-x86-build.patch b/package/tcf-agent/0001-agent-tcf-services-tcf_elf.c-fix-x86-build.patch
new file mode 100644 (file)
index 0000000..5f08fa4
--- /dev/null
@@ -0,0 +1,60 @@
+From 0a847ca035113540ee44d17f364bf4701fe78355 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 1 Mar 2024 22:31:05 +0100
+Subject: [PATCH] agent/tcf/services/tcf_elf.c: fix x86 build
+
+Fix the following x86 build failure raised since version 1.8.0 and
+https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/commit/8df5540c53b862d516ac25f908c2fff4a547b4a6:
+
+/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'unpack_elf_symbol_info':
+/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: error: 'STT_ARM_16BIT' undeclared (first use in this function)
+ 2079 |         if (info->type == STT_ARM_16BIT) {
+      |                           ^~~~~~~~~~~~~
+/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: note: each undeclared identifier is reported only once for each function it appears in
+/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'create_symbol_addr_search_index':
+/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2228:78: error: 'STT_ARM_16BIT' undeclared (first use in this function)
+ 2228 |                     if (type == STT_FUNC || type == STT_ARM_TFUNC || type == STT_ARM_16BIT) {
+      |                                                                              ^~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/8388acf59689ed7e621bdf158483e3df1cf9bef7
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+Upstream: https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/merge_requests/1
+---
+ agent/tcf/services/tcf_elf.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/agent/tcf/services/tcf_elf.c b/agent/tcf/services/tcf_elf.c
+index 1b3900ec..b0b948e4 100644
+--- a/agent/tcf/services/tcf_elf.c
++++ b/agent/tcf/services/tcf_elf.c
+@@ -2076,10 +2076,12 @@ void unpack_elf_symbol_info(ELF_Section * sym_sec, U4_T index, ELF_SymbolInfo *
+     }
+     if (file->machine == EM_ARM) {
++#ifdef STT_ARM_16BIT
+         if (info->type == STT_ARM_16BIT) {
+             info->type = STT_OBJECT;
+             info->type16bit = 1;
+         }
++#endif
+         if (info->type == STT_ARM_TFUNC) {
+             info->type = STT_FUNC;
+             info->type16bit = 1;
+@@ -2225,7 +2227,11 @@ static void create_symbol_addr_search_index(ELF_Section * sec) {
+                 }
+                 add = add && type != STT_GNU_IFUNC;
+                 if (add && file->machine == EM_ARM) {
+-                    if (type == STT_FUNC || type == STT_ARM_TFUNC || type == STT_ARM_16BIT) {
++                    if (type == STT_FUNC || type == STT_ARM_TFUNC
++#ifdef STT_ARM_16BIT
++                     || type == STT_ARM_16BIT
++#endif
++                     ) {
+                         addr = addr & ~(U8_T)1;
+                     }
+                 }
+-- 
+2.43.0
+
This page took 0.039159 seconds and 4 git commands to generate.