summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-01-26 19:22:45 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-01-26 19:22:45 +0100
commit7d16f67d3302510c7ad72fbe356d3b56bb9bd68a (patch)
treebaf69fca37871a7d3faee83218d6ee112928e730
parent5e330c73803b80bb951b7c114b0dff512cb04d15 (diff)
downloadembtoolkit-embtoolkit-1.1.0.tar.gz
embtoolkit-embtoolkit-1.1.0.tar.bz2
embtoolkit-embtoolkit-1.1.0.tar.xz
Packages: mtd-utils: fix build error with clangembtoolkit-1.1.0
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--mk/mtd-utils.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/mtd-utils.mk b/mk/mtd-utils.mk
index d15d8b6..34d9614 100644
--- a/mk/mtd-utils.mk
+++ b/mk/mtd-utils.mk
@@ -46,12 +46,21 @@ MTDUTILS_SBINS := bin2nand flash_eraseall flash_unlock mkfs.jffs2 nand2bin \
nftldump recv_image ubiattach ubigen ubirename
MTDUTILS_DEPS := zlib_install lzo_install e2fsprogs_install
+
+
+__embtk_mtdutils_cflags := $(TARGET_CFLAGS)
+
+# FIXME: remove this after upgrade to new version of mtd-utils
+__embtk_mtdutils_cflags += -std=gnu90
+
MTDUTILS_MAKE_ENV := LDFLAGS="-L$(embtk_sysroot)/lib -L$(embtk_sysroot)/usr/lib"
MTDUTILS_MAKE_ENV += CPPFLAGS="-I. -I./include -I$(embtk_sysroot)/usr/include"
-MTDUTILS_MAKE_ENV += CFLAGS="$(TARGET_CFLAGS)"
+MTDUTILS_MAKE_ENV += CFLAGS="$(__embtk_mtdutils_cflags)"
MTDUTILS_MAKE_ENV += BUILDDIR=$(MTDUTILS_BUILD_DIR)
MTDUTILS_MAKE_ENV += DESTDIR=$(embtk_sysroot)
-MTDUTILS_MAKE_ENV += PATH=$(PATH):$(embtk_tools)/bin CROSS=$(CROSS_COMPILE)
+MTDUTILS_MAKE_ENV += PATH=$(PATH):$(embtk_tools)/bin
+MTDUTILS_MAKE_ENV += CROSS=$(CROSS_COMPILE)
+MTDUTILS_MAKE_OPTS := CC=$(TARGETCC_CACHED)
define __embtk_install_mtdutils
$(call embtk_makeinstall_pkg,mtdutils)