linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>,
	mingo@redhat.com, linux-kernel@vger.kernel.org,
	lizefan@huawei.com, acme@kernel.org
Subject: Re: [PATCH] perf: fix building error in x86_64 when dwarf unwind is on.
Date: Mon, 12 Jan 2015 11:36:05 +0100	[thread overview]
Message-ID: <20150112103605.GA26229@krava.redhat.com> (raw)
In-Reply-To: <20150112032810.GA25581@sejong>

On Mon, Jan 12, 2015 at 12:28:10PM +0900, Namhyung Kim wrote:
> On Mon, Jan 12, 2015 at 10:20:55AM +0800, Wang Nan wrote:
> > From: Namhyung Kim <namhyung@kernel.org>
> > 
> > When build with 'make ARCH=x86' and dwarf unwind is on, there is a
> > compiling error:
> > 
> >    CC       /home/wn/perf/arch/x86/util/unwind-libdw.o
> >    CC       /home/wn/perf/arch/x86/tests/regs_load.o
> >  arch/x86/tests/regs_load.S: Assembler messages:
> >  arch/x86/tests/regs_load.S:65: Error: operand type mismatch for `push'
> >  arch/x86/tests/regs_load.S:72: Error: operand type mismatch for `pop'
> >  make[1]: *** [/home/wn/perf/arch/x86/tests/regs_load.o] Error 1
> >  make[1]: INTERNAL: Exiting with 25 jobserver tokens available; should be 24!
> >  make: *** [all] Error 2
> >  ...
> > 
> > Which is caused by incorrectly undefine macro HAVE_ARCH_X86_64_SUPPORT.
> > 'config/Makefile.arch' tests __x86_64__ only when 'ARCH=x86_64'.
> > However, when building x86_64 kernel, ARCH=x86 is valid and commonly
> > used. Building systems, such as yocto, uses x86_64 compiler with
> > 'ARCH=x86' to build x86_64 perf, which causes mismatching.
> > 
> > As __LP64__ is defined for x86_64 as well, we can consolidate the
> > __x86_64__ check to the __LP64__ check and get rid of the IS_X86_64
> > IMHO.
> > 
> > (This patch is made by Namhyung Kim when replying my v1 patch:
> > 
> > https://lkml.org/lkml/2015/1/7/17
> > 
> > I modified the code to remove dependency on RAW_ARCH:
> > 
> > https://lkml.org/lkml/2015/1/7/865
> > 
> > Namhyung Kim didn't provide his SOB in his original email. I add
> > mine only for my modification.)
> 
> Please feel free to add my SOB to this patch.
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Jiri Olsa <jolsa@kernel.org>

also.. I tried 32bit build on x86_64, but I had to disable python
support explicitly to succeed:

  $ make EXTRA_CFLAGS=-m32 NO_LIBPYTHON=1

seems like 'python-config --cflags' returns -m64, which beats -m32,
and the features code always detects 64bit version, which fails
to link at the end with all the rest 32bit stuff

hopefully some python enthusiast will fix it one day,
anyway it's great the 32bit build works.. sort of ;-)

thanks,
jirka

  reply	other threads:[~2015-01-12 10:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27  1:26 [PATCH] perf: fix building error in x86_64 when dwarf unwind is on Wang Nan
2014-12-29  7:56 ` Namhyung Kim
2014-12-29  8:14   ` Wang Nan
2015-01-07  2:53     ` Wang Nan
2015-01-07  5:40       ` Namhyung Kim
2015-01-07  8:39         ` Jiri Olsa
2015-01-07 12:28           ` Wang Nan
2015-01-07 13:50             ` Namhyung Kim
2015-01-08  1:30               ` Wang Nan
2015-01-08  5:09                 ` Namhyung Kim
2015-01-09 14:43                   ` Jiri Olsa
2015-01-12  2:20                     ` Wang Nan
2015-01-12  3:28                       ` Namhyung Kim
2015-01-12 10:36                         ` Jiri Olsa [this message]
2015-01-17 10:10                       ` [tip:perf/urgent] perf tools: Fix " tip-bot for Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2015-02-03 19:58 [PATCH] perf: fix " Christopher Covington

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=20150112103605.GA26229@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).