opencl, openmp: don't hardcode specific toolchain, pass the one being used for the build
RFC PATCH 1/1 opencl, openmp: don't hardcode specific toolchain, pass the one being used for the build
From: Denys Dmytriyenko <[email protected]>
--- meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb | 10 +++++++--- meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb | 9 +++++++-- .../recipes-ti/openmpacc/openmpacc-examples_git.bb | 17 +++++++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-)
meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb +7 -3
@@ -1,10 +1,10 @@ -DESCRIPTION = "TI OpenCL example applications" +SUMMARY = "TI OpenCL example applications" HOMEPAGE = "http://software-dl.ti.com/mctools/docs/opencl/intro.html" LICENSE = "BSD" include ocl.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" COMPATIBLE_MACHINE = "dra7xx|keystone" PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -55,8 +55,12 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +do_configure() { + sed "s|arm-linux-gnueabihf-g++|${CXX}|g" -i make.inc +} + do_compile() { - oe_runmake + oe_runmake CC="${CC}" CPP="${CPP}" CXX="${CXX}" } do_install() {
meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb +7 -2
@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc C compiler" +SUMMARY = "TI OpenMP-Acc C compiler" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "boost elfutils" RDEPENDS_${PN} += "clocl"
@@ -23,6 +23,11 @@ EXTRA_OEMAKE = " -C ${S}/clacc \ CXX="${CXX}" \ " +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 }
meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb +15 -2
@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc example applications" +SUMMARY = "TI OpenMP-Acc example applications" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "openmpacc clacc-native clocl-native ti-cgt6x-native" RDEPENDS_${PN} += "opencl-runtime"
@@ -44,6 +44,19 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +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" + +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 +} + do_compile() { oe_runmake }
Signature · 1 line
2.7.4
Is this something we should propose to fix in the sources?
- Jake
Quoted 102 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb | 10 +++++++--- meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb | 9 +++++++-- .../recipes-ti/openmpacc/openmpacc-examples_git.bb | 17 +++++++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-)meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb +7
-3@@ -1,10 +1,10 @@ -DESCRIPTION = "TI OpenCL example applications" +SUMMARY = "TI OpenCL example applications" HOMEPAGE = "http://software-dl.ti.com/mctools/docs/opencl/intro.html" LICENSE = "BSD" include ocl.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" COMPATIBLE_MACHINE = "dra7xx|keystone" PACKAGE_ARCH = "${MACHINE_ARCH}"@@ -55,8 +55,12 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +do_configure() { + sed "s|arm-linux-gnueabihf-g++|${CXX}|g" -i make.inc +} + do_compile() { - oe_runmake + oe_runmake CC="${CC}" CPP="${CPP}" CXX="${CXX}" } do_install() {meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb +7
-2@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc C compiler" +SUMMARY = "TI OpenMP-Acc C compiler" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "boost elfutils" RDEPENDS_${PN} += "clocl"@@ -23,6 +23,11 @@ EXTRA_OEMAKE = " -C ${S}/clacc \ CXX="${CXX}" \ " +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 }meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb +15
-2@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc example applications" +SUMMARY = "TI OpenMP-Acc example applications" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "openmpacc clacc-native clocl-native ti-cgt6x-native" RDEPENDS_${PN} += "opencl-runtime"@@ -44,6 +44,19 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +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" + +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 +} + do_compile() { oe_runmake }
Yes, that was my intention with this RFC. I'll start a separate discussion with mctools guys to get it fixed in their code, eventually. Meanwhile, we might need these changes to get us going...
Signature · 1 line
Denys
Quoted 100 lines · Jacob Stiffler
Is this something we should propose to fix in the sources?
- Jake
Quoted 79 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb | 10 +++++++--- meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb | 9 +++++++-- .../recipes-ti/openmpacc/openmpacc-examples_git.bb | 17 +++++++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-)meta-arago-extras/recipes-ti/ocl/opencl-examples_git.bb +7
-3@@ -1,10 +1,10 @@ -DESCRIPTION = "TI OpenCL example applications" +SUMMARY = "TI OpenCL example applications" HOMEPAGE = "http://software-dl.ti.com/mctools/docs/opencl/intro.html" LICENSE = "BSD" include ocl.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" COMPATIBLE_MACHINE = "dra7xx|keystone" PACKAGE_ARCH = "${MACHINE_ARCH}"@@ -55,8 +55,12 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +do_configure() { + sed "s|arm-linux-gnueabihf-g++|${CXX}|g" -i make.inc +} + do_compile() { - oe_runmake + oe_runmake CC="${CC}" CPP="${CPP}" CXX="${CXX}" } do_install() {meta-arago-extras/recipes-ti/openmpacc/clacc_git.bb +7
-2@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc C compiler" +SUMMARY = "TI OpenMP-Acc C compiler" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "boost elfutils" RDEPENDS_${PN} += "clocl"@@ -23,6 +23,11 @@ EXTRA_OEMAKE = " -C ${S}/clacc \ CXX="${CXX}" \ " +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 }meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb +8
-2@@ -1,8 +1,8 @@ -DESCRIPTION = "TI OpenMP-Acc example applications" +SUMMARY = "TI OpenMP-Acc example applications" include openmpacc.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEPENDS = "openmpacc clacc-native clocl-native ti-cgt6x-native" RDEPENDS_${PN} += "opencl-runtime"@@ -44,6 +44,19 @@ EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x \ " +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" + +do_configure() {meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} \ · line 61
Quoted 10 lines
meta-arago-extras/recipes-ti/openmpacc/openmpacc-examples_git.bb +7
-0+ 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 +} + do_compile() { oe_runmake }_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago