* [PATCH] openmpacc: update to version 01.05.06.00
@ 2019-12-10 22:07 Gaurav Mitra
2019-12-11 22:54 ` Denys Dmytriyenko
0 siblings, 1 reply; 2+ messages in thread
From: Gaurav Mitra @ 2019-12-10 22:07 UTC (permalink / raw)
To: meta-arago
- Changes for openmpacc examples: Removed vecadd_lib, edmabw
- Changes for clacc host_cc and host_link_cc parameters: Determine target
compiler name directly from CMake
- Documentation update regarding no support for variadic functions in
target regions
Signed-off-by: Gaurav Mitra <gaurav@ti.com>
---
.../recipes-ti/openmpacc/clacc_git.bb | 28 ++++++++++++++++++----
.../recipes-ti/openmpacc/openmpacc-examples_git.bb | 8 +------
.../recipes-ti/openmpacc/openmpacc.inc | 4 ++--
.../recipes-ti/openmpacc/openmpacc_git.bb | 4 ----
4 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb b/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
index 75ce4628..f69869d8 100644
--- a/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
+++ b/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
@@ -18,16 +18,34 @@ export X86_HOST_ROOT = "${STAGING_DIR_HOST}"
PARALLEL_MAKE = ""
+# The variables CLACC_CC and CLACC_CXX are used to point clacc to set its
+# host_cc and host_link_cc variables which were previously hardcoded in clacc.h.
+# This adds support for different toolchain configurations to build clacc by
+# passing in the compiler names at the build stage and removes corresponding
+# string replacement requirements in yocto recipes.
+python __anonymous() {
+ if d.getVar("TOOLCHAIN_PREFIX"):
+ cc_name = d.getVar("TOOLCHAIN_PREFIX") + "gcc"
+ cxx_name = d.getVar("TOOLCHAIN_PREFIX") + "g++"
+
+ # Convert to upper case to workaround GCC preprocessor bug where the word
+ # 'linux' is defined to be 1. This results in arm-linux-gnueabihf- being
+ # stringized to arm-1-gnueabihf- by the GCC preprocessor. To workaround this
+ # bug, convert the names to upper case and send through. Clacc will convert
+ # to lower case before usage.
+
+ d.setVar("CLACC_CC_NAME", cc_name.upper())
+ d.setVar("CLACC_CXX_NAME", cxx_name.upper())
+}
+
+
EXTRA_OEMAKE = " -C ${S}/clacc \
${TARGET} \
CXX="${CXX}" \
+ CLACC_CC="${CLACC_CC_NAME}" \
+ CLACC_CXX="${CLACC_CXX_NAME}" \
"
-do_configure() {
- sed "s|arm-linux-gnueabihf-gcc|${TOOLCHAIN_PREFIX}gcc|g" -i clacc/clacc.h
- sed "s|arm-linux-gnueabihf-g++|${TOOLCHAIN_PREFIX}g++|g" -i clacc/clacc.h
-}
-
do_compile() {
oe_runmake
}
diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb b/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
index b2f4122c..39902f8f 100644
--- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
+++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
@@ -21,8 +21,6 @@ OMPACC_EXAMPLE_LIST = " target_update \
local \
null \
dsplib_fft \
- vecadd_lib \
- edmabw \
sub_section \
"
@@ -35,7 +33,6 @@ python do_unpack_append() {
os.makedirs(s)
shutil.copy(os.path.join(git_dir,"Makefile"),s)
shutil.copy(os.path.join(git_dir,"make.inc"),s)
- shutil.copy(os.path.join(git_dir,"ompacc_env.sh"),s)
for example in d.getVar("OMPACC_EXAMPLE_LIST").split():
shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example))
}
@@ -47,11 +44,9 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \
MKFILELIST = "vecadd/Makefile vecadd_complex/Makefile dsplib_fft/Makefile \
null/Makefile dspheap/Makefile target_implicit_map/Makefile printf_debug/Makefile \
edmamgr/Makefile vecadd_t/Makefile target_orphan_call/Makefile target_update/Makefile \
-edmabw/Makefile sub_section/Makefile vecadd_lib/Makefile local/Makefile"
+sub_section/Makefile local/Makefile"
do_configure() {
- sed "s|arm-linux-gnueabihf-gcc|${CC}|g" -i make.inc
- sed "s|arm-linux-gnueabihf-g++|${CXX}|g" -i make.inc
for f in ${MKFILELIST}; do
sed "s|-fopenmp|-fopenmp ${TUNE_CCARGS}${TOOLCHAIN_OPTIONS}|g" -i $f
done
@@ -66,7 +61,6 @@ do_install() {
install -m 644 ${B}/Makefile ${D}${datadir}/ti/examples/openmpacc
install -m 644 ${B}/make.inc ${D}${datadir}/ti/examples/openmpacc
- install -m 644 ${B}/ompacc_env.sh ${D}${datadir}/ti/examples/openmpacc
for ompacc_example in ${OMPACC_EXAMPLE_LIST}; do
install -d ${D}${datadir}/ti/examples/openmpacc/${ompacc_example}
diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc b/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
index ce0236d4..d33a156b 100644
--- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
+++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
@@ -2,7 +2,7 @@ SUMMARY = "TI OpenMP Accelerator Model"
HOMEPAGE = "http://downloads.ti.com/mctools/esd/docs/openmpacc/"
LICENSE = "BSD"
-PV = "1.5.4.0"
+PV = "1.5.6.0"
INC_PR = "r0"
LIC_FILES_CHKSUM = "file://../debian/copyright;md5=aaa2a0939d08197132fc382e97b62eb0"
@@ -13,7 +13,7 @@ OMPACC_GIT_URI = "git://git.ti.com/openmp/ti-openmpacc.git"
OMPACC_GIT_PROTOCOL = "git"
OMPACC_GIT_BRANCH = "master"
-OMPACC_SRCREV = "808cef58b4ed196a9ced2310d419dbaf63dfbeb6"
+OMPACC_SRCREV = "7c4e68a0bf73ec193edff9dfc23ea764ae6ad434"
BRANCH = "${OMPACC_GIT_BRANCH}"
SRC_URI = "${OMPACC_GIT_URI};protocol=${OMPACC_GIT_PROTOCOL};branch=${BRANCH}"
diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb b/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
index a28a9225..44b59a4f 100644
--- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
+++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
@@ -18,7 +18,3 @@ export LINUX_DEVKIT_ROOT = "${STAGING_DIR_HOST}"
EXTRA_OECMAKE += "-DVERSION="${PV}" -DBUILD_OUTPUT=lib"
FILES_${PN} += "/usr/share/ti/openmpacc/*"
-
-do_configure_prepend() {
- sed -i -e 's/-march=armv7-a//' ${S}/libompacc/CMakeLists.txt
-}
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] openmpacc: update to version 01.05.06.00
2019-12-10 22:07 [PATCH] openmpacc: update to version 01.05.06.00 Gaurav Mitra
@ 2019-12-11 22:54 ` Denys Dmytriyenko
0 siblings, 0 replies; 2+ messages in thread
From: Denys Dmytriyenko @ 2019-12-11 22:54 UTC (permalink / raw)
To: Gaurav Mitra; +Cc: meta-arago
Thank you for the patch!
On Tue, Dec 10, 2019 at 04:07:30PM -0600, Gaurav Mitra wrote:
> - Changes for openmpacc examples: Removed vecadd_lib, edmabw
> - Changes for clacc host_cc and host_link_cc parameters: Determine target
> compiler name directly from CMake
> - Documentation update regarding no support for variadic functions in
> target regions
>
> Signed-off-by: Gaurav Mitra <gaurav@ti.com>
> ---
> .../recipes-ti/openmpacc/clacc_git.bb | 28 ++++++++++++++++++----
> .../recipes-ti/openmpacc/openmpacc-examples_git.bb | 8 +------
> .../recipes-ti/openmpacc/openmpacc.inc | 4 ++--
> .../recipes-ti/openmpacc/openmpacc_git.bb | 4 ----
> 4 files changed, 26 insertions(+), 18 deletions(-)
>
> diff --git a/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb b/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
> index 75ce4628..f69869d8 100644
> --- a/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
> +++ b/meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb
> @@ -18,16 +18,34 @@ export X86_HOST_ROOT = "${STAGING_DIR_HOST}"
>
> PARALLEL_MAKE = ""
>
> +# The variables CLACC_CC and CLACC_CXX are used to point clacc to set its
> +# host_cc and host_link_cc variables which were previously hardcoded in clacc.h.
> +# This adds support for different toolchain configurations to build clacc by
> +# passing in the compiler names at the build stage and removes corresponding
> +# string replacement requirements in yocto recipes.
> +python __anonymous() {
> + if d.getVar("TOOLCHAIN_PREFIX"):
> + cc_name = d.getVar("TOOLCHAIN_PREFIX") + "gcc"
> + cxx_name = d.getVar("TOOLCHAIN_PREFIX") + "g++"
What happens when TOOLCHAIN_PREFIX is not defined, CLACC_CC_NAME and
CLACC_CXX_NAME below won't be defined as well.
You might want to add else statement to derive them from TARGET_PREFIX
instead.
> +
> + # Convert to upper case to workaround GCC preprocessor bug where the word
> + # 'linux' is defined to be 1. This results in arm-linux-gnueabihf- being
> + # stringized to arm-1-gnueabihf- by the GCC preprocessor. To workaround this
> + # bug, convert the names to upper case and send through. Clacc will convert
> + # to lower case before usage.
> +
> + d.setVar("CLACC_CC_NAME", cc_name.upper())
> + d.setVar("CLACC_CXX_NAME", cxx_name.upper())
> +}
> +
> +
> EXTRA_OEMAKE = " -C ${S}/clacc \
> ${TARGET} \
> CXX="${CXX}" \
> + CLACC_CC="${CLACC_CC_NAME}" \
> + CLACC_CXX="${CLACC_CXX_NAME}" \
> "
>
> -do_configure() {
> - sed "s|arm-linux-gnueabihf-gcc|${TOOLCHAIN_PREFIX}gcc|g" -i clacc/clacc.h
> - sed "s|arm-linux-gnueabihf-g++|${TOOLCHAIN_PREFIX}g++|g" -i clacc/clacc.h
> -}
> -
> do_compile() {
> oe_runmake
> }
> diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb b/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
> index b2f4122c..39902f8f 100644
> --- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
> +++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb
> @@ -21,8 +21,6 @@ OMPACC_EXAMPLE_LIST = " target_update \
> local \
> null \
> dsplib_fft \
> - vecadd_lib \
> - edmabw \
> sub_section \
> "
>
> @@ -35,7 +33,6 @@ python do_unpack_append() {
> os.makedirs(s)
> shutil.copy(os.path.join(git_dir,"Makefile"),s)
> shutil.copy(os.path.join(git_dir,"make.inc"),s)
> - shutil.copy(os.path.join(git_dir,"ompacc_env.sh"),s)
> for example in d.getVar("OMPACC_EXAMPLE_LIST").split():
> shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example))
> }
> @@ -47,11 +44,9 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \
> MKFILELIST = "vecadd/Makefile vecadd_complex/Makefile dsplib_fft/Makefile \
> null/Makefile dspheap/Makefile target_implicit_map/Makefile printf_debug/Makefile \
> edmamgr/Makefile vecadd_t/Makefile target_orphan_call/Makefile target_update/Makefile \
> -edmabw/Makefile sub_section/Makefile vecadd_lib/Makefile local/Makefile"
> +sub_section/Makefile local/Makefile"
>
> do_configure() {
> - sed "s|arm-linux-gnueabihf-gcc|${CC}|g" -i make.inc
> - sed "s|arm-linux-gnueabihf-g++|${CXX}|g" -i make.inc
> for f in ${MKFILELIST}; do
> sed "s|-fopenmp|-fopenmp ${TUNE_CCARGS}${TOOLCHAIN_OPTIONS}|g" -i $f
> done
> @@ -66,7 +61,6 @@ do_install() {
>
> install -m 644 ${B}/Makefile ${D}${datadir}/ti/examples/openmpacc
> install -m 644 ${B}/make.inc ${D}${datadir}/ti/examples/openmpacc
> - install -m 644 ${B}/ompacc_env.sh ${D}${datadir}/ti/examples/openmpacc
>
> for ompacc_example in ${OMPACC_EXAMPLE_LIST}; do
> install -d ${D}${datadir}/ti/examples/openmpacc/${ompacc_example}
> diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc b/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
> index ce0236d4..d33a156b 100644
> --- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
> +++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc.inc
> @@ -2,7 +2,7 @@ SUMMARY = "TI OpenMP Accelerator Model"
> HOMEPAGE = "http://downloads.ti.com/mctools/esd/docs/openmpacc/"
> LICENSE = "BSD"
>
> -PV = "1.5.4.0"
> +PV = "1.5.6.0"
> INC_PR = "r0"
>
> LIC_FILES_CHKSUM = "file://../debian/copyright;md5=aaa2a0939d08197132fc382e97b62eb0"
> @@ -13,7 +13,7 @@ OMPACC_GIT_URI = "git://git.ti.com/openmp/ti-openmpacc.git"
> OMPACC_GIT_PROTOCOL = "git"
> OMPACC_GIT_BRANCH = "master"
>
> -OMPACC_SRCREV = "808cef58b4ed196a9ced2310d419dbaf63dfbeb6"
> +OMPACC_SRCREV = "7c4e68a0bf73ec193edff9dfc23ea764ae6ad434"
>
> BRANCH = "${OMPACC_GIT_BRANCH}"
> SRC_URI = "${OMPACC_GIT_URI};protocol=${OMPACC_GIT_PROTOCOL};branch=${BRANCH}"
> diff --git a/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb b/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
> index a28a9225..44b59a4f 100644
> --- a/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
> +++ b/meta-arago-extras/recipes-ti/openmpacc/openmpacc_git.bb
> @@ -18,7 +18,3 @@ export LINUX_DEVKIT_ROOT = "${STAGING_DIR_HOST}"
> EXTRA_OECMAKE += "-DVERSION="${PV}" -DBUILD_OUTPUT=lib"
>
> FILES_${PN} += "/usr/share/ti/openmpacc/*"
> -
> -do_configure_prepend() {
> - sed -i -e 's/-march=armv7-a//' ${S}/libompacc/CMakeLists.txt
> -}
> --
> 2.14.1
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-11 22:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-10 22:07 [PATCH] openmpacc: update to version 01.05.06.00 Gaurav Mitra
2019-12-11 22:54 ` Denys Dmytriyenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.