diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 0 insertions, 32 deletions
@@ -258,38 +258,6 @@ endif | |||
258 | 258 | ||
259 | export quiet Q KBUILD_VERBOSE | 259 | export quiet Q KBUILD_VERBOSE |
260 | 260 | ||
261 | ###### | ||
262 | # cc support functions to be used (only) in arch/$(ARCH)/Makefile | ||
263 | # See documentation in Documentation/kbuild/makefiles.txt | ||
264 | |||
265 | # as-option | ||
266 | # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,) | ||
267 | |||
268 | as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \ | ||
269 | -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ | ||
270 | else echo "$(2)"; fi ;) | ||
271 | |||
272 | # cc-option | ||
273 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) | ||
274 | |||
275 | cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | ||
276 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) | ||
277 | |||
278 | # cc-option-yn | ||
279 | # Usage: flag := $(call cc-option-yn, -march=winchip-c6) | ||
280 | cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | ||
281 | > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) | ||
282 | |||
283 | # cc-option-align | ||
284 | # Prefix align with either -falign or -malign | ||
285 | cc-option-align = $(subst -functions=0,,\ | ||
286 | $(call cc-option,-falign-functions=0,-malign-functions=0)) | ||
287 | |||
288 | # cc-version | ||
289 | # Usage gcc-ver := $(call cc-version $(CC)) | ||
290 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ | ||
291 | $(if $(1), $(1), $(CC))) | ||
292 | |||
293 | 261 | ||
294 | # Look for make include files relative to root of kernel src | 262 | # Look for make include files relative to root of kernel src |
295 | MAKEFLAGS += --include-dir=$(srctree) | 263 | MAKEFLAGS += --include-dir=$(srctree) |