aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:37:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:37:02 -0400
commitc37efa932598de5e30330a1414e34d9e082e0d9e (patch)
tree1e3b782d257fa39a54f583af3dc7c32d7cffc67d /scripts/Kbuild.include
parent9e12a7e7d89ad813d01092890010cf67d0f914bd (diff)
parentabe1ee3a221d53778c3e58747bbec6e518e5471b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits) Use macros for .data.page_aligned section. Use macros for .bss.page_aligned section. Use new __init_task_data macro in arch init_task.c files. kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 kbuild: add static to prototypes kbuild: fail build if recordmcount.pl fails kbuild: set -fconserve-stack option for gcc 4.5 kbuild: echo the record_mcount command gconfig: disable "typeahead find" search in treeviews kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling checkincludes.pl: add option to remove duplicates in place markup_oops: use modinfo to avoid confusion with underscored module names checkincludes.pl: provide usage helper checkincludes.pl: close file as soon as we're done with it ctags: usability fix kernel hacking: move STRIP_ASM_SYMS from General gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma kbuild: Check if linker supports the -X option kbuild: introduce ld-option ... Fix trivial conflict in scripts/basic/fixdep.c
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include16
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c29be8f90248..4f9c1908593b 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
83# is automatically cleaned up. 83# is automatically cleaned up.
84try-run = $(shell set -e; \ 84try-run = $(shell set -e; \
85 TMP="$(TMPOUT).$$$$.tmp"; \ 85 TMP="$(TMPOUT).$$$$.tmp"; \
86 TMPO="$(TMPOUT).$$$$.o"; \
86 if ($(1)) >/dev/null 2>&1; \ 87 if ($(1)) >/dev/null 2>&1; \
87 then echo "$(2)"; \ 88 then echo "$(2)"; \
88 else echo "$(3)"; \ 89 else echo "$(3)"; \
89 fi; \ 90 fi; \
90 rm -f "$$TMP") 91 rm -f "$$TMP" "$$TMPO")
91 92
92# as-option 93# as-option
93# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) 94# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
@@ -105,12 +106,12 @@ as-instr = $(call try-run,\
105# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 106# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
106 107
107cc-option = $(call try-run,\ 108cc-option = $(call try-run,\
108 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 109 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
109 110
110# cc-option-yn 111# cc-option-yn
111# Usage: flag := $(call cc-option-yn,-march=winchip-c6) 112# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
112cc-option-yn = $(call try-run,\ 113cc-option-yn = $(call try-run,\
113 $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 114 $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
114 115
115# cc-option-align 116# cc-option-align
116# Prefix align with either -falign or -malign 117# Prefix align with either -falign or -malign
@@ -130,10 +131,15 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
130# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 131# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
131cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) 132cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
132 133
134# cc-ldoption
135# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
136cc-ldoption = $(call try-run,\
137 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
138
133# ld-option 139# ld-option
134# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) 140# Usage: LDFLAGS += $(call ld-option, -X)
135ld-option = $(call try-run,\ 141ld-option = $(call try-run,\
136 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 142 $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
137 143
138###### 144######
139 145