Skip to contentSkip to conversation

toolchain-external: fix gdbserver copying for external arc-2014.12 tools

PATCH Superseded Alexey Brodkin 3 participants 4 messages Mar 25, 2015 – Jul 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 toolchain-external: fix gdbserver copying for external arc-2014.12 tools

Historically in pre-built ARC GNU tools gdbserver is located in top-level "target-bin" folder.

Because of that fact if BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).

Simplest solution is to use TOOLCHAIN_EXTERNAL_FIXUP_CMDS where copy gdbserver from "target-bin" folder into SYSROOT/usr/bin.

---
Changes in v2:
[1] "install" command is used instead of "cp"
[2] copy only "gdbserver" instead of everything from "target_bin" to sysroot

---
 toolchain/toolchain-external/toolchain-external.mk | 4 ++++
 1 file changed, 4 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +4 -0
index c0429bb..fe709db 100644
@@ -396,6 +396,10 @@ else
 TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
 endif
 TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
+define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
+	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
+	install -m 0755 -D $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/gdbserver $${SYSROOT_DIR}/usr/bin/gdbserver
+endef
 else
 # Custom toolchain
 TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
Signature · 1 line
2.1.0
#1 lore raw

PATCH v2 1/1 toolchain-external: fix gdbserver copying for external arc-2014.12 tools

Hi Alexey,

Le 25/03/2015 09:11, Alexey Brodkin a ?crit :

Quoted 9 lines

Historically in pre-built ARC GNU tools gdbserver is located in top-level "target-bin" folder.

Because of that fact if BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).

Simplest solution is to use TOOLCHAIN_EXTERNAL_FIXUP_CMDS where copy gdbserver from "target-bin" folder into SYSROOT/usr/bin.

Since this patch, the arc 2014.12 prebuild toolchain as been marked as broken [1]. This patch is still needed ?

[1]
http://git.buildroot.net/buildroot/commit/?id=cd3c00fbc01e99496f28276c62182963cada0979

Best regards,
Romain Naour

Quoted 28 lines

---
Changes in v2:
[1] "install" command is used instead of "cp"
[2] copy only "gdbserver" instead of everything from "target_bin" to sysroot

---
 toolchain/toolchain-external/toolchain-external.mk | 4 ++++
 1 file changed, 4 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +4 -0
index c0429bb..fe709db 100644
@@ -396,6 +396,10 @@ else
 TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
 endif
 TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
+define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
+	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
+	install -m 0755 -D $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/gdbserver $${SYSROOT_DIR}/usr/bin/gdbserver
+endef
 else
 # Custom toolchain
 TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
#2 lore raw

PATCH v2 1/1 toolchain-external: fix gdbserver copying for external arc-2014.12 tools

Dear Romain Naour,

Quoted 8 lines · Romain Naour

Le 25/03/2015 09:11, Alexey Brodkin a ?crit :

Quoted 7 lines

Historically in pre-built ARC GNU tools gdbserver is located in top-level "target-bin" folder.

Because of that fact if BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).

Quoted 5 lines
Quoted 2 lines

Simplest solution is to use TOOLCHAIN_EXTERNAL_FIXUP_CMDS where copy gdbserver from "target-bin" folder into SYSROOT/usr/bin.

Since this patch, the arc 2014.12 prebuild toolchain as been marked as broken [1]. This patch is still needed ?

I'd say no for the moment, I'll mark the patch as Rejected for now.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 1/1 toolchain-external: fix gdbserver copying for external arc-2014.12 tools

Thomas, Romain,

Quoted 12 lines · Thomas Petazzoni

Dear Romain Naour,

Quoted 8 lines · Romain Naour

Le 25/03/2015 09:11, Alexey Brodkin a ?crit :

Quoted 7 lines

Historically in pre-built ARC GNU tools gdbserver is located in top-level "target-bin" folder.

Because of that fact if BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY is selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Simplest solution is to use TOOLCHAIN_EXTERNAL_FIXUP_CMDS where copy gdbserver from "target-bin" folder into SYSROOT/usr/bin.

Since this patch, the arc 2014.12 prebuild toolchain as been marked as broken [1]. This patch is still needed ?

I'd say no for the moment, I'll mark the patch as Rejected for now.

Indeed this patch is no longer required because in arc-2015.06 toolchain we put gdbserver in proper place "sysroot/usr/bin".

-Alexey