02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
06 Jun, 2017
1 commit
-
This allows to detect -s (--silent) option without checking GNU Make
version.As commit e36aaea28972 ("kbuild: Fix silent builds with make-4")
pointed out, GNU Make 4.x changed the way/order it presents the
command line options into MAKEFLAGS.In Make 3.8x, 's' is always the first in a group of short options.
The group may be prefixed with '-' in some cases.In Make 4.x, 's' is always the last in a group of short options.
As commit e6ac89fabd03 ("kbuild: Correctly deal with make options
which contain an 's'") addressed, we also need to deal with long
options that contain 's', like --warn-undefined-variables.Test cases:
[1] command line input: make --silent
-> MAKEFLAGS for Make 3.8x: s
-> MAKEFLAGS for Make 4.x : s[2] command line input: make -srR
-> MAKEFLAGS for Make 3.8x: sRr
-> MAKEFLAGS for Make 4.x : rRs[3] command line input: make -s -rR --warn-undefined-variables
-> MAKEFLAGS for Make 3.8x: --warn-undefined-variables -sRr
-> MAKEFLAGS for Make 4.x : rRs --warn-undefined-variablesMy idea to cater to all the cases more easily is to filter out long
options (--%), then search 's' with $(findstring ...). This way will
be more future-proof even if future versions of Make put 's' in the
middle of the group.Signed-off-by: Masahiro Yamada
27 Jan, 2017
1 commit
-
When doing a kernel build with 'make -s', everything is silenced except
the objtool build. That's because the tools tree support for silent
builds is some combination of missing and broken.Three changes are needed to fix it:
- Makefile: propagate '-s' to the sub-make's MAKEFLAGS variable so the
tools Makefiles can see it.- tools/scripts/Makefile.include: fix the tools Makefiles' ability to
recognize '-s'. The MAKE_VERSION and MAKEFLAGS checks are copied from
the top-level Makefile. This silences the "DESCEND objtool" message.- tools/build/Makefile.build: add support to the tools Build files for
recognizing '-s'. Again the MAKE_VERSION and MAKEFLAGS checks are
copied from the top-level Makefile. This silences all the object
compile/link messages.Reported-and-Tested-by: Peter Zijlstra
Signed-off-by: Josh Poimboeuf
Cc: Jiri Olsa
Cc: Michal Marek
Link: http://lkml.kernel.org/r/e8967562ef640c3ae9a76da4ae0f4e47df737c34.1484799200.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
06 Oct, 2016
1 commit
-
Add new rule to compile .cpp file to .o use g++. C++ support is required
for built-in clang and LLVM support.Linker side support will be introduced by following commits.
Signed-off-by: Wang Nan
Cc: Alexei Starovoitov
Cc: He Kuang
Cc: Jiri Olsa
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1474874832-134786-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
03 Oct, 2016
1 commit
-
In some cases, like for fixdep and shortly for jevents, we need to build a tool
to run on the host that will be used in building a tool, such as perf, that is
being cross compiled, so do like the kernel and provide HOSTCC, HOSTLD and HOSTAR
to do that.Signed-off-by: Jiri Olsa
Requested-by: Andi Kleen
Requested-and-Tested-by: Arnaldo Carvalho de Melo
Cc: Madhavan Srinivasan
Cc: Peter Zijlstra
Cc: Sukadev Bhattiprolu
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava
Signed-off-by: Arnaldo Carvalho de Melo
20 Apr, 2016
1 commit
-
This command just preprocesses .c files into .i files, so cmd_cpp_i_c
seems more suitable.Signed-off-by: Masahiro Yamada
Acked-by: Arnaldo Carvalho de Melo
Signed-off-by: Michal Marek
03 Mar, 2016
1 commit
-
The "man gcc" says .i extension represents the file is C source code
that should not be preprocessed. Here, .s should be used.For clarification,
.c ---(preprocess)---> .i
.S ---(preprocess)---> .sSigned-off-by: Masahiro Yamada
Acked-by: Jiri Olsa
Cc: Aaro Koskinen
Cc: Adrian Hunter
Cc: Lukas Wunner
Link: http://lkml.kernel.org/r/1454263140-19670-1-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Arnaldo Carvalho de Melo
29 Sep, 2015
1 commit
-
Making the fixdep helper to be invoked within dep-cmd.
Each user of the build framework needs to make sure fixdep exists before
executing the build itself.If the build doesn't find fixdep, it falls back to the old style
dependency tracking.Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1443004442-32660-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
26 Aug, 2015
1 commit
-
It's sometimes useful to specify the object affiliation to multiple
config options like:libperf-$(CONFIG_X86) += tsc.o
libperf-$(CONFIG_AUXTRACE) += tsc.owhile the object itself is linked only once. Adding the support for this
and ignoring duplicate objects in the object list.Suggested-by: Arnaldo Carvalho de Melo
Signed-off-by: Jiri Olsa
Cc: Adrian Hunter
Cc: Sukadev Bhattiprolu
Link: http://lkml.kernel.org/r/20150826130103.GF22670@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
17 Aug, 2015
1 commit
-
Add support for decoding instructions for Intel Processor Trace. The
kernel x86 instruction decoder is copied for this.This essentially provides intel_pt_get_insn() which takes a binary
buffer, uses the kernel's x86 instruction decoder to get details of the
instruction and then categorizes it for consumption by an Intel PT
decoder.Signed-off-by: Adrian Hunter
Cc: Jiri Olsa
Link: http://lkml.kernel.org/r/1439450095-30122-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo
02 Jul, 2015
1 commit
-
Create config.detected into OUTPUT directory instead of source
directory.This fixes parallel builds that share the same source directory.
Signed-off-by: Aaro Koskinen
Acked-by: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1435751683-18500-1-git-send-email-aaro.koskinen@nokia.com
Signed-off-by: Arnaldo Carvalho de Melo
23 Jun, 2015
1 commit
-
Pull perf fixes from Ingo Molnar:
"These are the left over fixes from the v4.1 cycle"* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf tools: Fix build breakage if prefix= is specified
perf/x86: Honor the architectural performance monitoring version
perf/x86/intel: Fix PMI handling for Intel PT
perf/x86/intel/bts: Fix DS area sharing with x86_pmu events
perf/x86: Add more Broadwell model numbers
perf: Fix ring_buffer_attach() RCU sync, again
20 Jun, 2015
1 commit
-
Invoking Makefile.perf with prefix= breaks the build since Makefile.perf
hands that variable down to Makefile.build where it overridesprefix := $(subst ./,,$(OUTPUT)$(dir)/)
leading to errors like this:
No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o'
Signed-off-by: Lukas Wunner
Acked-by: Jiri Olsa
Cc: David Ahern
Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5
Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@mx.google.com
Signed-off-by: Arnaldo Carvalho de Melo
29 May, 2015
1 commit
-
Allow nesting into directories without Build file. Currently we force
include of the Build file, which fails the build when the Build file is
missing.We already support empty *-in.o' objects if there's nothing in the
directory to be compiled, so we can just use it for missing Build file
cases.Also adding this case under tests.
Reported-by: Rabin Vincent
Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Rabin Vincent
Link: http://lkml.kernel.org/r/1432914178-24086-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
13 Feb, 2015
2 commits
-
Get more verbose output wrt displaying executed commands from make.
Signed-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-68v67h59zoz7ilb1ggcuff3j@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Add support to build single targets, like:
$ make util/map.o # objects
$ make util/map.i # preprocessor
$ make util/map.s # assemblySigned-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-tt10y0dmweq6rjaod937rpb4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
12 Feb, 2015
4 commits
-
Move the util objects building under build framework.
Add the new libperf build object so it's separated from the rest of the
perf code and could be librarized.Signed-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-574tgt9t23tnxo9td8qjiibc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Add support to make directory any time we build objects out of the tree
(O=/tmp/krava) and the output directory does not exist.Signed-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-h80ukls4o2kpr0e4c4bfln6u@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Adding support to include detected configuration makefile into the build
process. This will allow the Build objects to be configurable based on
the config data, like:perf-$(CONFIG_KRAVA) += krava.o
The configuration is stored in '.config-detected' file, which is
generated for each compilation.Signed-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-bl8qho0ubck7aqrbbfu9inlm@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Adding new build framework into 'tools/build' to be used by tools.
There's no change for actual building at this point, it comes in the
next patches.The idea and more details are explained in the
'tools/build/Documentation/Build.txt' file.I adopted everything from the kernel build system, with some changes to
allow for multiple binaries build definitions.While the kernel's build output is single image (forget modules) we need
to be able to build several binaries/libraries.The basic idea is that sser provides 'Build' files with objects
definitions like:perf-y += a.o
perf-y += b.o
libperf-y += c.o
libperf-y += d.oand the build framework outputs files:
perf-in.o # a.o, b.o compiled in
libperf-in.o # c.o, d.o compiled inSigned-off-by: Jiri Olsa
Tested-by: Sukadev Bhattiprolu
Tested-by: Will Deacon
Cc: Alexis Berlemont
Cc: Borislav Petkov
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-fbj22h4av0otlxupwcmrxgpa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo