diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 13:12:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 13:12:46 -0400 |
commit | 3b7b3e6ec5f56118046594d3c62469e7d1d0aadd (patch) | |
tree | 3a6eb410ee27b660b7c085c81619f9e69fb5f0fa /Documentation | |
parent | e3b1fd56f175526db42ae94c457f29c2fa810aca (diff) | |
parent | 164f0d2efaaef835473e74b162eae750341d6a8c (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
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-)
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index c600e2f44a62..764f5991a3fc 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -23,11 +23,10 @@ This document describes the Linux kernel Makefiles. | |||
23 | === 4 Host Program support | 23 | === 4 Host Program support |
24 | --- 4.1 Simple Host Program | 24 | --- 4.1 Simple Host Program |
25 | --- 4.2 Composite Host Programs | 25 | --- 4.2 Composite Host Programs |
26 | --- 4.3 Defining shared libraries | 26 | --- 4.3 Using C++ for host programs |
27 | --- 4.4 Using C++ for host programs | 27 | --- 4.4 Controlling compiler options for host programs |
28 | --- 4.5 Controlling compiler options for host programs | 28 | --- 4.5 When host programs are actually built |
29 | --- 4.6 When host programs are actually built | 29 | --- 4.6 Using hostprogs-$(CONFIG_FOO) |
30 | --- 4.7 Using hostprogs-$(CONFIG_FOO) | ||
31 | 30 | ||
32 | === 5 Kbuild clean infrastructure | 31 | === 5 Kbuild clean infrastructure |
33 | 32 | ||
@@ -643,29 +642,7 @@ Both possibilities are described in the following. | |||
643 | Finally, the two .o files are linked to the executable, lxdialog. | 642 | Finally, the two .o files are linked to the executable, lxdialog. |
644 | Note: The syntax <executable>-y is not permitted for host-programs. | 643 | Note: The syntax <executable>-y is not permitted for host-programs. |
645 | 644 | ||
646 | --- 4.3 Defining shared libraries | 645 | --- 4.3 Using C++ for host programs |
647 | |||
648 | Objects with extension .so are considered shared libraries, and | ||
649 | will be compiled as position independent objects. | ||
650 | Kbuild provides support for shared libraries, but the usage | ||
651 | shall be restricted. | ||
652 | In the following example the libkconfig.so shared library is used | ||
653 | to link the executable conf. | ||
654 | |||
655 | Example: | ||
656 | #scripts/kconfig/Makefile | ||
657 | hostprogs-y := conf | ||
658 | conf-objs := conf.o libkconfig.so | ||
659 | libkconfig-objs := expr.o type.o | ||
660 | |||
661 | Shared libraries always require a corresponding -objs line, and | ||
662 | in the example above the shared library libkconfig is composed by | ||
663 | the two objects expr.o and type.o. | ||
664 | expr.o and type.o will be built as position independent code and | ||
665 | linked as a shared library libkconfig.so. C++ is not supported for | ||
666 | shared libraries. | ||
667 | |||
668 | --- 4.4 Using C++ for host programs | ||
669 | 646 | ||
670 | kbuild offers support for host programs written in C++. This was | 647 | kbuild offers support for host programs written in C++. This was |
671 | introduced solely to support kconfig, and is not recommended | 648 | introduced solely to support kconfig, and is not recommended |
@@ -688,7 +665,7 @@ Both possibilities are described in the following. | |||
688 | qconf-cxxobjs := qconf.o | 665 | qconf-cxxobjs := qconf.o |
689 | qconf-objs := check.o | 666 | qconf-objs := check.o |
690 | 667 | ||
691 | --- 4.5 Controlling compiler options for host programs | 668 | --- 4.4 Controlling compiler options for host programs |
692 | 669 | ||
693 | When compiling host programs, it is possible to set specific flags. | 670 | When compiling host programs, it is possible to set specific flags. |
694 | The programs will always be compiled utilising $(HOSTCC) passed | 671 | The programs will always be compiled utilising $(HOSTCC) passed |
@@ -716,7 +693,7 @@ Both possibilities are described in the following. | |||
716 | When linking qconf, it will be passed the extra option | 693 | When linking qconf, it will be passed the extra option |
717 | "-L$(QTDIR)/lib". | 694 | "-L$(QTDIR)/lib". |
718 | 695 | ||
719 | --- 4.6 When host programs are actually built | 696 | --- 4.5 When host programs are actually built |
720 | 697 | ||
721 | Kbuild will only build host-programs when they are referenced | 698 | Kbuild will only build host-programs when they are referenced |
722 | as a prerequisite. | 699 | as a prerequisite. |
@@ -747,7 +724,7 @@ Both possibilities are described in the following. | |||
747 | This will tell kbuild to build lxdialog even if not referenced in | 724 | This will tell kbuild to build lxdialog even if not referenced in |
748 | any rule. | 725 | any rule. |
749 | 726 | ||
750 | --- 4.7 Using hostprogs-$(CONFIG_FOO) | 727 | --- 4.6 Using hostprogs-$(CONFIG_FOO) |
751 | 728 | ||
752 | A typical pattern in a Kbuild file looks like this: | 729 | A typical pattern in a Kbuild file looks like this: |
753 | 730 | ||