aboutsummaryrefslogtreecommitdiff
path: root/Documentation/kbuild
AgeCommit message (Collapse)Author
2008-05-04kconfig-language.txt: remove bogus hintAdrian Bunk
For the use case the hint describe a simple dependency is enough. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
2008-04-28kconifg: 'select' considered less evilMatthew Wilcox
While select should be used with care, it is not actually evil. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLSRichard Hacker
This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS. The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS is used when calling scripts/mod/modpost during stage 2 of the Kbuild process for non-kernel-tree modules. Signed-off-by: Richard Hacker <lerichi@gmx.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: document use of HAVE_*Sam Ravnborg
It has been discussed on lkml several times but we need it documented as this is new stuff. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: environment symbol supportRoman Zippel
Add the possibility to import a value from the environment into kconfig via the option syntax. Beside flexibility this has the advantage providing proper dependencies. Documented the options syntax. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: add hints/tips/tricks to Documentation/kbuild/kconfig-language.txtRandy Dunlap
Add a section on kconfig hints: how to do <something> in Kconfig files. Fix a few typos/spellos. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-22kbuild: cc-cross-prefix spellingGeert Uytterhoeven
Spelling fixes for cc-cross-prefix documentation Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19kconfig: update kconfig-language textRandy Dunlap
Add kconfig-language docs for mainmenu, def_bool, and def_tristate. Remove "requires" as a synonym of "depends on" since it was removed from the parser in commit 247537b9a270b52cc0375adcb0fb2605a160cba5. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19kbuild: introduce cc-cross-prefixSam Ravnborg
cc-cross-prefix is useful for the architecture that like to provide a default CROSS_COMPILE value, but may have several to select between. Sample usage: ifneq ($(SUBARCH),$(ARCH)) ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) endif endif Actual usage by the different archs will taken care of later. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: introduce ccflags-y, asflags-y and ldflags-ySam Ravnborg
Introduce ccflags-y, asflags-y and ldflags-y so we soon can deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS. This patch does not touch any in-tree users - thats next round. Lets get this committed first and then fix the users of the soon to be deprecated variants next. The rationale behind this change is to introduce support for makefile fragments like: ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG As a replacement for the uglier: ifeq ($(CONFIG_WHATEVER_DEBUG),y) EXTRA_CFLAGS := -DDEBUG endif Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: enable 'make CPPFLAGS=...' to add additional options to CPPSam Ravnborg
The variable CPPFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the tree and enabling one to use: make CPPFLAGS=... to specify additional CPP commandline options. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15kbuild: enable 'make AFLAGS=...' to add additional options to ASSam Ravnborg
The variable AFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of AFLAGS with KBUILD_AFLAGS all over the tree. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14kbuild: enable 'make CFLAGS=...' to add additional options to CCSam Ravnborg
The variable CFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. On top of that several people over time has asked for a way to pass in additional flags to gcc. This patch replace use of CFLAGS with KBUILD_CFLAGS all over the tree and enabling one to use: make CFLAGS=... to specify additional gcc commandline options. One usecase is when trying to find gcc bugs but other use cases has been requested too. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k Test was simple to do a defconfig build, apply the patch and check that nothing got rebuild. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12kbuild: kill EXTRA_ARFLAGSSam Ravnborg
EXTRA_ARFLAGS have never been used so no need to carry around on this. A google search did not reveal any external module using this either. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12kbuild: fix documentation in makefiles.txtSam Ravnborg
Small error had sneaked in with respect to use of LDFLAGS_$@. LDFLAGS_$@ is not valid in normal kbuild files so do not say so. Fix a reference bug too. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-08-11docs: note about select in kconfig-language.txtJarek Poplawski
A warning note from Sam Ravnborg about kconfig's select evilness, dependencies and the future (slightly corrected). Signed-off-by: Jarek Poplawski <jarkao2@o2.pl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16kbuild: document cc-fullversionSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02kbuild: small documentation fix in Documentation/kbuild/modules.txtAnton Blanchard
The Makefile fragment in Documentation/kbuild/modules.txt looks to be missing some braces. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-02-17kbuild: more doc. cleanupsRandy Dunlap
Fix typos/spellos in kbuild/makefiles.txt. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-12-12kconfig: Standardize "depends" -> "depends on" in Kconfig filesRobert P. J. Day
Standardize the miniscule percentage of occurrences of "depends" in Kconfig files to "depends on", and update kconfig-language.txt to reflect that. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30Fix typos in /Documentation : MiscMatt LaPlante
This patch fixes typos in various Documentation txts. The patch addresses some misc words. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-04[PATCH] docs: small kbuild cleanupDaniel Walker
While reading this I noticed that the contents of this document list section "3.8 Command line dependency" but it doesn't exist in the document. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03Fix typos in Documentation/: 'S'Matt LaPlante
This patch fixes typos in various Documentation txts. The patch addresses some words starting with the letter 'S'. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Alan Cox <alan@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-01kbuild: trivial documentation fixesRobert P. J. Day
Signed-off-by: "Robert P. J. Day" <rpjday@mindspring.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-26[PATCH] x86: Detect CFI support in the assembler at runtimeAndi Kleen
... instead of using a CONFIG option. The config option still controls if the resulting executable actually has unwind information. This is useful to prevent compilation errors when users select CONFIG_STACK_UNWIND on old binutils and also allows to use CFI in the future for non kernel debugging applications. Cc: jbeulich@novell.com Cc: sam@ravnborg.org Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-25kbuild: fixup Documentation/kbuild/modules.txtRobert P. J. Day
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: fix for some typos in Documentation/makefiles.txtBryce Harrington
I noticed a few typos while reading makefiles.txt to learn about the kbuild system. Attached is a patch against 2.6.18 to fix them. Remove trailing whitespace while we are there.. Signed-off-by: Bryce Harrington <bryce@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: linguistic fixes for Documentation/kbuild/makefiles.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: linguistic fixes for Documentation/kbuild/modules.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txtJan Engelhardt
I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-07-31[PATCH] vDSO hash-style fixRoland McGrath
The latest toolchains can produce a new ELF section in DSOs and dynamically-linked executables. The new section ".gnu.hash" replaces ".hash", and allows for more efficient runtime symbol lookups by the dynamic linker. The new ld option --hash-style={sysv|gnu|both} controls whether to produce the old ".hash", the new ".gnu.hash", or both. In some new systems such as Fedora Core 6, gcc by default passes --hash-style=gnu to the linker, so that a standard invocation of "gcc -shared" results in producing a DSO with only ".gnu.hash". The new ".gnu.hash" sections need to be dealt with the same way as ".hash" sections in all respects; only the dynamic linker cares about their contents. To work with older dynamic linkers (i.e. preexisting releases of glibc), a binary must have the old ".hash" section. The --hash-style=both option produces binaries that a new dynamic linker can use more efficiently, but an old dynamic linker can still handle. The new section runs afoul of the custom linker scripts used to build vDSO images for the kernel. On ia64, the failure mode for this is a boot-time panic because the vDSO's PT_IA_64_UNWIND segment winds up ill-formed. This patch addresses the problem in two ways. First, it mentions ".gnu.hash" in all the linker scripts alongside ".hash". This produces correct vDSO images with --hash-style=sysv (or old tools), with --hash-style=gnu, or with --hash-style=both. Second, it passes the --hash-style=sysv option when building the vDSO images, so that ".gnu.hash" is not actually produced. This is the most conservative choice for compatibility with any old userland. There is some concern that some ancient glibc builds (though not any known old production system) might choke on --hash-style=both binaries. The optimizations provided by the new style of hash section do not really matter for a DSO with a tiny number of symbols, as the vDSO has. If someone wants to use =gnu or =both for their vDSO builds and worry less about that compatibility, just change the option and the linker script changes will make any choice work fine. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Andi Kleen <ak@muc.de> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-24kbuild: add option for stripping modules while installing themTheodore Ts'o
Add option for stripping modules while installing them. This function adds support for stripping modules while they are being installed. CONFIG_DEBUG_KERNEL (which will probably become more popular as developers use kdump) causes the size of the installed modules to grow by a factor of 9 or so. Some kernel package systems solve this problem by stripping the debug information from /lib/modules after running "make modules_install", but that may not work for people who are installing directly into /lib/modules --- root partitions that were sized to handle 16 megs worth of modules may not be quite so happy with 145 megs of modules, so the "make modules_install" never succeeds. This patch allows such users to request modules_install to strip the modules as they are installed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04kbuild: fix garbled text in modules.txtBrian Gerst
Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-03-10kbuild: in makefile.txt note that Makefile is preferred name for kbuild filesSam Ravnborg
As noted by Roland Dreier <rdreier@cisco.com> makefiles.txt told one to use the name 'Kbuild' as preferred name for kbuild files. This is not yet true so let makefiles.txt reflect reality. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-02-19kbuild: make cc-version available in kbuild filesSam Ravnborg
Move $(CC) support functions to Kbuild.include so they are available in the kbuild files. In addition the following was done: o as-option documented in Documentation/kbuild/makefiles.txt o Moved documentation to new section to match new scope of functions o added cc-ifversion used to conditionally select a text string dependent on actual $(CC) version o documented cc-ifversion o change so Kbuild.include is read before the kbuild file Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-02-19kbuild: improved modversioning support for external modulesSam Ravnborg
With following patch a second option is enabled to obtain symbol information from a second external module when a external module is build. The recommended approach is to use a common kbuild file but that may be impractical in certain cases. With this patch one can copy over a Module.symvers from one external module to make symbols (and symbol versions) available for another external module. Updated documentation in Documentation/kbuild/modules.txt Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-02-19kbuild: support building individual files for external modulesSam Ravnborg
Support building individual files when dealing with separate modules. So say you have a module named "foo" which consist of two .o files bar.o and fun.o. You can then do: make -C $KERNELSRC M=`pwd` bar.o make -C $KERNELSRC M=`pwd` bar.lst make -C $KERNELSRC M=`pwd` bar.i make -C $KERNELSRC M=`pwd` / <= will build all .o files and link foo.o make -C $KERNELSRC M=`pwd` foo.ko <= will build the module and do the modpost step to create foo.ko The above will also work if the external module is placed in a subdirectory using a hirachy of kbuild files. Thanks to Andreas Gruenbacher <agruen@suse.de> for initial feature request / bug report. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-08kbuild: remove GCC_VERSIONSam Ravnborg
This was causing some ordering problems. Remove the up-front evaluation and just revaluate the compiler version each time we need it. (The up-front evaluation was problematic because some architectures modify the value of $(CC)). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-06kbuild: document howto build external modules using several directoriesSam Ravnborg
Update modules.txt with info how to build external modules with files in several directories. The question popped up on lkml often enough to warrant this, let's see if people read this stuff - or google hits it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-12-16kbuild: patch to Documentation/kbuild/modules.txtBrian Strand
First off, thanks for the kbuild docs, they are very useful! Second, I've attached a patch to modules.txt (from 2.6.14.2) with a "compile" fix to a Makefile example, and some trivial spelling/grammar nits. Please let me know if you want the patch in some other format (eg not MIME), or if I should go bother someone else about it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-09-11kbuild: rename prepare to archprepare to fix dependency chainSam Ravnborg
When introducing the generic asm-offsets.h support the dependency chain for the prepare targets was changed. All build scripts expecting include/asm/asm-offsets.h to be made when using the prepare target would broke. With the limited number of prepare targets left in arch Makefiles the trivial solution was to introduce a new arch specific target: archprepare The dependency chain looks like this now: prepare | +--> prepare0 | +--> archprepare | +--> scripts_basic +--> prepare1 | +---> prepare2 | +--> prepare3 So prepare 3 is processed before prepare2 etc. This guaantees that the asm symlink, version.h, scripts_basic are all updated before archprepare is processed. prepare0 which build the asm-offsets.h file will need the actions performed by archprepare. The head target is now named prepare, because users scripts will most likely use that target, but prepare-all has been kept for compatibility. Updated Documentation/kbuild/makefiles.txt. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-28[PATCH] kbuild: describe Kbuild pitfallPaolo 'Blaisorblade' Giarrusso
Whitespace is significant for make, and I just fought against this... so please apply this patch. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!