path: root/Kbuild
AgeCommit message (Collapse)Author
2020-02-04kbuild: rename hostprogs-y/always to hostprogs/always-yMasahiro Yamada
In old days, the "host-progs" syntax was used for specifying host programs. It was renamed to the current "hostprogs-y" in 2004. It is typically useful in scripts/Makefile because it allows Kbuild to selectively compile host programs based on the kernel configuration. This commit renames like follows: always -> always-y hostprogs-y -> hostprogs So, scripts/Makefile will look like this: always-$(CONFIG_BUILD_BIN2C) += ... always-$(CONFIG_KALLSYMS) += ... ... hostprogs := $(always-y) $(always-m) I think this makes more sense because a host program is always a host program, irrespective of the kernel configuration. We want to specify which ones to compile by CONFIG options, so always-y will be handier. The "always", "hostprogs-y", "hostprogs-m" will be kept for backward compatibility for a while. Signed-off-by: Masahiro Yamada <>
2019-08-21kbuild: do not descend to ./Kbuild when cleaningMasahiro Yamada
'make clean' descends into ./Kbuild, but does not clean anything since everything is added to no-clean-files. There is no need to descend to ./Kbuild in the first place. We can drop the no-clean-files assignment. With this, there is no more user of no-clean-files. I will keep it for a while to see whether a new user will appear. Signed-off-by: Masahiro Yamada <>
2019-08-15kbuild: remove meaningless 'targets' in ./KbuildMasahiro Yamada
timeconst.h is generated by $(call filechk,...), missing-syscalls and old-atomics are invoked by $(call cmd,...) None of them needs to be added to 'targets'. Signed-off-by: Masahiro Yamada <>
2019-03-10Merge tag 'kbuild-v5.1' of ↵Linus Torvalds
git:// Pull Kbuild updates from Masahiro Yamada: - do not generate unneeded top-level built-in.a - let git ignore O= directory entirely - optimize scripts/kallsyms slightly - exclude DWARF info from *.s regardless of config options - fix GCC toolchain search path for Clang to prepare ld.lld support - do not generate modules.order when CONFIG_MODULES is disabled - simplify single target rules and remove VPATH for external module build - allow to add optional flags to dpkg-buildpackage when building deb-pkg - move some compiler option tests from Makefile to Kconfig - various Makefile cleanups * tag 'kbuild-v5.1' of git:// (40 commits) kbuild: remove scripts/basic/% build target kbuild: use -Werror=implicit-... instead of -Werror-implicit-... kbuild: clean up scripts/ kbuild: remove cc-version macro kbuild: update comment block of scripts/ kbuild: remove commented-out INITRD_COMPRESS kbuild: move -gsplit-dwarf, -gdwarf-4 option tests to Kconfig kbuild: [bin]deb-pkg: add DPKG_FLAGS variable kbuild: move ".config not found!" message from Kconfig to Makefile kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing kbuild: simplify single target rules kbuild: remove empty rules for makefiles kbuild: make -r/-R effective in top Makefile for old Make versions kbuild: move tools_silent to a more relevant place kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig kbuild: refactor cc-cross-prefix implementation kbuild: hardcode genksyms path and remove GENKSYMS variable scripts/gdb: refactor rules for symlink creation kbuild: create symlink to in scripts_gdb target scripts/gdb: do not descend into scripts/gdb from scripts ...
2019-02-27kbuild: remove unimportant comments from ./KbuildMasahiro Yamada
Every time we add/remove a target, we need to touch the header part, including renumbering. This is not so important information. Numbering targets is rather misleading because they are not necessarily generated in this order. For example, 1) and 2) can be executed simultaneously when the -j option is given. Signed-off-by: Masahiro Yamada <> Reviewed-by: Kieran Bingham <>
2019-02-27scripts/gdb: delay generation of gdb constants.pyMasahiro Yamada
scripts/gdb/linux/ is never used in the kernel build process. There is no good reason to create it so early. Get it out of the 'prepare' stage. Signed-off-by: Masahiro Yamada <> Reviewed-by: Kieran Bingham <>
2019-02-11Merge branch 'locking/atomics' into locking/core, to pick up WIP commitsIngo Molnar
Signed-off-by: Ingo Molnar <>
2019-01-06kbuild: use assignment instead of define ... endef for filechk_* rulesMasahiro Yamada
You do not have to use define ... endef for filechk_* rules. For simple cases, the use of assignment looks cleaner, IMHO. I updated the usage for scripts/Kbuild.include in case somebody misunderstands the 'define ... endif' is the requirement. Signed-off-by: Masahiro Yamada <> Acked-by: Heiko Carstens <>
2019-01-06kbuild: change filechk to surround the given command with { }Masahiro Yamada
filechk_* rules often consist of multiple 'echo' lines. They must be surrounded with { } or ( ) to work correctly. Otherwise, only the string from the last 'echo' would be written into the target. Let's take care of that in the 'filechk' in scripts/Kbuild.include to clean up filechk_* rules. Signed-off-by: Masahiro Yamada <>
2018-12-25kbuild: remove unused cmd_gentimeconstMasahiro Yamada
filechk_gentimeconst is always used instead of cmd_gentimeconst. Signed-off-by: Masahiro Yamada <>
2018-12-23kbuild: remove $(obj)/ prefixes in ./KbuildMasahiro Yamada
Adding $(obj)/ to file paths relative from the top objtree looks a bit redundant to me. This commit has no functional change since $(obj) is '.' in this file. Signed-off-by: Masahiro Yamada <>
2018-12-23treewide: remove explicit rules for *offsets.sMasahiro Yamada
These explicit rules are unneeded because scripts/ provides a pattern rule to create %.s from %.c Signed-off-by: Masahiro Yamada <>
2018-11-09locking/atomics: Fix out-of-tree buildBorislav Petkov
Building a kernel out of tree with: make O=/tmp/b oldconfig cd /tmp/b make gives this error: CALL /mnt/kernel/kernel/linux/scripts/atomic/ /bin/bash: scripts/atomic/ No such file or directory make[3]: *** [/mnt/kernel/kernel/linux/./Kbuild:86: old-atomics] Error 127 make[3]: *** Waiting for unfinished jobs.... Make the command use the proper build prerequisite which is the absolute path to the script. Reported-by: Stephen Rothwell <> Signed-off-by: Borislav Petkov <> Cc: Boqun Feng <> Cc: Linus Torvalds <> Cc: Mark Rutland <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: Will Deacon <> Cc: Cc: Cc: Cc: Cc: Cc: Cc: Fixes: 8d32588077bd ("locking/atomics: Check generated headers are up-to-date") Link: Signed-off-by: Ingo Molnar <>
2018-11-01locking/atomics: Check generated headers are up-to-dateMark Rutland
Now that all the generated atomic headers are in place, it would be good to ensure that: a) the headers are up-to-date when scripting changes. b) developers don't directly modify the generated headers. To ensure both of these properties, let's add a Kbuild step to check that the generated headers are up-to-date. Signed-off-by: Mark Rutland <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Cc: Cc: Will Deacon <> Cc: Cc: Cc: Boqun Feng <> Cc: Cc: Cc: Link: Signed-off-by: Ingo Molnar <>
2017-11-17Merge tag 'kbuild-v4.15' of ↵Linus Torvalds
git:// 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 "" 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:// (30 commits) kbuild: move coccicheck help from scripts/ to top Makefile sh: decompressor: add shipped files to .gitignore frv: .gitignore: ignore 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 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 ...
2017-11-16kbuild: remove redundant mkdir from ./KbuildMasahiro Yamada
These two targets are added to "targets". Their directories are automatically created. Signed-off-by: Masahiro Yamada <>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
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 <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <> Reviewed-by: Philippe Ombredanne <> Reviewed-by: Thomas Gleixner <> Signed-off-by: Greg Kroah-Hartman <>
2017-04-13kbuild: Consolidate header generation from ASM offset informationMatthias Kaehlcke
Largely redundant code is used in different places to generate C headers from offset information extracted from assembly language output. Consolidate the code in Makefile.lib and use this instead. Signed-off-by: Matthias Kaehlcke <> Signed-off-by: Masahiro Yamada <>
2016-05-23scripts/gdb: provide linux constantsKieran Bingham
Some macro's and defines are needed when parsing memory, and without compiling the kernel as -g3 they are not available in the debug-symbols. We use the pre-processor here to extract constants to a dedicated module for the linux debugger extensions Top level Kbuild is used to call in and generate the constants file, while maintaining dependencies on autogenerated files in include/generated Link: Signed-off-by: Kieran Bingham <> Signed-off-by: Jan Kiszka <> Cc: Michal Marek <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2015-07-01time: Remove development rules from Kbuild/MakefileThomas Gleixner
time.o gets rebuilt unconditionally due to a leftover Makefile rule which was placed there for development purposes. Remove it along with the commented out always rule in the toplevel Kbuild file. Fixes: 0a227985d4a9 'time: Move timeconst.h into include/generated' Reported-by; Stephen Boyd <> Signed-off-by: Thomas Gleixner <> Cc: Nicholas Mc Guire <>
2015-05-19time: Move timeconst.h into include/generatedNicholas Mc Guire
kernel/time/timeconst.h is moved to include/generated/ and generated by the top level Kbuild. This allows using timeconst.h in an earlier build stage. Signed-off-by: Nicholas Mc Guire <> Cc: Masahiro Yamada <> Cc: Sam Ravnborg <> Cc: Joe Perches <> Cc: John Stultz <> Cc: Andrew Hunter <> Cc: Paul Turner <> Cc: Michal Marek <> Link: Signed-off-by: Thomas Gleixner <>
2015-04-02kbuild: do not add $(bounds-file) and $(offsets-file) to targetsMasahiro Yamada
$(always) is added to targets by scripts/ Moreover, filechk does not need .*.cmd files. Adding these two files to targets is redundant. Signed-off-by: Masahiro Yamada <> Signed-off-by: Michal Marek <>
2015-03-24kbuild: Don't reset timestamps in include/generated if not neededMichal Marek
Use filechk to generate asm-offsets.h and bounds.h. Based on a patch by Valdis Kletnieks. Reported-by: Valdis Kletnieks <> Acked-By: Valdis Kletnieks <> Reviewed-by: Masahiro Yamada <> Signed-off-by: Michal Marek <>
2015-01-05kbuild: remove redundant line from bounds.h/asm-offsets.hMasahiro Yamada
This line produces an extra comment line for bounds.h and asm-offsets.h. Signed-off-by: Masahiro Yamada <> Signed-off-by: Michal Marek <>
2015-01-05kbuild: merge bounds.h and asm-offsets.h rulesMasahiro Yamada
The rules "cmd_bounds" and "cmd_offsets" are almost the same. (The difference is only the include guards.) They can be merged. Signed-off-by: Masahiro Yamada <> Signed-off-by: Michal Marek <>
2011-11-09kbuild: Fix missing system calls check on mips.David Daney
Commit 5f7efb4 (Kbuild: append missing-syscalls to the default target list) broke MIPS build. Reported-tested-and-acked-by: Ralf Baechle <> Signed-off-by: David Daney <> Signed-off-by: Michal Marek <>
2011-11-02Kbuild: append missing-syscalls to the default target listArnaud Lacombe
This avoid an extra make invocation on `prepare0'. Signed-off-by: Arnaud Lacombe <> Signed-off-by: Michal Marek <>
2010-10-28Merge branch 'kbuild' of ↵Linus Torvalds
git:// * 'kbuild' of git:// initramfs: Fix build break on symbol-prefixed archs initramfs: fix initramfs size calculation initramfs: generalize variants scripts/kallsyms: Enable error messages while hush up unnecessary warnings scripts/setlocalversion: update comment kbuild: Use a single clean rule for kernel and external modules kbuild: Do not run make clean in $(srctree) scripts/mod/modpost.c: fix commentary accordingly to last changes kbuild: Really don't clean bounds.h and asm-offsets.h
2010-10-27Partially revert patch that encloses asm-offset.h numbers in bracketsDavid Howells
Partially revert patch: commit 3234282f33b29d349bcada40204fc7c8fda7fe72 Author: Jan Beulich <> Date: Tue Oct 19 14:52:26 2010 +0100 x86, asm: Fix CFI macro invocations to deal with shortcomings in gas This breaks MN10300 arch as this changes many instances of instructions similar to the following: MOV number,D0 which represents an immediate value load into: MOV (number),D0 which the assembler then interprets as a load from absolute address. arch/mn10300/kernel/entry.S:64: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:65: Error: junk at end of line, first unrecognized character is `0' arch/mn10300/kernel/entry.S:74: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:74: Error: junk at end of line, first unrecognized character is `1' arch/mn10300/kernel/entry.S:75: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:76: Error: junk at end of line, first unrecognized character is `0' cc: Jan Beulich <> cc: Alexander van Heukelum <> cc: H. Peter Anvin <> cc: Ingo Molnar <> Signed-off-by: David Howells <>
2010-10-22x86, asm: Fix ancient-GAS workaroundAlexander van Heukelum
It turns out to generate something like this: printk ( ("<3>") "something"); The extra parentheses here break the UML compile. Change the sed-program to add the parentheses only for numbers. Reported-by: Ingo Molnar <> Signed-off-by: Alexander van Heukelum <> Acked-by: Jan Beulich <> LKML-Reference: <> Signed-off-by: Ingo Molnar <>
2010-10-19x86, asm: Fix CFI macro invocations to deal with shortcomings in gasJan Beulich
gas prior to (perhaps) 2.16.90 has problems with passing non- parenthesized expressions containing spaces to macros. Spaces, however, get inserted by cpp between any macro expanding to a number and a subsequent + or -. For the +, current x86 gas then removes the space again (future gas may not do so), but for the - the space gets retained and is then considered a separator between macro arguments. Fix the respective definitions for both the - and + cases, so that they neither contain spaces nor make cpp insert any (the latter by adding seemingly redundant parentheses). Signed-off-by: Jan Beulich <> LKML-Reference: <> Cc: Alexander van Heukelum <> Signed-off-by: H. Peter Anvin <>
2010-03-11kbuild: Really don't clean bounds.h and asm-offsets.hMichal Marek
Commit 7d3cc8b tried to keep bounds.h and asm-offsets.h during make clean by filtering these out of $(clean-files), but they are listed in $(targets) and $(always) and thus removed automatically. Introduce a new $(no-clean-files) variable to really skip such files in Makefile.clean. Signed-off-by: Michal Marek <>
2009-12-12kbuild: move asm-offsets.h to include/generatedSam Ravnborg
The simplest method was to add an extra asm-offsets.h file in arch/$ARCH/include/asm that references the generated file. We can now migrate the architectures one-by-one to reference the generated file direct - and when done we can delete the temporary arch/$ARCH/include/asm/asm-offsets.h file. Signed-off-by: Sam Ravnborg <> Cc: Al Viro <> Signed-off-by: Michal Marek <>
2009-12-12kbuild: move bounds.h to include/generatedSam Ravnborg
Signed-off-by: Sam Ravnborg <> Cc: Al Viro <> Signed-off-by: Michal Marek <>
2008-07-25kbuild: asm symlink support for arch/$ARCH/includeSam Ravnborg
Adjust the asm symlink support so we do not create the symlink unless really needed. We check the precense of include/asm-$ARCH by checking for the system.h file. We may end up with a stale directory so it is not enough to check if the directory is present. Signed-off-by: Sam Ravnborg <>
2008-05-19Don't clean bounds.h and asm-offsets.hJan Blunck
Since 97965478a66fbdf0f4ad5e4ecc4828f0cb548a45 ("mm: Get rid of __ZONE_COUNT") mmzone.h includes bounds.h. Calling make clean after make prepare removes bounds.h again so when building external modules this fails. Signed-off-by: Jan Blunck <> Signed-off-by: Sam Ravnborg <> --
2008-04-28pageflags: standardize comment inclusion in asm-offsets.h and fix MIPSChristoph Lameter
Add the ability to pass comments into asm-offsets.h by generating asm output like -># comment line Mips needs this feature to preserve the comments that are in asm-mips/asm-offsets.h right now. Then remove the special handling for mips from Kbuild and convert mips to use the new string to include the comments. Cc: Ralf Baechle <> Signed-off-by: Christoph Lameter <> Cc: Sam Ravnborg <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2008-04-28kbuild: create a way to create preprocessor constants from C expressionsChristoph Lameter
The use of enums create constants that are not available to the preprocessor when building the kernel (f.e. MAX_NR_ZONES). Arch code already has a way to export constants calculated to the preprocessor through the asm-offsets.c file. Generate something similar for the core kernel through kbuild. Signed-off-by: Sam Ravnborg <> Signed-off-by: Christoph Lameter <> Cc: Andy Whitcroft <> Cc: KAMEZAWA Hiroyuki <> Cc: KOSAKI Motohiro <> Cc: Rik van Riel <> Cc: Mel Gorman <> Cc: Jeremy Fitzhardinge <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2007-10-11i386/x86_64: move headers to include/asm-x86Thomas Gleixner
Move the headers to include/asm-x86 and fixup the header install make rules Signed-off-by: Thomas Gleixner <> Signed-off-by: Ingo Molnar <>
2007-10-11Kbuild: allow arch/xxx to use a different source pathThomas Gleixner
Preparatory patch for the source merge of arch/i386 and arch/x86_64 into arch/x86. This allows to keep the original arch directories as stubs for the main Makefiles, Kconfigs et. al during the transition phase while having the code in the new arch/x86 directory. Signed-off-by: Thomas Gleixner <>
2007-07-16kbuild: asm-offsets.h is now cleaned with O=.. buildsSam Ravnborg
Reported by: "Robert P. J. Day" <> Signed-off-by: Sam Ravnborg <> Cc: "Robert P. J. Day" <>
2007-05-02kbuild: complain about missing system callsSam Ravnborg
Most system calls seems to get added to i386 first. This patch automatically generates a warning for any new system call which is implemented on i386 but not the architecture currently being compiled. On PowerPC at the moment, for example, it results in these warnings: init/missing_syscalls.h:935:3: warning: #warning syscall sync_file_range not implemented init/missing_syscalls.h:947:3: warning: #warning syscall getcpu not implemented init/missing_syscalls.h:950:3: warning: #warning syscall epoll_pwait not implemented The file scripts/ list a number of legacy system calls that are ignored because they only makes sense on i386 systems. Other contributors to this patch are Russell King <> and Stéphane Jourdois <> Signed-off-by: David Woodhouse <> Signed-off-by: Sam Ravnborg <>
2006-09-25remove RPM_BUILD_ROOT from asm-offsets.hOlaf Hering
No file in rpm binary package should have the RPM_BUILD_ROOT string in it. To simplify building of external modules, our kernel-source package contains some temp files from the Kbuild system. asm/asm-offsets.h is one of the files that contains the absolute path if make O=$O is used. * This file was generated by /var/tmp/kernel-source-2.6.14_rc4-build/usr/src/linux-2.6.14-rc4-2/Kbuild Remove the $RPM_BUILD_ROOT string in the shipped tempfile. Signed-off-by: Olaf Hering <> Signed-off-by: Andrew Morton <> Signed-off-by: Sam Ravnborg <>
2006-04-05kbuild: mips: fix sed regexp to generate asm-offset.hAtsushi Nemoto
Changes to Makefile.kbuild ("kbuild: add -fverbose-asm to i386 Makefile") breaks asm-offset.h file on MIPS. Other archs possibly suffer this change too but I'm not sure. Here is a fix just for MIPS. Signed-off-by: Atsushi Nemoto <> Signed-off-by: Sam Ravnborg <>
2006-01-08kbuild: clean up asm-offsets.h creationBrian Gerst
- Move mkdir out of cmd_offsets - Add input file to sed command instead of using cat Signed-off-by: Brian Gerst <> Signed-off-by: Sam Ravnborg <>
2005-09-10kbuild: fix generic asm-offsets.h supportSam Ravnborg
iThis fixes a bug where the generated asm-offsets.h file was saved in the source tree even with make O=. Thanks to Stephen Rothwell <> for the report. Signed-off-by: Sam Ravnborg <>
2005-09-09kbuild: mips use generic asm-offsets.h supportSam Ravnborg
Removed obsolete stuff from arch makefile. mips had a special rule for generating asm-offsets.h so preserved it using an architecture specific hook in top-level Kbuild file. Renamed .h file to asm-offsets.h Signed-off-by: Sam Ravnborg <>
2005-09-09kbuild: full dependency check on asm-offsets.hSam Ravnborg
Building asm-offsets.h has been moved to a seperate Kbuild file located in the top-level directory. This allow us to share the functionality across the architectures. The old rules in architecture specific Makefiles will die in subsequent patches. Furhtermore the usual kbuild dependency tracking is now used when deciding to rebuild asm-offsets.s. So we no longer risk to fail a rebuild caused by asm-offsets.c dependencies being touched. With this common rule-set we now force the same name across all architectures. Following patches will fix the rest. Signed-off-by: Sam Ravnborg <>