Skip to content

Commit

Permalink
Add Tweaks and flags for GRAPHITE
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Sayago <admin@lonasdigital.com>
  • Loading branch information
javilonas committed May 22, 2015
1 parent 5c321aa commit 9fa8f52
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
24 changes: 15 additions & 9 deletions Makefile
Expand Up @@ -240,9 +240,12 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)

GRAPHITE_FLAGS = -fgraphite -floop-flatten -floop-parallelize-all \
-ftree-loop-linear -floop-interchange -floop-strip-mine -floop-block

HOSTCC = gcc
HOSTCXX = g++
HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer $(GRAPHITE_FLAGS)
HOSTCXXFLAGS = -O2

# Decide whether to build built-in, modular, or both.
Expand Down Expand Up @@ -328,7 +331,7 @@ include $(srctree)/scripts/Kbuild.include
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
REAL_CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
CPP = $(CC) -E $(GRAPHITE_FLAGS)
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
Expand All @@ -348,18 +351,19 @@ endif

# Use the wrapper for the compiler. This wrapper scans for new
# warnings and causes the build to stop upon encountering them.
CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC) $(GRAPHITE_FLAGS)

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
AFLAGS_MODULE =
KERNELFLAGS = -Ofast -DNDEBUG -mtune=cortex-a15 -mcpu=cortex-a15 -marm -mfpu=neon-vfpv4
MODFLAGS = -DMODULE $(GRAPHITE_FLAGS)
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
CFLAGS_KERNEL = $(GRAPHITE_FLAGS)
AFLAGS_KERNEL = $(GRAPHITE_FLAGS)
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage


# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
-I$(srctree)/arch/$(hdr-arch)/include/uapi \
Expand All @@ -383,7 +387,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks
-fno-delete-null-pointer-checks \
$(GRAPHITE_FLAGS) $(KERNELFLAGS)

KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/compressed/Makefile
Expand Up @@ -125,7 +125,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
endif

ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
asflags-y := -DZIMAGE
asflags-y := -DZIMAGE -Wa,-march=armv7-a

# Supply kernel BSS size to the decompressor via a linker symbol.
KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \
Expand Down
1 change: 1 addition & 0 deletions lib/Makefile
Expand Up @@ -21,6 +21,7 @@ lib-$(CONFIG_SMP) += cpumask.o

lib-y += kobject.o klist.o

CFLAGS_bitmap.o += -Os
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o \
Expand Down

0 comments on commit 9fa8f52

Please sign in to comment.