toolchain-external: fix gdbserver copying for ARC GNU tools
PATCH 1/1 toolchain-external: fix gdbserver copying for ARC GNU 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 everything from "target-bin" foler into SYSROOT/usr/bin.
Reason to copy everything from "target-bin" is to enable possibility in the future to copy more pre-built target binaries onto target.
--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)
toolchain/toolchain-external/toolchain-external.mk +5 -0
@@ -396,6 +396,11 @@ 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))" ; \ + mkdir -p $${SYSROOT_DIR}/usr/bin ; \ + cp $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/* $${SYSROOT_DIR}/usr/bin +endef else # Custom toolchain TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
Signature · 1 line
2.1.0
PATCH 1/1 toolchain-external: fix gdbserver copying for ARC GNU tools
Alexey, All,
On 2015-03-17 00:02 +0300, Alexey Brodkin spake thusly:
Quoted 10 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_COPYis selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).Simplest solution is to use
TOOLCHAIN_EXTERNAL_FIXUP_CMDSwhere copy everything from "target-bin" foler into SYSROOT/usr/bin.
Quoted 6 lines
Reason to copy everything from "target-bin" is to enable possibility in the future to copy more pre-built target binaries onto target.
Signed-off-by Alexey Brodkin <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Yann E. MORIN <[email protected]>
However, a small suggestion (more of a question, in fact) below...
Quoted 9 lines
--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +0
-0
toolchain/toolchain-external/toolchain-external.mk else · line 402
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +4
-0@@ -396,6 +396,11 @@ 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))" ; \ + mkdir -p $${SYSROOT_DIR}/usr/bin ; \ + cp $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/* $${SYSROOT_DIR}/usr/bin
Waht about using 'cp -l' instead? That would create hardlinks instead of actual copies.
I guess we do not really support building on a filesystem that does not support hard links, do we?
Still, this should not be a blocker for inclusion.
Regards,
Yann E. MORIN.
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +1
-0+endef else # Custom toolchain TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))Signature · 1 line
2.1.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 toolchain-external: fix gdbserver copying for ARC GNU tools
Hi Yann,
Quoted 44 lines · Yann E. MORIN
Alexey, All,
On 2015-03-17 00:02 +0300, Alexey Brodkin spake thusly:
Quoted 10 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_COPYis selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).Simplest solution is to use
TOOLCHAIN_EXTERNAL_FIXUP_CMDSwhere copy everything from "target-bin" foler into SYSROOT/usr/bin.Quoted 6 lines
Reason to copy everything from "target-bin" is to enable possibility in the future to copy more pre-built target binaries onto target.
Signed-off-by Alexey Brodkin <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Yann E. MORIN <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>However, a small suggestion (more of a question, in fact) below...
Quoted 9 lines
--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +0
-0toolchain/toolchain-external/toolchain-external.mk else · line 402
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +4
-0@@ -396,6 +396,11 @@ 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))" ; \ + mkdir -p $${SYSROOT_DIR}/usr/bin ; \ + cp $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/* $${SYSROOT_DIR}/usr/binWaht about using 'cp -l' instead? That would create hardlinks instead of actual copies.
Quoted 4 lines
I guess we do not really support building on a filesystem that does not support hard links, do we?
Still, this should not be a blocker for inclusion.
Even though we may indeed create both hard- or synmlink, what do you think about use of "install" command?
Something like that:
--->8---
install -m 0755 -D $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/gdbserver $${SYSROOT_DIR}/usr/bin/gdbserver
--->8---
Compared to "cp" install with "-D" may create leading path itself, so we won't need additional "mkdir -p".
-Alexey
PATCH 1/1 toolchain-external: fix gdbserver copying for ARC GNU tools
Alexey, All,
On 2015-03-24 10:09 +0000, Alexey Brodkin spake thusly:
Quoted 60 lines · Yann E. MORIN
Quoted 44 lines
Alexey, All,
On 2015-03-17 00:02 +0300, Alexey Brodkin spake thusly:
Quoted 10 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_COPYis selected Buildroot won't find gdbserver (it looks within SYSROOT/ARCH_SYSROOT folder).Simplest solution is to use
TOOLCHAIN_EXTERNAL_FIXUP_CMDSwhere copy everything from "target-bin" foler into SYSROOT/usr/bin.Quoted 6 lines
Reason to copy everything from "target-bin" is to enable possibility in the future to copy more pre-built target binaries onto target.
Signed-off-by Alexey Brodkin <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Yann E. MORIN <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>However, a small suggestion (more of a question, in fact) below...
Quoted 9 lines
--- toolchain/toolchain-external/toolchain-external.mk | 5 +++++ 1 file changed, 5 insertions(+)toolchain/toolchain-external/toolchain-external.mk +0
-0toolchain/toolchain-external/toolchain-external.mk else · line 402
Quoted 7 lines
toolchain/toolchain-external/toolchain-external.mk +4
-0@@ -396,6 +396,11 @@ 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))" ; \ + mkdir -p $${SYSROOT_DIR}/usr/bin ; \ + cp $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/* $${SYSROOT_DIR}/usr/binWaht about using 'cp -l' instead? That would create hardlinks instead of actual copies.
Quoted 4 lines
I guess we do not really support building on a filesystem that does not support hard links, do we?
Still, this should not be a blocker for inclusion.
Even though we may indeed create both hard- or synmlink, what do you think about use of "install" command?
Something like that:
--->8---
install -m 0755 -D $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/target-bin/gdbserver $${SYSROOT_DIR}/usr/bin/gdbserver
--->8---
Quoted 2 lines
Compared to "cp" install with "-D" may create leading path itself, so we won't need additional "mkdir -p".
I rev-ed the patch, because it was copying with a glob, and thus doing the mkdir+cp dance is OK in taht case. However, if gdbserver is the only thing we need to copy, then using install -D is indeed much better.
So, consider my rev-tag to still be valid if you resubmit with the install -D dance instead.
Thank you! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'