17 Mar, 2019
2 commits
-
Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes
the common Kbuild.asm file. Factor out the duplicated include directives
to scripts/Makefile.asm-generic so that no architecture would opt out
of the mandatory-y mechanism.um is not forced to include mandatory-y since it is a very exceptional
case which does not support UAPI.Signed-off-by: Masahiro Yamada
-
The generic-y is redundant under the following condition:
- arch has its own implementation
- the same header is added to generated-y
- the same header is added to mandatory-y
If a redundant generic-y is found, the warning like follows is displayed:
scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h
I fixed up arch Kbuild files found by this.
Suggested-by: Sam Ravnborg
Signed-off-by: Masahiro Yamada
06 Jan, 2019
1 commit
-
Some time ago, Sam pointed out a certain degree of overwrap between
generic-y and mandatory-y. (https://lkml.org/lkml/2017/7/10/121)I tweaked the meaning of mandatory-y a little bit; now it defines the
minimum set of ASM headers that all architectures must have.If arch does not have specific implementation of a mandatory header,
Kbuild will let it fallback to the asm-generic one by automatically
generating a wrapper. This will allow to drop lots of redundant
generic-y defines.Previously, "mandatory" was used in the context of UAPI, but I guess
this can be extended to kernel space ASM headers.Suggested-by: Sam Ravnborg
Signed-off-by: Masahiro Yamada
Acked-by: Sam Ravnborg
16 Dec, 2018
1 commit
-
- Use conventional $(MAKE) $(asm-generic)= style
for directory descending- Remove unneeded FORCE since "all" is a phony target
- Remove unneeded "_dummy :=" assignment
- Skip $(shell mkdir ...) when headers exist in the directory
- Misc cleanups
Signed-off-by: Masahiro Yamada
Acked-by: Sam Ravnborg
18 Nov, 2017
1 commit
-
Pull Kbuild updates from Masahiro Yamada:
"One of the most remarkable improvements in this cycle is, Kbuild is
now able to cache the result of shell commands. Some variables are
expensive to compute, for example, $(call cc-option,...) invokes the
compiler. It is not efficient to redo this computation every time,
even when we are not actually building anything. Kbuild creates a
hidden file ".cache.mk" that contains invoked shell commands and their
results. The speed-up should be noticeable.Summary:
- Fix arch build issues (hexagon, sh)
- Clean up various Makefiles and scripts
- Fix wrong usage of {CFLAGS,LDFLAGS}_MODULE in arch Makefiles
- Cache variables that are expensive to compute
- Improve cc-ldopton and ld-option for Clang
- Optimize output directory creation"
* tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
kbuild: move coccicheck help from scripts/Makefile.help to top Makefile
sh: decompressor: add shipped files to .gitignore
frv: .gitignore: ignore vmlinux.lds
selinux: remove unnecessary assignment to subdir-
kbuild: specify FORCE in Makefile.headersinst as .PHONY target
kbuild: remove redundant mkdir from ./Kbuild
kbuild: optimize object directory creation for incremental build
kbuild: create object directories simpler and faster
kbuild: filter-out PHONY targets from "targets"
kbuild: remove redundant $(wildcard ...) for cmd_files calculation
kbuild: create directory for make cache only when necessary
sh: select KBUILD_DEFCONFIG depending on ARCH
kbuild: fix linker feature test macros when cross compiling with Clang
kbuild: shrink .cache.mk when it exceeds 1000 lines
kbuild: do not call cc-option before KBUILD_CFLAGS initialization
kbuild: Cache a few more calls to the compiler
kbuild: Add a cache for generated variables
kbuild: add forward declaration of default target to Makefile.asm-generic
kbuild: remove KBUILD_SUBDIR_ASFLAGS and KBUILD_SUBDIR_CCFLAGS
hexagon/kbuild: replace CFLAGS_MODULE with KBUILD_CFLAGS_MODULE
...
13 Nov, 2017
1 commit
-
$(kbuild-file) and Kbuild.include are included before the default
target "all".We will add a target into Kbuild.include. In advance, add a forward
declaration of the default target.Signed-off-by: Masahiro Yamada
Reviewed-by: Douglas Anderson
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
24 Aug, 2017
1 commit
-
Signed-off-by: Cao jin
Signed-off-by: Masahiro Yamada
22 Jun, 2017
1 commit
-
Originally, generated-y and genhdr-y had different meaning, like
follows:- generated-y: generated headers (other than asm-generic wrappers)
- header-y : headers to be exported
- genhdr-y : generated headers to be exported (generated-y + header-y)Since commit fcc8487d477a ("uapi: export all headers under uapi
directories"), headers under UAPI directories are all exported.
So, there is no more difference between generated-y and genhdr-y.We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild.
They generate some headers in arch/{arm,x86}/include/generated/uapi/asm
directories, which are obviously exported.Replace them with generated-y, and abolish genhdr-y.
Signed-off-by: Masahiro Yamada
Acked-by: Nicolas Dichtel
07 Jul, 2016
1 commit
-
When a header file is removed from generic-y (often accompanied by the
addition of an arch specific header), the generated wrapper file will
persist, and in some cases may still take precedence over the new arch
header.For example commit f1fe2d21f4e1 ("MIPS: Add definitions for extended
context") removed ucontext.h from generic-y in arch/mips/include/asm/,
and added an arch/mips/include/uapi/asm/ucontext.h. The continued use of
the wrapper when reusing a dirty build tree resulted in build failures
in arch/mips/kernel/signal.c:arch/mips/kernel/signal.c: In function ‘sc_to_extcontext’:
arch/mips/kernel/signal.c:142:12: error: ‘struct ucontext’ has no member named ‘uc_extcontext’
return &uc->uc_extcontext;
^
Fix by detecting and removing wrapper headers in generated header
directories that do not correspond to a filename in generic-y, genhdr-y,
or the newly introduced generated-y.Reported-by: Jacek Anaszewski
Reported-by: Hauke Mehrtens
Reported-by: Heinrich Schuchardt
Signed-off-by: James Hogan
Acked-by: Arnd Bergmann
Acked-by: Florian Fainelli
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Paul Burton
Cc: linux-kbuild@vger.kernel.org
Cc: Ralf Baechle
Cc: Michal Marek
Link: http://lkml.kernel.org/r/1466808144-23209-3-git-send-email-james.hogan@imgtec.com
Signed-off-by: Thomas Gleixner
10 Jun, 2014
1 commit
-
Signed-off-by: Masahiro Yamada
17 Oct, 2012
1 commit
-
Several arch/*/include/uapi/asm/* header simply include the
corresponding file. This patch allows such files to be
specified in uapi/asm/Kbuild via "generic-y += ..." to be automatically
generated (similar to asm/Kbuild).Signed-off-by: Catalin Marinas
Signed-off-by: David Howells
Cc: Michal Marek
Cc: Arnd Bergmann
09 Jun, 2011
1 commit
-
This patch silences a Makefile.asm-generic message
by defining a dummy rule for all.make -f /usr/src/git/scripts/Makefile.asm-generic \
obj=arch/x86/include/generated/asm
make[1]: Nothing to be done for `all'.Signed-off-by: Peter Foley
Signed-off-by: Michal Marek
03 May, 2011
1 commit
-
Do nothing if arch/$(SRCARCH)/include/asm/Kbuild does not exist, which
is the case of um.Reported-by: Randy Dunlap
Signed-off-by: Michal Marek
Acked-by: Randy Dunlap
Acked-by: Sam Ravnborg
29 Apr, 2011
1 commit
-
There is an increasing amount of header files
shared between individual architectures in asm-generic.
To avoid a lot of dummy wrapper files that just
include the corresponding file in asm-generic provide
some basic support in kbuild for this.With the following patch an architecture can maintain
a list of files in the file arch/$(ARCH)/include/asm/KbuildTo use a generic file just add:
generic-y +=
For each file listed kbuild will generate the necessary
wrapper in arch/$(ARCH)/include/generated/asm.When installing userspace headers a wrapper is likewise created.
The original inspiration for this came from the unicore32
patchset - although a different method is used.The patch includes several improvements from Arnd Bergmann.
Michael Marek contributed Makefile.asm-generic.Remis Baima did an intial implementation along to achive
the same - see https://patchwork.kernel.org/patch/13352/Signed-off-by: Sam Ravnborg
Acked-by: Guan Xuetao
Tested-by: Guan Xuetao
Acked-by: Arnd Bergmann
Cc: Remis Lima Baima
Signed-off-by: Michal Marek