- Jan 06, 2019
-
-
Masahiro Yamada authored
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 <sam@ravnborg.org> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by:
Sam Ravnborg <sam@ravnborg.org>
-
- Nov 01, 2018
-
-
Masahiro Yamada authored
The last user of cc-fullversion was removed by commit f2910f0e ("powerpc: remove old GCC version checks"). Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Aug 22, 2018
-
-
Michal Suchanek authored
Fixes: 8377bd2b ("kbuild: Rename HOST_LOADLIBES to KBUILD_HOSTLDLIBS") Signed-off-by:
Michal Suchanek <msuchanek@suse.de> Acked-by:
Laura Abbott <labbott@redhat.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Jul 20, 2018
-
-
Dirk Gouders authored
Users of if_changed could easily feel invited to use it to divide a recipe into parts like: a: prereq FORCE $(call if_changed,do_a) $(call if_changed,do_b) But this is problematic, because if_changed should not be used more than once per target: in the above example, if_changed stores the command-line of the given command in .a.cmd and when a is up-to-date with respect to prereq, the file .a.cmd contains the command-line for the last command executed, i.e. do_b. When the recipe is then executed again, without any change of prerequisites, the command-line check for do_a will fail, do_a will be executed and stored in .a.cmd. The next check, however, will still see the old content (the file isn't re-read) and if_changed will skip do_b, because the command-line test will not recognize a change. On the next execution of the recipe the roles will flip: do_a is OK but do_b not and it will be executed. And so on... Signed-off-by:
Dirk Gouders <dirk@gouders.net> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Jul 17, 2018
-
-
Laura Abbott authored
In preparation for enabling command line CFLAGS, re-name HOSTCFLAGS to KBUILD_HOSTCFLAGS as the internal use only flags. This should not have any visible effects. Signed-off-by:
Laura Abbott <labbott@redhat.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Mar 25, 2018
-
-
Masahiro Yamada authored
Documentation/kbuild/makefiles.txt lists variables used in Makefile whereas Documentation/kbuild/kbuild.txt describes user assignable parameters given via environments or the command line. LDFLAGS_MODULE is a command line interface, so it should be dropped from makefiles.txt. Some lines below in this file, it is clearly explained that KBUILD_LDFLAGS_MODULE is the right one for the internal use: KBUILD_LDFLAGS_MODULE Options for $(LD) when linking modules $(KBUILD_LDFLAGS_MODULE) is used to add arch-specific options used when linking modules. This is often a linker script. From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). Then, kbuild.txt explains LDFLAGS_MODULE, like follows: LDFLAGS_MODULE -------------------------------------------------- Additional options used for $(LD) when linking modules. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
Nicholas Piggin authored
Incremental linking is gone, so rename built-in.o to built-in.a, which is the usual extension for archive files. This patch does two things, first is a simple search/replace: git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g' The second is to invert nesting of nested text manipulations to avoid filtering built-in.a out from libs-y2: -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y))) +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
Nicholas Piggin authored
This removes the old `ld -r` incremental link option, which has not been selected by any architecture since June 2017. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Nov 08, 2017
-
-
Masahiro Yamada authored
We need to add "clean-files" in Makfiles to clean up DT blobs, but we often miss to do so. Since there are no source files that end with .dtb or .dtb.S, so we can clean-up those files from the top-level Makefile. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Rob Herring <robh@kernel.org>
-
- Oct 24, 2017
-
-
Cao jin authored
It does several fixes: 1. move the displaced ld example to its reasonable place. 2. add new example for command gzip. 3. fix 2 number errors. 4. fix format of chapter 7.x, make it looks the same as other chapters. Signed-off-by:
Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Aug 07, 2017
-
-
Sedat Dilek authored
Update the ccflags-y example to match current usage. Signed-off-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jun 25, 2017
-
-
Masahiro Yamada authored
Documentation/kbuild/makefiles.txt says the change for align options occurred at GCC 3.0, and Documentation/process/changes.rst says the minimal supported GCC version is 3.2, so it should be safe to hard-code -falign* options. Fix the only user arch/x86/Makefile_32.cpu and remove cc-option-align. Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by:
Ingo Molnar <mingo@kernel.org>
-
- Jun 21, 2017
-
-
Masahiro Yamada authored
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 fcc8487d ("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 <yamada.masahiro@socionext.com> Acked-by:
Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
- May 18, 2017
-
-
Tobias Klauser authored
Signed-off-by:
Tobias Klauser <tklauser@distanz.ch> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- May 10, 2017
-
-
Nicolas Dichtel authored
This patch removes the need of subdir-y. Now all files/directories under arch/<arch>/include/uapi/ are exported. The only change for userland is the layout of the command 'make headers_install_all': directories asm-<arch> are replaced by arch-<arch>/. Those new directories contains all files/directories of the specified arch. Note that only cris and tile have more directories than only asm: - arch-v[10|32] for cris; - arch for tile. Signed-off-by:
Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
Nicolas Dichtel authored
Regularly, when a new header is created in include/uapi/, the developer forgets to add it in the corresponding Kbuild file. This error is usually detected after the release is out. In fact, all headers under uapi directories should be exported, thus it's useless to have an exhaustive list. After this patch, the following files, which were not exported, are now exported (with make headers_install_all): asm-arc/kvm_para.h asm-arc/ucontext.h asm-blackfin/shmparam.h asm-blackfin/ucontext.h asm-c6x/shmparam.h asm-c6x/ucontext.h asm-cris/kvm_para.h asm-h8300/shmparam.h asm-h8300/ucontext.h asm-hexagon/shmparam.h asm-m32r/kvm_para.h asm-m68k/kvm_para.h asm-m68k/shmparam.h asm-metag/kvm_para.h asm-metag/shmparam.h asm-metag/ucontext.h asm-mips/hwcap.h asm-mips/reg.h asm-mips/ucontext.h asm-nios2/kvm_para.h asm-nios2/ucontext.h asm-openrisc/shmparam.h asm-parisc/kvm_para.h asm-powerpc/perf_regs.h asm-sh/kvm_para.h asm-sh/ucontext.h asm-tile/shmparam.h asm-unicore32/shmparam.h asm-unicore32/ucontext.h asm-x86/hwcap2.h asm-xtensa/kvm_para.h drm/armada_drm.h drm/etnaviv_drm.h drm/vgem_drm.h linux/aspeed-lpc-ctrl.h linux/auto_dev-ioctl.h linux/bcache.h linux/btrfs_tree.h linux/can/vxcan.h linux/cifs/cifs_mount.h linux/coresight-stm.h linux/cryptouser.h linux/fsmap.h linux/genwqe/genwqe_card.h linux/hash_info.h linux/kcm.h linux/kcov.h linux/kfd_ioctl.h linux/lightnvm.h linux/module.h linux/nbd-netlink.h linux/nilfs2_api.h linux/nilfs2_ondisk.h linux/nsfs.h linux/pr.h linux/qrtr.h linux/rpmsg.h linux/sched/types.h linux/sed-opal.h linux/smc.h linux/smc_diag.h linux/stm.h linux/switchtec_ioctl.h linux/vfio_ccw.h linux/wil6210_uapi.h rdma/bnxt_re-abi.h Note that I have removed from this list the files which are generated in every exported directories (like .install or .install.cmd). Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all subdirs with a pure makefile command. For the record, note that exported files for asm directories are a mix of files listed by: - include/uapi/asm-generic/Kbuild.asm; - arch/<arch>/include/uapi/asm/Kbuild; - arch/<arch>/include/asm/Kbuild. Signed-off-by:
Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by:
Russell King <rmk+kernel@armlinux.org.uk> Acked-by:
Mark Salter <msalter@redhat.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
Nicolas Dichtel authored
This option was added in commit c7bb349e ("kbuild: introduce destination-y for exported headers") but never used in-tree. Signed-off-by:
Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by:
Paul Bolle <pebolle@tiscali.nl> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
-
- Sep 09, 2016
-
-
Nicholas Piggin authored
Allow architectures to create arch/xxx/Makefile.postlink with targets for vmlinux, modules.ko, and clean, which will be invoked after final linking of vmlinux and modules. powerpc will use this to check vmlinux linker relocations for sanity, and may use it to fix up alternate instruction patch branch addresses. Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- Jul 07, 2016
-
-
James Hogan authored
Track generated header files which aren't already in genhdr-y, alongside generic-y wrappers in the */include/generated/[uapi/]asm/ directories. Currently only x86 generates extra headers in these directories, for the purposes of enumerating system calls for different ABIs, and xen hypercalls. This will allow the asm-generic wrapper handling code to remove stale wrappers when files are removed from generic-y, without also removing these headers which are generated separately. Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
James Hogan <james.hogan@imgtec.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-kbuild@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: Michal Marek <mmarek@suse.com> Link: http://lkml.kernel.org/r/1466808144-23209-2-git-send-email-james.hogan@imgtec.com Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
- Jul 06, 2015
-
-
Michal Marek authored
Since commit a1c48bb1 (Makefile: Fix unrecognized cross-compiler command line options), the arch Makefile is included earlier by the main Makefile, preventing the arc architecture to set its -O3 compiler option. Since there might be more use cases for an arch Makefile to fine-tune the options, add support for ARCH_CPPFLAGS, ARCH_AFLAGS and ARCH_CFLAGS variables that are appended to the respective kbuild variables. The user still has the final say via the KCPPFLAGS, KAFLAGS and KCFLAGS variables. Reported-by:
Vineet Gupta <Vineet.Gupta1@synopsys.com> Cc: stable@vger.kernel.org # 3.16+ Signed-off-by:
Michal Marek <mmarek@suse.com>
-
- Jun 08, 2015
-
-
Jeffrey Rogers authored
Commit 97659181 (kbuild Update documentation of clean-files and clean-dirs) changed the example for the clean-files variable, but left the explanation unchanged. Edit the explanation to match the example. Signed-off-by:
Jeffrey Rogers <jeffreydavidrogers@gmail.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jan 09, 2015
-
-
Masahiro Yamada authored
The macro "try-run" can have an argument for each of true and false cases. Having an argument for the false case of cc-ifversion (and ld-ifversion) would be useful too. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Masahiro Yamada authored
The macros cc-version, cc-fullversion and ld-version take no argument. It is not necessary to add $(call ...) to invoke them. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Helge Deller <deller@gmx.de> [parisc] Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jan 08, 2015
-
-
Michal Marek authored
Commit a16c5f99 (kbuild: Fix removal of the debian/ directory) slightly changed the processing of the clean-files and clean-dirs variables. Also, use a current real-world example of clean-files usage. Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Aug 19, 2014
-
-
Geert Uytterhoeven authored
- singular versus plural, - "by" versus "of", - missing "if", "it", "the", - consistent use of "xxx-specific" versus "xxx specific". Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Acked-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Geert Uytterhoeven authored
Commit b40b25ff ("kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp") improved the functionality of cmd_dtc_cpp and merged it back into cmd_dtc. Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Geert Uytterhoeven authored
- These days if_changed is used with many more commands than ld, objcopy, and gzip, hence add an ellipsis, - Any target that utilises if_changed must be listed in $(targets), so it needs an assignment to "targets", not "target". Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Geert Uytterhoeven authored
As of commit f7f16b77 ("kbuild: drop include/asm"), the include/asm symlink is no longer created. Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jul 16, 2014
-
-
Masahiro Yamada authored
The shared library feature in Makefile.host is no longer used. Rip it off to keep the build infrastucture simple. Update Documentation/kbuild/makefiles.txt too. The section "4.3 Definition shared libraries" should be removed and the following sections should be re-numbered. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Suggested-by:
Sam Ravnborg <sam@ravnborg.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jun 18, 2014
-
-
Masahiro Yamada authored
Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Apr 08, 2013
-
-
Paul Bolle authored
Signed-off-by:
Paul Bolle <pebolle@tiscali.nl> Acked-by:
Rob Landley <rob@landley.net> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Antony Pavlov authored
The kbuild's ld-option function is broken because the command $(CC) /dev/null -c -o "$$TMPO" does not create object file! I have used a relatively old mips gcc 3.4.6 cross-compiler and a relatively new gcc 4.7.2 to check this fact but the results are the same. EXAMPLE: $ rm /tmp/1.o $ mips-linux-gcc /dev/null -c -o /tmp/1.o mips-linux-gcc: /dev/null: linker input file unused because linking not done $ ls -la /tmp/1.o ls: cannot access /tmp/1.o: No such file or directory We can easily fix the problem by adding the '-x c' compiler option. EXAMPLE: $ rm /tmp/1.o $ mips-linux-gcc -x c /dev/null -c -o /tmp/1.o $ ls -la /tmp/1.o -rw-r--r-- 1 antony antony 778 Apr 2 20:40 /tmp/1.o Also fix wrong ld-option example. Signed-off-by:
Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Feb 08, 2013
-
-
Stephen Warren authored
Create cmd_dtc_cpp to run the C pre-processor on *.dts file before passing them to dtc for final compilation. This allows the use of #define and #include within the .dts file. Acked-by:
Simon Glass <sjg@chromium.org> Acked-by:
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by:
Michal Marek <mmarek@suse.cz> Acked-by:
Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by:
Stephen Warren <swarren@nvidia.com> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
- Nov 30, 2012
-
-
Stephen Warren authored
All architectures that use cmd_dtc do so in almost the same way. Create a central build rule to avoid duplication. The one difference is that most current uses of dtc build $(obj)/%.dtb from $(src)/dts/%.dts rather than building the .dtb in the same directory as the .dts file. This difference will be eliminated arch-by-arch in future patches. MIPS is the exception here; it already uses the exact same rule as the new common rule, so the duplicate is removed in this patch to avoid any conflict. arch/mips changes courtesy of Ralf Baechle. Update Documentation/kbuild to remove the explicit call to cmd_dtc from the example, now that the rule exists in a centralized location. Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org Cc: Olof Johansson <olof@lixom.net> Cc: Russell King <linux@arm.linux.org.uk> Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: linux@lists.openrisc.net Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: linux-c6x-dev@linux-c6x.org Cc: Mark Salter <msalter@redhat.com> Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Cc: Chris Zankel <chris@zankel.net> Cc: linux-xtensa@linux-xtensa.org Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org> Signed-off-by:
Stephen Warren <swarren@nvidia.com> Signed-off-by:
Rob Herring <rob.herring@calxeda.com>
-
- Oct 02, 2012
-
-
David Howells authored
Remove the objhdr-y export list as it is no longer used. genhdr-y should be used instead. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by:
Dave Jones <davej@redhat.com>
-
- Nov 17, 2011
-
-
H. Peter Anvin authored
Add support for an "archheaders" target. This target can generate files that need to be installed for user space by "make headers_install" or "make headers_install_all". In order to support "make headers_install_all", it must be able to run without the tree having to be configured first. Cc: David Woodhouse <dwmw2@infradead.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by:
H. Peter Anvin <hpa@linux.intel.com>
-
- Jun 13, 2011
-
-
Wanlong Gao authored
Change all "arch/i386" to "arch/x86" in Documentaion/, since the directory has changed. Also update the files which have changed their filename in the meantime accordingly. Signed-off-by:
Wanlong Gao <wanlong.gao@gmail.com> [jkosina@suse.cz: reword changelog] Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- May 03, 2011
-
-
Michal Marek authored
Starting with 4.4, gcc will happily accept -Wno-<anything> in the cc-option test and complain later when compiling a file that has some other warning. This rather unexpected behavior is intentional as per http://gcc.gnu.org/PR28322 , so work around it by testing for support of the opposite option (without the no-). Introduce a new Makefile function cc-disable-warning that does this and update two uses of cc-option in the toplevel Makefile. Reported-and-tested-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Apr 28, 2011
-
-
Sam Ravnborg authored
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/Kbuild To use a generic file just add: generic-y += <name-of-header-file.h> 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 <sam@ravnborg.org> Acked-by:
Guan Xuetao <guanxuetao@mprc.pku.edu.cn> Tested-by:
Guan Xuetao <guanxuetao@mprc.pku.edu.cn> Acked-by:
Arnd Bergmann <arnd@arndb.de> Cc: Remis Lima Baima <remis.developer@googlemail.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Apr 20, 2011
-
-
Michal Marek authored
The D option of ar is only available in newer versions. Signed-off-by:
Michal Marek <mmarek@suse.cz>
-