aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 4e474fa40737..3bc86c698a4e 100644
--- a/Makefile
+++ b/Makefile
@@ -320,7 +320,7 @@ LINUXINCLUDE := -Iinclude \
320 320
321CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 321CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
322 322
323CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 323KBUILD_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
326AFLAGS := -D__ASSEMBLY__ 326AFLAGS := -D__ASSEMBLY__
@@ -335,7 +335,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
335export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 335export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
336 336
337export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 337export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
338export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 338export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
339export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 339export 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)
492all: vmlinux 492all: vmlinux
493 493
494ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 494ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
495CFLAGS += -Os 495KBUILD_CFLAGS += -Os
496else 496else
497CFLAGS += -O2 497KBUILD_CFLAGS += -O2
498endif 498endif
499 499
500include $(srctree)/arch/$(ARCH)/Makefile 500include $(srctree)/arch/$(ARCH)/Makefile
501 501
502ifdef CONFIG_FRAME_POINTER 502ifdef CONFIG_FRAME_POINTER
503CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 503KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
504else 504else
505CFLAGS += -fomit-frame-pointer 505KBUILD_CFLAGS += -fomit-frame-pointer
506endif 506endif
507 507
508ifdef CONFIG_DEBUG_INFO 508ifdef CONFIG_DEBUG_INFO
509CFLAGS += -g 509KBUILD_CFLAGS += -g
510AFLAGS += -gdwarf-2 510AFLAGS += -gdwarf-2
511endif 511endif
512 512
513# Force gcc to behave correct even for buggy distributions 513# Force gcc to behave correct even for buggy distributions
514CFLAGS += $(call cc-option, -fno-stack-protector) 514KBUILD_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
517NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 517NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
518CHECKFLAGS += $(NOSTDINC_FLAGS) 518CHECKFLAGS += $(NOSTDINC_FLAGS)
519 519
520# warn about C99 declaration after statement 520# warn about C99 declaration after statement
521CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) 521KBUILD_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
524CFLAGS += $(call cc-option,-Wno-pointer-sign,) 524KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
525 525
526# Use --build-id when available. 526# Use --build-id when available.
527LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 527LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\