Skip to content

Commit

Permalink
Add some compiling optimizations
Browse files Browse the repository at this point in the history
Change-Id: Ie9c39a7e3d5988547ff7b4c81302682b95e0e45d
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
  • Loading branch information
PRJosh committed Apr 4, 2014
1 parent e68f3fd commit 19980a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,20 @@ CHECK = sparse

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
AFLAGS_MODULE =

#
# Kernel optimizations
#
CFLAGS_A9 = -mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -marm -munaligned-access -mfpu=neon -funsafe-math-optimizations
CFLAGS_MODULO = -fmodulo-sched -fsched-spec-load -fmodulo-sched-allow-regmoves -ftree-vectorize -mvectorize-with-neon-quad -funroll-loops -fgcse-lm -fgcse-sm
KERNEL_MODS = $(CFLAGS_A9) $(CFLAGS_MODULO)

MOD_FLAGS = -DMODULE $(KERNEL_MODS)
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
CFLAGS_KERNEL = $(MODFLAGS)
AFLAGS_KERNEL = $(MODFLAGS)
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage


Expand All @@ -369,7 +378,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks \
-mtune=cortex-a9
$(MODFLAGS)
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ comma = ,
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# 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-a9 -mtune=cortex-a9 -march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations -ftree-vectorize, -march=armv7-a -Wa$(comma)-march=armv7-a)
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
# always available in ARMv7
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/vfp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ccflags-y := -DDEBUG
# asflags-y := -DDEBUG

KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp)
KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=neon-vfpv4 -funsafe-math-optimizations -mfloat-abi=soft)
LDFLAGS +=--no-warn-mismatch

obj-y += vfp.o
Expand Down

0 comments on commit 19980a7

Please sign in to comment.