All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Andrew Jones <drjones@redhat.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	qemu-devel@nongnu.org
Subject: Re: [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE
Date: Mon, 21 Nov 2016 20:22:16 +0100	[thread overview]
Message-ID: <20161121192215.GA12949@potion> (raw)
In-Reply-To: <20161121182250.13186-1-andre.przywara@arm.com>

2016-11-21 18:22+0000, Andre Przywara:
> Both environment variables seem to be standard in cross-compilation
> environments, especially with Linux.
> Let the configure script take those into account when setting the default
> values for --arch and --cross-prefix. Explicitly specifying the latter
> on the configure command line still works as expected.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Hi,
> 
> this maybe a personal itch to scratch here, since I set these two
> variables in my environment via a (sourced) script here and never have
> to care about the particular cross-compiler prefix, for instance.
> It looks rather generic, though, so I was wondering if this is useful
> upstream as well.

Definitely useful, thanks.

> diff --git a/configure b/configure
> @@ -8,8 +8,9 @@ objdump=objdump
>  ar=ar
>  addr2line=addr2line
>  arch=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
> +[ -n "$ARCH" ] && arch="$ARCH"
>  host=$arch

Host should be set before we override arch, though.

I can swap those two lines when applying, but would prefer something
like:

  host=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
  arch=${ARCH:-$host}

> -cross_prefix=
> +cross_prefix=${CROSS_COMPILE}
>  endian=""
>  pretty_print_stacks=yes

(And --help is not printing the default value for cross_prefix, which
 would be nice to change when we can have a non-empty one now.)

WARNING: multiple messages have this Message-ID (diff)
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Andrew Jones <drjones@redhat.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE
Date: Mon, 21 Nov 2016 20:22:16 +0100	[thread overview]
Message-ID: <20161121192215.GA12949@potion> (raw)
In-Reply-To: <20161121182250.13186-1-andre.przywara@arm.com>

2016-11-21 18:22+0000, Andre Przywara:
> Both environment variables seem to be standard in cross-compilation
> environments, especially with Linux.
> Let the configure script take those into account when setting the default
> values for --arch and --cross-prefix. Explicitly specifying the latter
> on the configure command line still works as expected.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Hi,
> 
> this maybe a personal itch to scratch here, since I set these two
> variables in my environment via a (sourced) script here and never have
> to care about the particular cross-compiler prefix, for instance.
> It looks rather generic, though, so I was wondering if this is useful
> upstream as well.

Definitely useful, thanks.

> diff --git a/configure b/configure
> @@ -8,8 +8,9 @@ objdump=objdump
>  ar=ar
>  addr2line=addr2line
>  arch=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
> +[ -n "$ARCH" ] && arch="$ARCH"
>  host=$arch

Host should be set before we override arch, though.

I can swap those two lines when applying, but would prefer something
like:

  host=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
  arch=${ARCH:-$host}

> -cross_prefix=
> +cross_prefix=${CROSS_COMPILE}
>  endian=""
>  pretty_print_stacks=yes

(And --help is not printing the default value for cross_prefix, which
 would be nice to change when we can have a non-empty one now.)

  reply	other threads:[~2016-11-21 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 18:22 [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE Andre Przywara
2016-11-21 18:22 ` [Qemu-devel] " Andre Przywara
2016-11-21 19:22 ` Radim Krčmář [this message]
2016-11-21 19:22   ` Radim Krčmář

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=20161121192215.GA12949@potion \
    --to=rkrcmar@redhat.com \
    --cc=andre.przywara@arm.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=qemu-devel@nongnu.org \
    /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.