From: Milian Wolff <milian.wolff@kdab.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Building perf with clang
Date: Sat, 02 Apr 2016 23:33:43 +0200 [thread overview]
Message-ID: <8653343.K9AKxD7J31@agathebauer> (raw)
In-Reply-To: <20160401221602.GH7115@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3054 bytes --]
On Freitag, 1. April 2016 19:16:02 CEST Arnaldo Carvalho de Melo wrote:
> Em Fri, Apr 01, 2016 at 11:19:05PM +0200, Milian Wolff escreveu:
> > Hey all,
> >
> > I usually use clang to build my code, and have configured CC and CXX
> > globally for that purpose. When I forget to unset that before I run
> > "make" in the perf folder, I get into serious trouble as that is not
> > supported at all.
> >
> > So, can that be fixed, either by making perf buildable with clang, or by
> > enforcing GCC within the Makefile if clang is not supported? Or at least
> > error out early if clang would be used?
>
> I never tried, but I have it installed to test perf + BPF, so I'll try
> it, fixing things as I go, patches welcome, as I'll start this tomorrow,
> at the earliest.
Just FYI, this is the error I'm seeing:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC=clang make
makeobj[0]: Entering directory `/home/milian/projects/src/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
warning: unknown warning option '-Wstrict-aliasing=3'; did you mean '-Wstring-
plus-int'? [-Wunknown-warning-option]
1 warning generated.
Auto-detecting system features:
... dwarf: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
GEN common-cmds.h
CC fixdep.o
cat: ./.fixdep.o.d: No such file or directory
/home/milian/projects/src/linux/tools/build/Makefile.build:77: recipe for
target 'fixdep.o' failed
make[3]: *** [fixdep.o] Error 1
Makefile:36: recipe for target 'fixdep-in.o' failed
make[2]: *** [fixdep-in.o] Error 2
/home/milian/projects/src/linux/tools/build/Makefile.include:7: recipe for
target 'fixdep' failed
make[1]: *** [fixdep] Error 2
make[1]: *** Waiting for unfinished jobs....
PERF_VERSION = 4.2.rc6.g7a9420
make[1]: *** wait: No child processes. Stop.
Makefile:68: recipe for target 'all' failed
make: *** [all] Error 2
makeobj[0]: Leaving directory `/home/milian/projects/src/linux/tools/perf'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have no clue what's going on here, I never edit Makefiles by hand...
Speaking of Makefiles, how can I change the CFLAGS when building perf (with
GCC)? I.e. how can I build it in -O0, or how can I enable sanitizers?
Thanks
--
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]
prev parent reply other threads:[~2016-04-02 21:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 21:19 Building perf with clang Milian Wolff
2016-04-01 22:16 ` Arnaldo Carvalho de Melo
2016-04-02 21:33 ` Milian Wolff [this message]
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=8653343.K9AKxD7J31@agathebauer \
--to=milian.wolff@kdab.com \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.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