From: Koen Kooi Date: Fri, 31 Dec 2010 14:42:04 +0000 (+0100) Subject: ti-c6accel: add patch to use buildsystem C/LDFLAGS instead of the bogus ones in the... X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=688c4bfa7a8f2115fc38527c207c6889aceb9909;p=openembedded.git ti-c6accel: add patch to use buildsystem C/LDFLAGS instead of the bogus ones in the makefile and XDC compiler.opt Signed-off-by: Koen Kooi --- diff --git a/recipes/ti/ti-c6accel.inc b/recipes/ti/ti-c6accel.inc index 668bf7ba81..da513cf92b 100644 --- a/recipes/ti/ti-c6accel.inc +++ b/recipes/ti/ti-c6accel.inc @@ -50,6 +50,7 @@ TIARGS = ' \ CSTOOL_DIR="${TOOLCHAIN_PATH}" \ CSTOOL_PREFIX="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" \ LINUXLIBS_INSTALL_DIR="${STAGING_DIR}/${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" \ + CFLAGS=" ${TARGET_CC_ARCH} ${CFLAGS}" LDFLAGS="${LDFLAGS}" \ ' do_configure() { diff --git a/recipes/ti/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch b/recipes/ti/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch new file mode 100644 index 0000000000..a108c6e034 --- /dev/null +++ b/recipes/ti/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch @@ -0,0 +1,82 @@ +From 192b19046a67263da44203bf50a5b51d0a655fec Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Fri, 31 Dec 2010 15:26:37 +0100 +Subject: [PATCH] soc: honour buildsystem CFLAGS and LDFLAGS when set + +Signed-off-by: Koen Kooi +--- + soc/app/Makefile | 13 ++++--------- + soc/c6accelw/Makefile | 14 ++++---------- + 2 files changed, 8 insertions(+), 19 deletions(-) + +diff --git a/soc/app/Makefile b/soc/app/Makefile +index 2647746..bed937e 100755 +--- a/soc/app/Makefile ++++ b/soc/app/Makefile +@@ -53,15 +53,10 @@ CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro + CONFIG_BLD = ../../config.bld + + ifeq ($(BUILD_TYPE), release) +-ifeq ($(ARM_ISA),armv7-a) +- C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp +-endif +-ifeq ($(ARM_ISA),armv5t) +- C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O +-endif ++C_FLAGS += $(CFLAGS) + else + CPP_FLAGS += -DNDEBUG +- C_FLAGS += -Wall -g ++ C_FLAGS += $(CFLAGS) -Wall -g + endif + + +@@ -72,7 +67,7 @@ ifeq ($(PLATFORM),omapl138) + C_FLAGS += -DPLATFORM=138 + endif + +-LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread ++LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread + C6ACCEL_LIB += ../c6accelw/lib/c6accelw_$(PLATFORM).a470MV + + COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) $(CPP_FLAGS) -c +@@ -102,7 +97,7 @@ $(TARGET): $(OBJFILES) $(C6ACCEL_LIB) $(XDC_LFILE) + + $(OBJFILES): %.o: %.c $(HEADERS) $(XDC_CFLAGS) + @echo Compiling $@ from $<.. +- $(COMPILE.c) $(shell cat $(XDC_CFLAGS)) -o $@ $< ++ $(COMPILE.c) $(shell cat $(XDC_CFLAGS) | sed 's:-march=armv5t::g') -o $@ $< + + $(XDC_LFILE) $(XDC_CFLAGS): $(XDC_CFGFILE) + @echo +diff --git a/soc/c6accelw/Makefile b/soc/c6accelw/Makefile +index cc58acf..298ab3b 100755 +--- a/soc/c6accelw/Makefile ++++ b/soc/c6accelw/Makefile +@@ -21,19 +21,13 @@ BUILD_TYPE=release + 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 + + ifeq ($(BUILD_TYPE), release) +-ifeq ($(ARM_ISA),armv7-a) +- C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp +- endif +-ifeq ($(ARM_ISA),armv5t) +- C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O +- endif +- ++C_FLAGS += $(CFLAGS) + else +- CPP_FLAGS += -DNDEBUG +- C_FLAGS += -Wall -g ++ CPP_FLAGS += -DNDEBUG ++ C_FLAGS += $(CFLAGS) -Wall -g + endif + +-LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib ++LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib + AR_FLAGS += + + COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) -c +-- +1.6.6.1 + diff --git a/recipes/ti/ti-c6accel_1.01.00.03.bb b/recipes/ti/ti-c6accel_1.01.00.03.bb index 8b2bf4ad6f..bf5f1cf35b 100644 --- a/recipes/ti/ti-c6accel_1.01.00.03.bb +++ b/recipes/ti/ti-c6accel_1.01.00.03.bb @@ -3,7 +3,12 @@ require ti-c6accel.inc SRC_URI[c6accelbin.md5sum] = "0ddf37fd9dad91fa3a914e549da933b9" SRC_URI[c6accelbin.sha256sum] = "453399a84bf117bd7a91393242c7c005e2829692db5ede18e4be166c61e4354c" -SRC_URI_append = "file://fix-loadmodule.patch" +SRC_URI_append = "file://fix-loadmodule.patch \ + file://0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch \ + " PV = "1_01_00_03" + +CFLAGS += "-fPIC" +