All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] perl: fix configure step
Date: Sat, 10 Nov 2012 17:07:35 +0100	[thread overview]
Message-ID: <20121110170735.01056125@skate> (raw)
In-Reply-To: <1352558468-3643-1-git-send-email-francois.perrad@gadz.org>

Dear Francois Perrad,

On Sat, 10 Nov 2012 15:41:07 +0100, Francois Perrad wrote:
> Configure -A symbol=val generates a extra space in config.sh,
> which causes failure like this :
>     Building Module-Runtime-0.013
>     Unknown OS type ' linux' - using default settings
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Instead of doing what the patch does below, wouldn't it be better to
fix this -A option so that it doesn't add inappropriate spaces?

Thanks,

Thomas

> ---
>  package/perl/perl.mk |   27 +++++++++++++++++++--------
>  1 file changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
> index 0893eb5..cbfeeab 100644
> --- a/package/perl/perl.mk
> +++ b/package/perl/perl.mk
> @@ -55,14 +55,8 @@ PERL_CONF_OPT = \
>  	--target-tools-prefix=$(TARGET_CROSS) \
>  	--prefix=/usr \
>  	-Dld="$(TARGET_CC_NOCCACHE)" \
> -	-A ccflags="$(TARGET_CFLAGS)" \
> -	-A ldflags="$(TARGET_LDFLAGS) -lm" \
> -	-A mydomain="" \
> -	-A myhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \
> -	-A myuname="Buildroot $(BR2_VERSION_FULL)" \
> -	-A osname=linux \
> -	-A osvers=$(LINUX_VERSION) \
> -	-A perladmin=root
> +	-Dccflags="$(TARGET_CFLAGS)" \
> +	-Dldflags="$(TARGET_LDFLAGS) -lm"
>  
>  ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
>      PERL_CONF_OPT += -Dusedevel
> @@ -79,6 +73,23 @@ endif
>  
>  define PERL_CONFIGURE_CMDS
>  	(cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./configure $(PERL_CONF_OPT))
> +	echo "# patched values" >>$(@D)/config.sh
> +	$(SED) '/^myarchname=/d' \
> +		-e '/^mydomain=/d' \
> +		-e '/^myhostname=/d' \
> +		-e '/^myuname=/d' \
> +		-e '/^osname=/d' \
> +		-e '/^osvers=/d' \
> +		-e '/^perladmin=/d' \
> +		$(@D)/config.sh
> +	echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
> +	echo "mydomain=''"                                      >>$(@D)/config.sh
> +	echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
> +	echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
> +	echo "osname='linux'"                                   >>$(@D)/config.sh
> +	echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
> +	echo "perladmin='root'"                                 >>$(@D)/config.sh
> +	(cd $(@D); ./Configure -S)
>  	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
>  endef
>  



-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2012-11-10 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 14:41 [Buildroot] [PATCH 1/2] perl: fix configure step Francois Perrad
2012-11-10 14:41 ` [Buildroot] [PATCH 2/2] cpanminus: fix paths Francois Perrad
2012-11-13  8:10   ` Arnout Vandecappelle
2012-11-10 16:07 ` Thomas Petazzoni [this message]
2012-11-13  7:06   ` [Buildroot] [PATCH 1/2] perl: fix configure step Arnout Vandecappelle

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=20121110170735.01056125@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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.