aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/kbuild/makefiles.txt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-11uapi: export all arch specifics directoriesNicolas Dichtel1-14/+1
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>
2017-05-11uapi: export all headers under uapi directoriesNicolas Dichtel1-25/+41
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>
2017-05-11Makefile.headersinst: remove destination-y optionNicolas Dichtel1-19/+4
This option was added in commit c7bb349e7c25 ("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>
2016-09-09kbuild: add arch specific post-link MakefileNicholas Piggin1-0/+16
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>
2016-07-07kbuild, x86: Track generated headers with generated-yJames Hogan1-0/+14
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>
2015-07-06kbuild: Allow arch Makefiles to override {cpp,ld,c}flagsMichal Marek1-0/+8
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>
2015-06-08kbuild: edit explanation of clean-files variableJeffrey Rogers1-2/+2
Commit 976591810f8a (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>
2015-02-19Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds1-6/+5
Pull misc kbuild changes from Michal Marek: "Just a few non-critical kbuild changes: - builddeb adds the actual distribution name in the changelog - documentation fixes" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: trivial - fix the help doc of CONFIG_CC_OPTIMIZE_FOR_SIZE kbuild: Update documentation of clean-files and clean-dirs builddeb: Try to determine distribution builddeb: Update year and git repository URL in debian/copyright
2015-01-09kbuild: allow cc-ifversion to have the argument for false conditionMasahiro Yamada1-2/+3
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>
2015-01-09kbuild: do not add $(call ...) to invoke cc-version or cc-fullversionMasahiro Yamada1-2/+2
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>
2015-01-08kbuild: Update documentation of clean-files and clean-dirsMichal Marek1-6/+5
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>
2014-08-19Documentation: kbuild: Improve grammarGeert Uytterhoeven1-28/+28
- 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>
2014-08-19Documentation: kbuild: Remove obsolete dtc_cpp sectionGeert Uytterhoeven1-23/+0
Commit b40b25fff8205dd18124d8fc87b2c9c57f269b5f ("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>
2014-08-19Documentation: kbuild: Improve if_changed documentationGeert Uytterhoeven1-3/+3
- 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>
2014-08-19Documentation: kbuild: Remove obsolete include/asm symlink stepGeert Uytterhoeven1-5/+4
As of commit f7f16b7799ed68654850ab340ef812895aebcf4c ("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>
2014-08-14Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds1-31/+8
Pull kbuild updates from Michal Marek: - make clean also considers $(extra-m) and $(extra-) to be consistent - cleanup and fixes in scripts/Makefile.host - allow to override the name of the Python 2 executable with make PYTHON=... (only needed for ia64 in practice) - option to split debugingo into *.dwo files to save disk space if the compiler supports it (CONFIG_DEBUG_INFO_SPLIT) - option to use dwarf4 debuginfo if the compiler supports it (CONFIG_DEBUG_INFO_DWARF4) - fix for disabling certain warnings with clang - fix for unneeded rebuild with dash when a command contains backslashes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix handling of backslashes in *.cmd files kbuild, LLVMLinux: Supress warnings unless W=1-3 Kbuild: Add a option to enable dwarf4 v2 kbuild: Support split debug info v4 kbuild: allow to override Python command name kbuild: clean-up and bug fix of scripts/Makefile.host kbuild: clean up scripts/Makefile.host kbuild: drop shared library support from Makefile.host kbuild: fix a bug of C++ host program handling kbuild: fix a typo in scripts/Makefile.host scripts/Makefile.clean: clean also $(extra-m) and $(extra-)
2014-07-16kbuild: drop shared library support from Makefile.hostMasahiro Yamada1-31/+8
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>
2014-06-18kbuild: fix a typo in a kbuild documentMasahiro Yamada1-1/+1
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-05-07Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds1-2/+3
Pull misc kbuild updates from Michal Marek: "Non-critical kbuild changes: - make coccicheck improvements, but no new semantic patches this time - make rpm improvements - make tar-pkg change to include the architecture in the filename. This is a deliberate incompatibility, but nobody has complained so far and it is useful if you build for different architectures. It also matches what the deb-pkg and rpm-pkg targets produce. - kbuild documentation fix" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: rpm-pkg: Remove pointless set -e statements rpm-pkg: Always regenerate the specfile rpm-pkg: Do not write to the parent directory rpm-pkg: Do not package the whole source directory buildtar: Add ARCH to the archive name Coccinelle: Fix patch output when coccicheck is used with M= and C= Coccinelle: Add support to the SPFLAGS variable Coccinelle: Cleanup the setting of the FLAGS and OPTIONS variables Coccinelle: Restore coccicheck verbosity in ONLINE mode (C=1 or C=2) scripts/package/Makefile: compare objtree with srctree instead of test KBUILD_OUTPUT doc: change example to existing Makefile fragment scripts/tags.sh: Add magic for OFFSET and DEFINE
2013-04-08doc: change example to existing Makefile fragmentPaul Bolle1-2/+3
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Rob Landley <rob@landley.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-04-08kbuild: fix ld-option functionAntony Pavlov1-1/+1
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>
2013-02-08kbuild: create a rule to run the pre-processor on *.dts filesStephen Warren1-0/+23
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>
2012-11-30kbuild: centralize .dts->.dtb ruleStephen Warren1-7/+8
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>
2012-10-02UAPI: Remove the objhdr-y export listDavid Howells1-4/+4
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>
2011-11-17kbuild: Add support for an "archheaders" targetH. Peter Anvin1-18/+32
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>
2011-06-13doc: fix wrong arch/i386 referencesWanlong Gao1-19/+19
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>
2011-05-03kbuild: Fix passing -Wno-* options to gcc 4.4+Michal Marek1-0/+12
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>
2011-04-28kbuild: asm-generic supportSam Ravnborg1-0/+36
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>
2011-04-20kbuild: Fix build with binutils <= 2.19Michal Marek1-0/+5
The D option of ar is only available in newer versions. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-17kbuild, mtd, net: a few comment typo fixes and rewordingGilles Espinasse1-1/+2
Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-12-23of: Add support for linking device tree blobs into vmlinuxDirk Brandewie1-0/+15
This patch adds support for linking device tree blob(s) into vmlinux. Modifies asm-generic/vmlinux.lds.h to add linking .dtb sections into vmlinux. To maintain compatiblity with the of/fdt driver code platforms MUST copy the blob to a non-init memory location before the kernel frees the .init.* sections in the image. Modifies scripts/Makefile.lib to add a kbuild command to compile DTS files to device tree blobs and a rule to create objects to wrap the blobs for linking. STRUCT_ALIGNMENT is defined in vmlinux.lds.h for use in the rule to create wrapper objects for the dtb in Makefile.lib. The STRUCT_ALIGN() macro in vmlinux.lds.h is modified to use the STRUCT_ALIGNMENT definition. The DTB's are placed on 32 byte boundries to allow parsing the blob with driver/of/fdt.c during early boot without having to copy the blob to get the structure alignment GCC expects. A DTB is linked in by adding the DTB object to the list of objects to be linked into vmlinux in the archtecture specific Makefile using obj-y += foo.dtb.o Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Acked-by: Michal Marek <mmarek@suse.cz> [grant.likely@secretlab.ca: cleaned up whitespace inconsistencies] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-10-28Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-0/+7
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: initramfs: Fix build break on symbol-prefixed archs initramfs: fix initramfs size calculation initramfs: generalize initramfs_data.xxx.S 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-09-13Merge branch 'kbuild/clean' into kbuild/kbuildMichal Marek1-0/+7
2010-08-14kbuild: drop unifdef-y supportSam Ravnborg1-6/+0
unifdef-y is not used anymore - drop remaining references Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2010-08-05Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-5/+22
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: modpost: support objects with more than 64k sections trivial: fix a typo in a filename frv: clean up arch/frv/Makefile kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line Kbuild: Add option to set -femit-struct-debug-baseonly Makefile: "make kernelrelease" should show the correct full kernel version Makefile.build: make KBUILD_SYMTYPES work again
2010-08-05Documentation: fix kbuild typos and wordingNicolas Kaiser1-12/+12
Fixed some typos and wording. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-05Documentation: update kbuild make typos/grammar/text flowMatt Mooney1-28/+25
Update section 3.7 examples to reflect the current state of the Makefiles used. Fix spelling and grammar errors along with flow of text. Signed-off-by: matt mooney <mfm@muteddisk.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-05Documentation: update kbuild make examples#2 to reflect changesMatt Mooney1-6/+6
Update section 3.2 and 3.5 example, along with text in section 3.5 to reflect change. Signed-off-by: matt mooney <mfm@muteddisk.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-05Documentation: update kbuild loadable modules goals & examplesMatt Mooney1-18/+19
Update section 3.3 Loadable module goals - obj-m, from $(<module_name>-objs) to $(<module_name>-y) for easier addition of conditional objects to the module. The examples are also updated to reflect the current state of each Makefile used. Signed-off-by: matt mooney <mfm@muteddisk.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-03kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command lineSam Ravnborg1-2/+7
It is now possible to assign options to AS and CC on the command line - which is only used for built-in code. {A,C}FLAGS_KERNEL was used both in the top-level Makefile in the arch makefiles, thus users had no way to specify additional options to AS, CC without overriding the original value. Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL that is used by arch specific files and free up {A,C}FLAGS_KERNEL so they can be assigned on the command line. All arch Makefiles that used the old variables has been updated. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-03kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command lineSam Ravnborg1-3/+15
It is now possible to assign options to AS, CC and LD on the command line - which is only used when building modules. {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile in the arch makefiles, thus users had no way to specify additional options to AS, CC, LD when building modules without overriding the original value. Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE that is used by arch specific files and free up {A,C,LD}FLAGS_MODULE so they can be assigned on the command line. All arch Makefiles that used the old variables has been updated. Note: Previously we had a MODFLAGS variable for both AS and CC. But in favour of consistency this was dropped. So in some cases arch Makefile has one assignmnet replaced by two assignmnets. Note2: MODFLAGS was not documented and is dropped without any notice. I do not expect much/any breakage from this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin] Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32] Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-05-27kbuild: Revert part of e8d400a to resolve a conflictMichal Marek1-1/+1
A more complete patch in the kernel-doc tree also contains this change. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-11kbuild: Really don't clean bounds.h and asm-offsets.hMichal Marek1-0/+7
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 <mmarek@suse.cz>
2010-02-17kbuild: fix a couple of typos in DocumentationKirill Smelkov1-1/+1
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-09-20kbuild: introduce ld-optionSam Ravnborg1-0/+14
ld-option is used to check if $(LD) supports a specific option. Based on patch from Andi Kleen. Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> First use is to check if option -X is supported (upcoming patch). Theis is ne
2009-09-20kbuild: rename ld-option to cc-ldoptionSam Ravnborg1-3/+3
ld-option is misnamed as it test options to gcc, not to ld. Renamed it to reflect this. Cc: Andi Kleen <andi@firstfloor.org> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-04-19kbuild: introduce subdir-ccflags-ySam Ravnborg1-0/+10
Following patch introduce support for setting options to gcc that has effect for current directory and all subdirectories. The typical use case are an architecture or a subsystem that decide to cover all files with -Werror. Today alpha, mips and sparc uses -Werror in almost all their Makefile- with subdir-ccflag-y it is now simpler to do so as only the top-level directories needs to be covered. Likewise if we decide to cover a full subsystem such as net/ with -Werror this is done by adding a single line to net/Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de>
2009-04-11kbuild: introduce destination-y for exported headersSam Ravnborg1-8/+75
xtensa and arm have asked for a possibility to export headers and locate them in a specific directory when exported. Introduce destiantion-y to support this. This patch in additiona adds some limited documentation for the variables used for exported headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Oskar Schirmer <os@emlix.com> Cc: Mikael Starvik <mikael.starvik@axis.com>
2008-12-03kbuild: introduce $(kecho) convenience echoMike Frysinger1-0/+14
There is a bunch of places in the build system where we do 'echo' to show some nice status lines. This means we still get output when running in silent mode. So declare a new KECHO variable that only does 'echo' when we are in a suitable verbose build mode. Signed-off-by: Mike Frysinger <vapier@gentoo.org> [sam: added Documentation] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-22kbuild: cc-cross-prefix spellingGeert Uytterhoeven1-5/+5
Spelling fixes for cc-cross-prefix documentation Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>