diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -320,7 +320,7 @@ LINUXINCLUDE := -Iinclude \ | |||
320 | 320 | ||
321 | CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | 321 | CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) |
322 | 322 | ||
323 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 323 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
324 | -fno-strict-aliasing -fno-common \ | 324 | -fno-strict-aliasing -fno-common \ |
325 | -Werror-implicit-function-declaration | 325 | -Werror-implicit-function-declaration |
326 | AFLAGS := -D__ASSEMBLY__ | 326 | AFLAGS := -D__ASSEMBLY__ |
@@ -335,7 +335,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE | |||
335 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 335 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
336 | 336 | ||
337 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 337 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
338 | export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE | 338 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE |
339 | export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 339 | export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
340 | 340 | ||
341 | # When compiling out-of-tree modules, put MODVERDIR in the module | 341 | # When compiling out-of-tree modules, put MODVERDIR in the module |
@@ -492,36 +492,36 @@ endif # $(dot-config) | |||
492 | all: vmlinux | 492 | all: vmlinux |
493 | 493 | ||
494 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | 494 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE |
495 | CFLAGS += -Os | 495 | KBUILD_CFLAGS += -Os |
496 | else | 496 | else |
497 | CFLAGS += -O2 | 497 | KBUILD_CFLAGS += -O2 |
498 | endif | 498 | endif |
499 | 499 | ||
500 | include $(srctree)/arch/$(ARCH)/Makefile | 500 | include $(srctree)/arch/$(ARCH)/Makefile |
501 | 501 | ||
502 | ifdef CONFIG_FRAME_POINTER | 502 | ifdef CONFIG_FRAME_POINTER |
503 | CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 503 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls |
504 | else | 504 | else |
505 | CFLAGS += -fomit-frame-pointer | 505 | KBUILD_CFLAGS += -fomit-frame-pointer |
506 | endif | 506 | endif |
507 | 507 | ||
508 | ifdef CONFIG_DEBUG_INFO | 508 | ifdef CONFIG_DEBUG_INFO |
509 | CFLAGS += -g | 509 | KBUILD_CFLAGS += -g |
510 | AFLAGS += -gdwarf-2 | 510 | AFLAGS += -gdwarf-2 |
511 | endif | 511 | endif |
512 | 512 | ||
513 | # Force gcc to behave correct even for buggy distributions | 513 | # Force gcc to behave correct even for buggy distributions |
514 | CFLAGS += $(call cc-option, -fno-stack-protector) | 514 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
515 | 515 | ||
516 | # arch Makefile may override CC so keep this after arch Makefile is included | 516 | # arch Makefile may override CC so keep this after arch Makefile is included |
517 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 517 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |
518 | CHECKFLAGS += $(NOSTDINC_FLAGS) | 518 | CHECKFLAGS += $(NOSTDINC_FLAGS) |
519 | 519 | ||
520 | # warn about C99 declaration after statement | 520 | # warn about C99 declaration after statement |
521 | CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) | 521 | KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
522 | 522 | ||
523 | # disable pointer signed / unsigned warnings in gcc 4.0 | 523 | # disable pointer signed / unsigned warnings in gcc 4.0 |
524 | CFLAGS += $(call cc-option,-Wno-pointer-sign,) | 524 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) |
525 | 525 | ||
526 | # Use --build-id when available. | 526 | # Use --build-id when available. |
527 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | 527 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ |