X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=Makefile;h=3e438055a92c503d48858761d56e00bcd9848276;hb=09a02fdb919876c01e8f05960750a418b3f7fa48;hp=860c26af52c31c1d354d979b00f8aad8e97d7c01;hpb=4993e0d211105bc72d4ffc62ba20232d25ad418a;p=net-next-2.6.git diff --git a/Makefile b/Makefile index 860c26af52c..3e438055a92 100644 --- a/Makefile +++ b/Makefile @@ -554,8 +554,15 @@ endif ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else +# Some targets (ARM with Thumb2, for example), can't be built with frame +# pointers. For those, we don't have FUNCTION_TRACER automatically +# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is +# incompatible with -fomit-frame-pointer with current GCC, so we don't use +# -fomit-frame-pointer with FUNCTION_TRACER. +ifndef CONFIG_FUNCTION_TRACER KBUILD_CFLAGS += -fomit-frame-pointer endif +endif ifdef CONFIG_DEBUG_INFO KBUILD_CFLAGS += -g @@ -568,6 +575,12 @@ endif ifdef CONFIG_FUNCTION_TRACER KBUILD_CFLAGS += -pg +ifdef CONFIG_DYNAMIC_FTRACE + ifdef CONFIG_HAVE_C_RECORDMCOUNT + BUILD_C_RECORDMCOUNT := y + export BUILD_C_RECORDMCOUNT + endif +endif endif # We trigger additional mismatches with less inlining @@ -591,6 +604,11 @@ KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) # conserve stack if available KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) +# check for 'asm goto' +ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y) + KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO +endif + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments # But warn user when we do so warn-assign = \