aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kbuild/makefiles.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/kbuild/makefiles.txt')
-rw-r--r--Documentation/kbuild/makefiles.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index d76cfd8712e1..71c602d61680 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -18,6 +18,7 @@ This document describes the Linux kernel Makefiles.
18 --- 3.9 Dependency tracking 18 --- 3.9 Dependency tracking
19 --- 3.10 Special Rules 19 --- 3.10 Special Rules
20 --- 3.11 $(CC) support functions 20 --- 3.11 $(CC) support functions
21 --- 3.12 $(LD) support functions
21 22
22 === 4 Host Program support 23 === 4 Host Program support
23 --- 4.1 Simple Host Program 24 --- 4.1 Simple Host Program
@@ -435,14 +436,14 @@ more details, with real examples.
435 The second argument is optional, and if supplied will be used 436 The second argument is optional, and if supplied will be used
436 if first argument is not supported. 437 if first argument is not supported.
437 438
438 ld-option 439 cc-ldoption
439 ld-option is used to check if $(CC) when used to link object files 440 cc-ldoption is used to check if $(CC) when used to link object files
440 supports the given option. An optional second option may be 441 supports the given option. An optional second option may be
441 specified if first option are not supported. 442 specified if first option are not supported.
442 443
443 Example: 444 Example:
444 #arch/i386/kernel/Makefile 445 #arch/i386/kernel/Makefile
445 vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv) 446 vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
446 447
447 In the above example, vsyscall-flags will be assigned the option 448 In the above example, vsyscall-flags will be assigned the option
448 -Wl$(comma)--hash-style=sysv if it is supported by $(CC). 449 -Wl$(comma)--hash-style=sysv if it is supported by $(CC).
@@ -570,6 +571,19 @@ more details, with real examples.
570 endif 571 endif
571 endif 572 endif
572 573
574--- 3.12 $(LD) support functions
575
576 ld-option
577 ld-option is used to check if $(LD) supports the supplied option.
578 ld-option takes two options as arguments.
579 The second argument is an optional option that can be used if the
580 first option is not supported by $(LD).
581
582 Example:
583 #Makefile
584 LDFLAGS_vmlinux += $(call really-ld-option, -X)
585
586
573=== 4 Host Program support 587=== 4 Host Program support
574 588
575Kbuild supports building executables on the host for use during the 589Kbuild supports building executables on the host for use during the