All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01/30] toolchain-external: pass CC and CFLAGS as arguments
Date: Tue, 25 Oct 2016 12:50:51 +0200	[thread overview]
Message-ID: <4bf57e5a-6e4b-4cc3-98ba-911cde2abc94@mind.be> (raw)
In-Reply-To: <1477255711-28603-2-git-send-email-romain.naour@gmail.com>



On 23-10-16 22:48, Romain Naour wrote:
> As soon as the external toolchain infrastructure gets introduced in a
> future commit, the TOOLCHAIN_EXTERNAL_CC and TOOLCHAIN_EXTERNAL_CFLAGS
> will be provided by the external toolchain package using
> <external-toolchain-name>_CC and <external-toolchain-name>_CFLAGS.
> 
> This commit prepares the transition to the external toolchain
> infrastructure by passing CC and CFLAGS as function arguments.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

but see next commit.

 Regards,
 Arnout

> ---
>  toolchain/toolchain-external/toolchain-external.mk | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 141dd10..1f57359 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -554,20 +554,28 @@ endif
>  # (as appropriate)
>  #
>  # $1: destination directory (TARGET_DIR / STAGING_DIR)
> +# $2: toolchain CC
> +# $3: toolchain CFLAGS
>  create_lib_symlinks = \
>         $(Q)DESTDIR="$(strip $1)" ; \
> -       ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
> +       TOOLCHAIN_CC="$(strip $2)" ; \
> +       TOOLCHAIN_CFLAGS="$(strip $3)" ; \
> +       ARCH_LIB_DIR="$(call toolchain_find_libdir,$${TOOLCHAIN_CC} $${TOOLCHAIN_CFLAGS})" ; \
>         if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \
>                 ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
>                 ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
>         fi
>  
> +# $1: toolchain CC
> +# $2: toolchain CFLAGS
>  define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
> -       $(call create_lib_symlinks,$(STAGING_DIR))
> +       $(call create_lib_symlinks,$(STAGING_DIR),$(1),$(2))
>  endef
>  
> +# $1: toolchain CC
> +# $2: toolchain CFLAGS
>  define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
> -       $(call create_lib_symlinks,$(TARGET_DIR))
> +       $(call create_lib_symlinks,$(TARGET_DIR),$(1),$(2))
>  endef
>  
>  # Integration of the toolchain into Buildroot: find the main sysroot
> @@ -773,7 +781,7 @@ endef
>  TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_BUILD_WRAPPER)
>  
>  define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
> -	$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
> +	$(call TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK,$(TOOLCHAIN_EXTERNAL_CC),$(TOOLCHAIN_EXTERNAL_CFLAGS))
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
> @@ -784,7 +792,7 @@ endef
>  # and the target directory, we do everything within the
>  # install-staging step, arbitrarily.
>  define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
> -	$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
> +	$(call TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK,$(TOOLCHAIN_EXTERNAL_CC),$(TOOLCHAIN_EXTERNAL_CFLAGS))
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-10-25 10:50 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 20:48 [Buildroot] [PATCH 00/30] Splitting the toolchain-external package Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 01/30] toolchain-external: pass CC and CFLAGS as arguments Romain Naour
2016-10-25 10:50   ` Arnout Vandecappelle [this message]
2016-10-23 20:48 ` [Buildroot] [PATCH 02/30] " Romain Naour
2016-10-25 11:07   ` Arnout Vandecappelle
2016-10-25 11:44     ` Thomas Petazzoni
2016-10-25 12:46       ` Arnout Vandecappelle
2016-10-25 12:48         ` Thomas Petazzoni
2016-10-25 12:57           ` Arnout Vandecappelle
2016-10-23 20:48 ` [Buildroot] [PATCH 03/30] toolchain-external: pass arguments CROSS to install wrapper Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 04/30] toolchain-external: pass arguments CC, CFLAGS, INSTALL_DIR while installing gdbserver Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 05/30] toolchain-external-blackfin-uclinux: new package Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 06/30] toolchain-external-arago-armv7a: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 07/30] toolchain-external-arago-armv5te: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 08/30] toolchain-external-custom: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 09/30] toolchain-external-linaro-aarch64: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 10/30] toolchain-external-linaro-arm: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 11/30] toolchain-external-linaro-armeb: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 12/30] toolchain-external-musl-cross: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 13/30] toolchain-external-codesourcery-aarch64: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 14/30] toolchain-external-codesourcery-arm: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 15/30] toolchain-external-codesourcery-mips: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 16/30] toolchain-external-codesourcery-niosII: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 17/30] toolchain-external-codesourcery-sh: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 18/30] toolchain-external-codesourcery-x86: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 19/30] toolchain-external-codesourcery-amd64: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 20/30] toolchain-external-synopsys-arc: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 21/30] toolchain-external-codescape-img-mips: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 22/30] toolchain-external-codescape-mti-mips: " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 23/30] toolchain/toolchain-external: move functions and utility logic into a separate file Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 24/30] toolchain/toolchain-external: move wrapper " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 25/30] toolchain/toolchain-external: move the definition of various variables " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 26/30] toolchain/toolchain-external: move uClibc specific logic " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 27/30] toolchain/toolchain-external: move musl " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 28/30] toolchain/toolchain-external: move bfin " Romain Naour
2016-10-23 20:48 ` [Buildroot] [PATCH 29/30] toolchain/toolchain-external: move external toolchain definition " Romain Naour
2016-10-25  9:55   ` Thomas Petazzoni
2016-10-23 20:48 ` [Buildroot] [PATCH 30/30] toolchain-external: introduce and use external toolchain infra Romain Naour
2016-10-25 10:38 ` [Buildroot] [PATCH 00/30] Splitting the toolchain-external package Thomas Petazzoni
2016-10-25 14:26 ` Arnout Vandecappelle
2016-10-25 14:54   ` Thomas Petazzoni
2016-10-25 15:11     ` Arnout Vandecappelle
2016-10-25 15:38       ` Thomas Petazzoni
2016-10-25 18:03         ` Romain Naour

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=4bf57e5a-6e4b-4cc3-98ba-911cde2abc94@mind.be \
    --to=arnout@mind.be \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.