From: Ronan Le Martret Date: Wed, 24 Jul 2013 16:03:36 +0000 (+0200) Subject: - update build tools. X-Git-Tag: rev_0.4~264 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=501fa01be5a8c6356b56fff9dbddaa0cfec1ae5f;p=scm%2Fbb%2Ftizen.git - update build tools. --- diff --git a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass index 7bbdfdd..faee2ab 100644 --- a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass +++ b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass @@ -16,7 +16,8 @@ do_patch () { export S=${S} export WORKDIR=${WORKDIR} export PACKAGING=${PACKAGING} -export HOST_SYS=${HOST_SYS} +export HOST_SYS=${HOST_SYS} +export STAGING_DIR_HOST=${STAGING_DIR_HOST} EOC SPECPATH=$(spec2yocto findBestSpecFile ${PACKAGING}/packaging/ --package_pn=${BPN}) spec2yocto prep ${SPECPATH} --package_pn=${PN} >> ${WORKDIR}/temp/Bash_patch diff --git a/meta-tizen-ivi/classes/tizen_cmake.bbclass b/meta-tizen-ivi/classes/tizen_cmake.bbclass new file mode 100644 index 0000000..9b9537b --- /dev/null +++ b/meta-tizen-ivi/classes/tizen_cmake.bbclass @@ -0,0 +1,76 @@ +DEPENDS_prepend = "cmake-native " + +# We need to unset CCACHE otherwise cmake gets too confused +CCACHE = "" + +# We want the staging and installing functions from autotools +inherit autotools + +# Use in-tree builds by default but allow this to be changed +# since some packages do not support them (e.g. llvm 2.5). +OECMAKE_SOURCEPATH ?= "." + +# If declaring this, make sure you also set EXTRA_OEMAKE to +# "-C ${OECMAKE_BUILDPATH}". So it will run the right makefiles. +OECMAKE_BUILDPATH ?= "" +B="${S}" + +# C/C++ Compiler (without cpu arch/tune arguments) +OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`" +OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`" + +# Compiler flags +OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}" +OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive" +OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CFLAGS} -DNDEBUG" +OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG" +OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}" +OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}" + +OECMAKE_RPATH ?= "" +OECMAKE_PERLNATIVE_DIR ??= "" +OECMAKE_EXTRA_ROOT_PATH ?= "" + +tizen_cmake_do_generate_toolchain_file() { + cat > ${WORKDIR}/toolchain.cmake <