mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Adjust Makefiles
This commit is contained in:
parent
58d618c7b5
commit
8070e395ae
8 changed files with 21 additions and 31 deletions
16
Makefile
16
Makefile
|
@ -354,7 +354,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||||
CFLAGS_MODULE =
|
CFLAGS_MODULE =
|
||||||
AFLAGS_MODULE =
|
AFLAGS_MODULE =
|
||||||
LDFLAGS_MODULE =
|
LDFLAGS_MODULE =
|
||||||
CFLAGS_KERNEL =
|
CFLAGS_KERNEL = -mtune=cortex-a15 -mfpu=neon-vfpv4
|
||||||
AFLAGS_KERNEL =
|
AFLAGS_KERNEL =
|
||||||
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
|
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
|
||||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
||||||
else
|
else
|
||||||
KBUILD_CFLAGS += -O2
|
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||||
|
@ -585,18 +585,18 @@ endif
|
||||||
# Use make W=1 to enable this warning (see scripts/Makefile.build)
|
# Use make W=1 to enable this warning (see scripts/Makefile.build)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
|
||||||
|
|
||||||
ifdef CONFIG_FRAME_POINTER
|
#ifdef CONFIG_FRAME_POINTER
|
||||||
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
#KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
||||||
else
|
#else
|
||||||
# Some targets (ARM with Thumb2, for example), can't be built with frame
|
# Some targets (ARM with Thumb2, for example), can't be built with frame
|
||||||
# pointers. For those, we don't have FUNCTION_TRACER automatically
|
# pointers. For those, we don't have FUNCTION_TRACER automatically
|
||||||
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
|
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
|
||||||
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
|
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
|
||||||
# -fomit-frame-pointer with FUNCTION_TRACER.
|
# -fomit-frame-pointer with FUNCTION_TRACER.
|
||||||
ifndef CONFIG_FUNCTION_TRACER
|
#ifndef CONFIG_FUNCTION_TRACER
|
||||||
KBUILD_CFLAGS += -fomit-frame-pointer
|
KBUILD_CFLAGS += -fomit-frame-pointer
|
||||||
endif
|
#endif
|
||||||
endif
|
#endif
|
||||||
|
|
||||||
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,14 @@ config ARM
|
||||||
select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
|
select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
|
||||||
select HAVE_OPROFILE if (HAVE_PERF_EVENTS)
|
select HAVE_OPROFILE if (HAVE_PERF_EVENTS)
|
||||||
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
|
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
|
||||||
select HAVE_ARCH_KGDB
|
#select HAVE_ARCH_KGDB
|
||||||
select HAVE_KPROBES if !XIP_KERNEL
|
select HAVE_KPROBES if !XIP_KERNEL
|
||||||
select HAVE_KRETPROBES if (HAVE_KPROBES)
|
select HAVE_KRETPROBES if (HAVE_KPROBES)
|
||||||
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
|
#select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
|
||||||
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
||||||
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
|
#select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
|
||||||
select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
|
#select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
|
||||||
select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
|
#select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
|
||||||
select ARCH_BINFMT_ELF_RANDOMIZE_PIE
|
select ARCH_BINFMT_ELF_RANDOMIZE_PIE
|
||||||
select HAVE_GENERIC_DMA_COHERENT
|
select HAVE_GENERIC_DMA_COHERENT
|
||||||
select HAVE_KERNEL_GZIP
|
select HAVE_KERNEL_GZIP
|
||||||
|
|
|
@ -44,7 +44,7 @@ config ARM_UNWIND
|
||||||
config OLD_MCOUNT
|
config OLD_MCOUNT
|
||||||
bool
|
bool
|
||||||
depends on FUNCTION_TRACER && FRAME_POINTER
|
depends on FUNCTION_TRACER && FRAME_POINTER
|
||||||
default y
|
default n
|
||||||
|
|
||||||
config DEBUG_USER
|
config DEBUG_USER
|
||||||
bool "Verbose user fault messages"
|
bool "Verbose user fault messages"
|
||||||
|
|
|
@ -17,7 +17,7 @@ endif
|
||||||
|
|
||||||
OBJCOPYFLAGS :=-O binary -R .comment -S
|
OBJCOPYFLAGS :=-O binary -R .comment -S
|
||||||
GZFLAGS :=-9
|
GZFLAGS :=-9
|
||||||
#KBUILD_CFLAGS +=-pipe
|
KBUILD_CFLAGS +=-pipe
|
||||||
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
||||||
KBUILD_CFLAGS +=$(call cc-option,-marm,)
|
KBUILD_CFLAGS +=$(call cc-option,-marm,)
|
||||||
|
|
||||||
|
@ -33,10 +33,6 @@ ifeq ($(CONFIG_MMU),)
|
||||||
MMUEXT := -nommu
|
MMUEXT := -nommu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FRAME_POINTER),y)
|
|
||||||
KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_CC_STACKPROTECTOR),y)
|
ifeq ($(CONFIG_CC_STACKPROTECTOR),y)
|
||||||
KBUILD_CFLAGS +=-fstack-protector
|
KBUILD_CFLAGS +=-fstack-protector
|
||||||
endif
|
endif
|
||||||
|
@ -65,7 +61,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
|
||||||
# Note that GCC does not numerically define an architecture version
|
# Note that GCC does not numerically define an architecture version
|
||||||
# macro, but instead defines a whole series of macros which makes
|
# macro, but instead defines a whole series of macros which makes
|
||||||
# testing for a specific architecture or later rather impossible.
|
# testing for a specific architecture or later rather impossible.
|
||||||
arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
|
arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-mcpu=cortex-a15,-march=armv7-a)
|
||||||
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
|
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
|
||||||
# Only override the compiler option if ARMv6. The ARMv6K extensions are
|
# Only override the compiler option if ARMv6. The ARMv6K extensions are
|
||||||
# always available in ARMv7
|
# always available in ARMv7
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# ccflags-y := -DDEBUG
|
# ccflags-y := -DDEBUG
|
||||||
# asflags-y := -DDEBUG
|
# asflags-y := -DDEBUG
|
||||||
|
|
||||||
KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft)
|
KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=neon-vfpv4 -mfloat-abi=hard)
|
||||||
LDFLAGS +=--no-warn-mismatch
|
LDFLAGS +=--no-warn-mismatch
|
||||||
|
|
||||||
obj-y += vfp.o
|
obj-y += vfp.o
|
||||||
|
|
|
@ -62,6 +62,7 @@ config PERSISTENT_TRACER
|
||||||
depends on HAVE_FUNCTION_TRACER
|
depends on HAVE_FUNCTION_TRACER
|
||||||
select FUNCTION_TRACER
|
select FUNCTION_TRACER
|
||||||
select ANDROID_PERSISTENT_RAM
|
select ANDROID_PERSISTENT_RAM
|
||||||
|
default n
|
||||||
help
|
help
|
||||||
persistent_trace traces function calls into a persistent ram
|
persistent_trace traces function calls into a persistent ram
|
||||||
buffer that can be decoded and dumped after reboot through
|
buffer that can be decoded and dumped after reboot through
|
||||||
|
|
|
@ -2,15 +2,6 @@ ifdef CONFIG_FUNCTION_TRACER
|
||||||
CFLAGS_REMOVE_clock.o = -pg
|
CFLAGS_REMOVE_clock.o = -pg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
|
|
||||||
# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
|
|
||||||
# needed for x86 only. Why this used to be enabled for all architectures is beyond
|
|
||||||
# me. I suspect most platforms don't need this, but until we know that for sure
|
|
||||||
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
|
|
||||||
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
|
|
||||||
CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
|
|
||||||
endif
|
|
||||||
|
|
||||||
obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o sched_avg.o
|
obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o sched_avg.o
|
||||||
obj-$(CONFIG_SMP) += cpupri.o
|
obj-$(CONFIG_SMP) += cpupri.o
|
||||||
obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
|
obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
|
||||||
|
|
|
@ -148,6 +148,7 @@ config FUNCTION_TRACER
|
||||||
select KALLSYMS
|
select KALLSYMS
|
||||||
select GENERIC_TRACER
|
select GENERIC_TRACER
|
||||||
select CONTEXT_SWITCH_TRACER
|
select CONTEXT_SWITCH_TRACER
|
||||||
|
default n
|
||||||
help
|
help
|
||||||
Enable the kernel to trace every kernel function. This is done
|
Enable the kernel to trace every kernel function. This is done
|
||||||
by using a compiler feature to insert a small, 5-byte No-Operation
|
by using a compiler feature to insert a small, 5-byte No-Operation
|
||||||
|
@ -328,6 +329,7 @@ config STACK_TRACER
|
||||||
select FUNCTION_TRACER
|
select FUNCTION_TRACER
|
||||||
select STACKTRACE
|
select STACKTRACE
|
||||||
select KALLSYMS
|
select KALLSYMS
|
||||||
|
default n
|
||||||
help
|
help
|
||||||
This special tracer records the maximum stack footprint of the
|
This special tracer records the maximum stack footprint of the
|
||||||
kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
|
kernel and displays it in /sys/kernel/debug/tracing/stack_trace.
|
||||||
|
@ -392,7 +394,7 @@ config DYNAMIC_FTRACE
|
||||||
bool "enable/disable function tracing dynamically"
|
bool "enable/disable function tracing dynamically"
|
||||||
depends on FUNCTION_TRACER
|
depends on FUNCTION_TRACER
|
||||||
depends on HAVE_DYNAMIC_FTRACE
|
depends on HAVE_DYNAMIC_FTRACE
|
||||||
default y
|
default n
|
||||||
help
|
help
|
||||||
This option will modify all the calls to function tracing
|
This option will modify all the calls to function tracing
|
||||||
dynamically (will patch them out of the binary image and
|
dynamically (will patch them out of the binary image and
|
||||||
|
|
Loading…
Reference in a new issue