All of lore.kernel.org
 help / color / mirror / Atom feed
* Building perf with clang
@ 2016-04-01 21:19 Milian Wolff
  2016-04-01 22:16 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Milian Wolff @ 2016-04-01 21:19 UTC (permalink / raw)
  To: linux-perf-users

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

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?

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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building perf with clang
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-01 22:16 UTC (permalink / raw)
  To: Milian Wolff; +Cc: linux-perf-users

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.

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building perf with clang
  2016-04-01 22:16 ` Arnaldo Carvalho de Melo
@ 2016-04-02 21:33   ` Milian Wolff
  0 siblings, 0 replies; 3+ messages in thread
From: Milian Wolff @ 2016-04-02 21:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-02 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.