All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] package/tvheadend: unbreak
Date: Thu, 05 Dec 2013 16:14:46 +0100	[thread overview]
Message-ID: <52A09866.9080800@mind.be> (raw)
In-Reply-To: <1386115721-24113-1-git-send-email-yann.morin.1998@free.fr>

On 04/12/13 01:08, Yann E. MORIN wrote:
> +	 --cc="$(TARGET_CC)"			\
> +	 --cflags="$(TARGET_CFLAGS)"		\

  It looks like the configure script is broken and fails if these 
variables contain spaces (like e.g. when ccache is used).

 From support/configure.inc:

function parse_args
{
   local opt= val=
   for opt do
     val=${opt#*=}
     opt=${opt%=*}
     opt=${opt#*--}
     case "$opt" in
       cc|cflags|arch|cpu|platform|python)
         eval "`toupper $opt`=$val"
         ;;

  Since the $val isn't quoted, a value with spaces will expand to e.g.:

eval "CC=ccache gcc"

which will execute

CC=ccache gcc

so it will try to run gcc...

  In addition, parse_args is called from configure as:

parse_args $*

which will expand to:

parse_args --cc=ccache gcc --cflags=-DFOO -DBAR

so we only get the ccache and -DFOO in CC and CFLAGS. The unknown 
arguments gcc and -DBAR are ignored.

  Two options:

- fix the scripts;

- don't use --cc and --cflags but just pass them in the environment 
(assuming that this works).

  Regards,
  Arnout
-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  parent reply	other threads:[~2013-12-05 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  0:08 [Buildroot] [PATCH v3] package/tvheadend: unbreak Yann E. MORIN
2013-12-04  7:45 ` Thomas Petazzoni
2013-12-04 21:31   ` Yann E. MORIN
2013-12-04  9:13 ` Peter Korsgaard
2013-12-05 15:14 ` Arnout Vandecappelle [this message]
2013-12-05 17:53   ` Yann E. MORIN

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=52A09866.9080800@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.