public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: use default compiler mode by default
Date: Sun, 22 Nov 2009 13:59:17 +0100	[thread overview]
Message-ID: <20091122125917.GA3366@elte.hu> (raw)
In-Reply-To: <20091122121335.GA24254@redhat.com>


* Michael S. Tsirkin <mst@redhat.com> wrote:

> gcc with no flags typically is a sane default for systems to use, and
> looking at the running kernel is probably broken for cross-builds
> anyway, so let's not do this.  Add EXTRA_CFLAGS so that users can
> override default gcc mode if they want to.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  tools/perf/Makefile |   20 +++-----------------
>  1 files changed, 3 insertions(+), 17 deletions(-)
> 
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index d0bdaf2..ab35b0f 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -148,6 +148,8 @@ all::
>  # broken, or spawning external process is slower than built-in grep perf has).
>  #
>  # Define LDFLAGS=-static to build a static binary.
> +#
> +# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds.
>  
>  PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
>  	@$(SHELL_PATH) util/PERF-VERSION-GEN
> @@ -160,22 +162,6 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
>  uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
>  uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
>  
> -#
> -# Add -m32 for cross-builds:
> -#
> -ifdef NO_64BIT
> -  MBITS := -m32
> -else
> -  #
> -  # If we're on a 64-bit kernel (except ia64), use -m64:
> -  #
> -  ifneq ($(uname_M),ia64)
> -    ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
> -      MBITS := -m64
> -    endif
> -  endif
> -endif

iirc PowerPC had some trouble in this area. Paulus?

	Ingo

  reply	other threads:[~2009-11-22 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-22 12:13 [PATCH] perf: use default compiler mode by default Michael S. Tsirkin
2009-11-22 12:59 ` Ingo Molnar [this message]
2009-11-22 17:13 ` Arjan van de Ven
2009-11-23  6:55   ` Ingo Molnar
2009-11-23 11:14     ` Paul Mackerras
2009-11-23  7:02 ` [tip:perf/core] perf: Use " tip-bot for Michael S. Tsirkin

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=20091122125917.GA3366@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox