All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/4] toolchain: allow for stupid toolchains
Date: Mon, 02 Feb 2015 17:18:25 +0100	[thread overview]
Message-ID: <54CFA351.2050408@openwide.fr> (raw)
In-Reply-To: <1421951608-31233-4-git-send-email-ezequiel@vanguardiasur.com.ar>

Hi Ezequiel,

Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
> From: Guido Mart?nez <guido@vanguardiasur.com.ar>
> 
> check_arm_abi builds a test C file to check that the toolchain is
> working correctly, with the output redirected to /dev/null.
> 
> However, some toolchains (OSELAS 2013.12.2, for instance) foolishly
> append ".gdb" to the output filename for an intermediate file, causing
> an attempt to write to /dev/null.gdb, which obviously fails.
> 
> Fix this by adding an option to skip this check, so it can be selected
> in the OSELAS toolchain.
> 
> Signed-off-by: Guido Mart?nez <guido@vanguardiasur.com.ar>
> ---
>  toolchain/helpers.mk                   | 6 +++++-
>  toolchain/toolchain-external/Config.in | 4 ++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 3121da4..d008a4f 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -297,13 +297,17 @@ check_arm_abi = \
>  	if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \
>  		echo "External toolchain uses the unsuported OABI" ; \
>  		exit 1 ; \
> -	fi ; \
> +	fi
> +
> +ifneq ($(BR2_ARM_TOOLCHAIN_SKIP_CHECK),y)
> +check_arm_abi += ; \
>  	if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \
>  		abistr_$(BR2_ARM_EABI)='EABI'; \
>  		abistr_$(BR2_ARM_EABIHF)='EABIhf'; \
>  		echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \
>  		exit 1 ; \
>  	fi
> +endif
>  

I looked at this issue and tried to avoid the use of /dev/null.gdb ...
In the Cortex-M toolchain, it seems to have a wrapper around the linker like
this one [1] which append the .gdb suffix.

However, there is no error if "-Wl,-r" (Generate relocatable output) is added in
the gcc's command line but it's not really nice solution because this option
will be there for other toolchains.

Yann proposed to use $BUILD_DIR/br-foo instead of /dev/null and add a comment
why we do that.

What do you think ?

I'm Cc Yann.

[1] https://github.com/m-labs/elf2flt-lm32/blob/master/ld-elf2flt.in

Best regards,
Romain Naour

  parent reply	other threads:[~2015-02-02 16:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 18:33 [Buildroot] [PATCH 0/4] ARM Cortex-M3 support Ezequiel Garcia
2015-01-22 18:33 ` [Buildroot] [PATCH 1/4] arm: conditionally support regular ARM instructions Ezequiel Garcia
2015-02-02 16:17   ` Romain Naour
2015-02-02 20:18   ` Thomas Petazzoni
2015-01-22 18:33 ` [Buildroot] [PATCH 2/4] arm: update processor types Ezequiel Garcia
2015-02-02 16:18   ` Romain Naour
2015-02-07 18:05     ` Ezequiel Garcia
2015-02-14 13:51       ` Romain Naour
2015-02-07 19:47     ` Ezequiel Garcia
2015-02-14 14:43       ` Romain Naour
2015-01-22 18:33 ` [Buildroot] [PATCH 3/4] toolchain: allow for stupid toolchains Ezequiel Garcia
2015-01-25 19:32   ` Thomas Petazzoni
2015-02-02 16:18   ` Romain Naour [this message]
2015-02-02 17:32     ` Yann E. MORIN
2015-01-22 18:33 ` [Buildroot] [PATCH 4/4] toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchain Ezequiel Garcia
2015-02-02 16:29   ` Romain Naour
2015-02-02 20:19 ` [Buildroot] [PATCH 0/4] ARM Cortex-M3 support Thomas Petazzoni
2015-02-03  1:05   ` Ezequiel Garcia

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=54CFA351.2050408@openwide.fr \
    --to=romain.naour@openwide.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 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.