summaryrefslogtreecommitdiffstats
path: root/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch')
-rw-r--r--extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch b/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch
new file mode 100644
index 00000000..a108c6e0
--- /dev/null
+++ b/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch
@@ -0,0 +1,82 @@
1From 192b19046a67263da44203bf50a5b51d0a655fec Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 31 Dec 2010 15:26:37 +0100
4Subject: [PATCH] soc: honour buildsystem CFLAGS and LDFLAGS when set
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 soc/app/Makefile | 13 ++++---------
9 soc/c6accelw/Makefile | 14 ++++----------
10 2 files changed, 8 insertions(+), 19 deletions(-)
11
12diff --git a/soc/app/Makefile b/soc/app/Makefile
13index 2647746..bed937e 100755
14--- a/soc/app/Makefile
15+++ b/soc/app/Makefile
16@@ -53,15 +53,10 @@ CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
17 CONFIG_BLD = ../../config.bld
18
19 ifeq ($(BUILD_TYPE), release)
20-ifeq ($(ARM_ISA),armv7-a)
21- C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp
22-endif
23-ifeq ($(ARM_ISA),armv5t)
24- C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O
25-endif
26+C_FLAGS += $(CFLAGS)
27 else
28 CPP_FLAGS += -DNDEBUG
29- C_FLAGS += -Wall -g
30+ C_FLAGS += $(CFLAGS) -Wall -g
31 endif
32
33
34@@ -72,7 +67,7 @@ ifeq ($(PLATFORM),omapl138)
35 C_FLAGS += -DPLATFORM=138
36 endif
37
38-LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread
39+LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread
40 C6ACCEL_LIB += ../c6accelw/lib/c6accelw_$(PLATFORM).a470MV
41
42 COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) $(CPP_FLAGS) -c
43@@ -102,7 +97,7 @@ $(TARGET): $(OBJFILES) $(C6ACCEL_LIB) $(XDC_LFILE)
44
45 $(OBJFILES): %.o: %.c $(HEADERS) $(XDC_CFLAGS)
46 @echo Compiling $@ from $<..
47- $(COMPILE.c) $(shell cat $(XDC_CFLAGS)) -o $@ $<
48+ $(COMPILE.c) $(shell cat $(XDC_CFLAGS) | sed 's:-march=armv5t::g') -o $@ $<
49
50 $(XDC_LFILE) $(XDC_CFLAGS): $(XDC_CFGFILE)
51 @echo
52diff --git a/soc/c6accelw/Makefile b/soc/c6accelw/Makefile
53index cc58acf..298ab3b 100755
54--- a/soc/c6accelw/Makefile
55+++ b/soc/c6accelw/Makefile
56@@ -21,19 +21,13 @@ BUILD_TYPE=release
57 CPP_FLAGS += -I../packages -I$(XDC_INSTALL_DIR)/packages -I$(CE_INSTALL_DIR)/packages -I$(XDAIS_INSTALL_DIR)/packages -Dxdc_target_name__=arm/GCArmv5T -Dxdc_target_types__=gnu/targets/std.h
58
59 ifeq ($(BUILD_TYPE), release)
60-ifeq ($(ARM_ISA),armv7-a)
61- C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp
62- endif
63-ifeq ($(ARM_ISA),armv5t)
64- C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O
65- endif
66-
67+C_FLAGS += $(CFLAGS)
68 else
69- CPP_FLAGS += -DNDEBUG
70- C_FLAGS += -Wall -g
71+ CPP_FLAGS += -DNDEBUG
72+ C_FLAGS += $(CFLAGS) -Wall -g
73 endif
74
75-LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib
76+LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib
77 AR_FLAGS +=
78
79 COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) -c
80--
811.6.6.1
82