Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/rhash: fix build failure due to gcc -v
Date: Fri, 25 Dec 2020 23:34:41 +0100	[thread overview]
Message-ID: <20201225223441.GH1680670@scaer> (raw)
In-Reply-To: <20201203202853.616174-1-fontaine.fabrice@gmail.com>

Fabrice, All,

On 2020-12-03 21:28 +0100, Fabrice Fontaine spake thusly:
> Fixes:
>  - http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master with the following changes:

  - retain "$CC -v" as default, fallback to "$CC --version", in the hope
    that it stands better chance with upstream
  - write a commit log to explain the actual root-cause of the build
    failure

Thanks!

Regards,
Yann E. MORIN.

> ---
>  ...01-configure-allow-cross-compilation.patch | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 package/rhash/0001-configure-allow-cross-compilation.patch
> 
> diff --git a/package/rhash/0001-configure-allow-cross-compilation.patch b/package/rhash/0001-configure-allow-cross-compilation.patch
> new file mode 100644
> index 0000000000..e33353f8b3
> --- /dev/null
> +++ b/package/rhash/0001-configure-allow-cross-compilation.patch
> @@ -0,0 +1,45 @@
> +From 0605ddf795330c03ff52e993726de99a984cf2f4 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sat, 10 Oct 2020 11:07:39 +0200
> +Subject: [PATCH] configure: allow cross-compilation
> +
> +Update configure to allow the user to pass a cross-compiler such as
> +--cc=/home/fabrice/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-gcc
> +
> +First, use --version instead of -v to avoid a build failure and set
> +cc_vendor to gnu if CC compiler contains gcc
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + configure | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 2783b85..c8e1ea7 100755
> +--- a/configure
> ++++ b/configure
> +@@ -512,9 +512,9 @@ else
> +   CC_TMP="$CC"
> +   test -n "$OPT_CC" && OTHER_CC= || OTHER_CC="gcc cc"
> +   for CC in "$CC_TMP" $OTHER_CC; do
> +-    if run_cmd "$CC -v"; then
> +-      cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
> +-      if test "$cc_name_tmp" = "gcc"; then
> ++    if run_cmd "$CC --version"; then
> ++      cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1)
> ++      if echo "$cc_name_tmp" | grep -q "gcc"; then
> +         cc_name=$cc_name_tmp
> +         start_check "$CC version"
> +         cc_vendor=gnu
> +@@ -538,7 +538,7 @@ else
> +         finish_check "$cc_name $cc_version"
> +         break
> +       fi
> +-      if $CC -v 2>&1 | grep -q "clang"; then
> ++      if $CC --version 2>&1 | grep -q "clang"; then
> +         start_check "$CC version"
> +         cc_vendor=clang
> +         cc_version=$($CC -dumpversion 2>&1)
> +-- 
> +2.29.2
> +
> -- 
> 2.29.2
> 
> _______________________________________________
> 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 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2020-12-25 22:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 20:28 [Buildroot] [PATCH 1/1] package/rhash: fix build failure due to gcc -v Fabrice Fontaine
2020-12-05 20:31 ` Thomas Petazzoni
2020-12-05 20:44   ` Fabrice Fontaine
2020-12-13 16:07     ` Peter Seiderer
2020-12-13 16:20       ` Peter Seiderer
2020-12-23 15:42         ` Fabrice Fontaine
2020-12-25 22:34 ` Yann E. MORIN [this message]
2020-12-27  7:55   ` Peter Korsgaard
2020-12-27 10:26     ` Fabrice Fontaine

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=20201225223441.GH1680670@scaer \
    --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