From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 04/23] toolchain-external: TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER: use arguments instead of global variables
Date: Sun, 30 Oct 2016 17:31:22 +0100 [thread overview]
Message-ID: <20161030163122.GD3463@free.fr> (raw)
In-Reply-To: <1477742948-11490-5-git-send-email-romain.naour@gmail.com>
Romain, All,
On 2016-10-29 14:08 +0200, Romain Naour spake thusly:
> A new external toolchain package infrastructure will be introduced in a
> followup patch, so TOOLCHAIN_EXTERNAL_{CC,CFLAGS...} global variables
> will no longer exist. Instead, each external-toolchain packages will
> provide it's own <toolchain-external-name>_{CC,CFLAGS...} variables.
>
> So additional arguments are needed to provide CC, CFLAG and INSTALL_DIR
> when calling TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER.
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
But see below...
> ---
> v2: rework commit log/title (Arnout)
> ---
> toolchain/toolchain-external/toolchain-external.mk | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 84b6a03..6ae4bf5 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -640,16 +640,19 @@ define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS
> endef
> endif
>
> +# $1: toolchain CC
> +# $2: toolchain CFLAGS
> +# $3: toolchain INSTALL_DIR
> ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y)
> define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER
> $(Q)$(call MESSAGE,"Copying gdbserver")
> - $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
> - ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
> + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(1) $(2))" ; \
> + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(1) $(2))" ; \
> gdbserver_found=0 ; \
> for d in $${ARCH_SYSROOT_DIR}/usr \
> $${ARCH_SYSROOT_DIR}/../debug-root/usr \
> $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
> - $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \
> + $(3); do \
> if test -f $${d}/bin/gdbserver ; then \
> install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
> gdbserver_found=1 ; \
> @@ -811,7 +814,7 @@ endef
> define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
> $(call TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK,$(TOOLCHAIN_EXTERNAL_CC),$(TOOLCHAIN_EXTERNAL_CFLAGS))
> $(call TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS,$(TOOLCHAIN_EXTERNAL_LIBS))
> - $(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
> + $(call TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER,$(TOOLCHAIN_EXTERNAL_CC),$(TOOLCHAIN_EXTERNAL_CFLAGS),$(TOOLCHAIN_EXTERNAL_INSTALL_DIR))
> $(call TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC,$(TOOLCHAIN_EXTERNAL_LIBS))
> $(call TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT,$(TOOLCHAIN_EXTERNAL_CC),$(TOOLCHAIN_EXTERNAL_CFLAGS))
> $(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
Now, TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO is the only macro that is
not $(call)ed. Maybe change it for consistency with the rest?
Regards,
Yann E. MORIN.
> --
> 2.5.5
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-10-30 16:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-29 12:08 [Buildroot] [PATCH v2 00/23] Splitting the toolchain-external package Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 01/23] toolchain-external: TOOLCHAIN_EXTERNAL_CREATE_*_LIB_SYMLINK: use arguments instead of global variables Romain Naour
2016-10-30 16:20 ` Yann E. MORIN
2016-10-29 12:08 ` [Buildroot] [PATCH v2 02/23] toolchain-external: TOOLCHAIN_EXTERNAL_INSTALL_*_LIBS: " Romain Naour
2016-10-30 16:27 ` Yann E. MORIN
2016-10-29 12:08 ` [Buildroot] [PATCH v2 03/23] toolchain-external: TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER: " Romain Naour
2016-10-30 16:29 ` Yann E. MORIN
2016-10-29 12:08 ` [Buildroot] [PATCH v2 04/23] toolchain-external: TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER: " Romain Naour
2016-10-30 16:31 ` Yann E. MORIN [this message]
2016-10-29 12:08 ` [Buildroot] [PATCH v2 05/23] toolchain-external-blackfin-uclinux: new package Romain Naour
2016-10-30 16:47 ` Yann E. MORIN
2016-10-30 17:37 ` Thomas Petazzoni
2016-10-30 18:17 ` Yann E. MORIN
2016-11-01 13:19 ` Thomas Petazzoni
2016-11-01 18:06 ` Romain Naour
2016-11-01 18:14 ` Yann E. MORIN
2016-11-02 9:48 ` Thomas Petazzoni
2016-10-30 16:50 ` Yann E. MORIN
2016-10-29 12:08 ` [Buildroot] [PATCH v2 06/23] toolchain-external-arago-armv7a: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 07/23] toolchain-external-arago-armv5te: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 08/23] toolchain-external-custom: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 09/23] toolchain-external-linaro-aarch64: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 10/23] toolchain-external-linaro-arm: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 11/23] toolchain-external-linaro-armeb: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 12/23] toolchain-external-musl-cross: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 13/23] toolchain-external-codesourcery-aarch64: " Romain Naour
2016-10-29 12:08 ` [Buildroot] [PATCH v2 14/23] toolchain-external-codesourcery-arm: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 15/23] toolchain-external-codesourcery-mips: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 16/23] toolchain-external-codesourcery-niosII: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 17/23] toolchain-external-codesourcery-sh: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 18/23] toolchain-external-codesourcery-x86: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 19/23] toolchain-external-codesourcery-amd64: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 20/23] toolchain-external-synopsys-arc: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 21/23] toolchain-external-codescape-img-mips: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 22/23] toolchain-external-codescape-mti-mips: " Romain Naour
2016-10-29 12:09 ` [Buildroot] [PATCH v2 23/23] toolchain-external: introduce and use external toolchain infra Romain Naour
2016-10-30 18:38 ` Romain Naour
2016-11-01 13:23 ` Thomas Petazzoni
2016-11-01 17:42 ` Romain Naour
2016-11-02 9:55 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161030163122.GD3463@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox