mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
icc: add Intel(R) C++ Compiler Classic (ICC) support
Using the Intel® C++ Compiler Classic, you can compile and generate applications that can run on Intel® 64 architecture. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
parent
3217386ee4
commit
6e5caa6396
43
classes/icc.bbclass
Normal file
43
classes/icc.bbclass
Normal file
|
@ -0,0 +1,43 @@
|
|||
TOOLCHAINOVERRIDES = ":toolchain-${TOOLCHAIN}"
|
||||
TOOLCHAINOVERRIDES[vardepsexclude] = "TOOLCHAIN"
|
||||
|
||||
OVERRIDES .= "${TOOLCHAINOVERRIDES}"
|
||||
OVERRIDES[vardepsexclude] += "TOOLCHAINOVERRIDES"
|
||||
|
||||
ICC_PREFIX_OPTION = ""
|
||||
ICCQ_PREFIX_OPTION = ""
|
||||
|
||||
python(){
|
||||
hostprefix = d.getVar('HOST_PREFIX', True)
|
||||
if hostprefix and hostprefix != "":
|
||||
d.setVar("ICC_PREFIX_OPTION", "-gnu-prefix=${HOST_PREFIX}")
|
||||
d.setVar("ICCQ_PREFIX_OPTION","-qgnu-prefix=${HOST_PREFIX}")
|
||||
else:
|
||||
d.setVar("ICC_PREFIX_OPTION", "")
|
||||
d.setVar("ICCQ_PREFIX_OPTION","")
|
||||
|
||||
}
|
||||
|
||||
ICC_GCC_OPTION = "-gcc-name=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}gcc"
|
||||
ICC_GXX_OPTION = "-gxx-name=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}g++"
|
||||
CC:toolchain-icc = "icc ${ICC_PREFIX_OPTION} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${ICC_GCC_OPTION}"
|
||||
CXX:toolchain-icc = "icpc ${ICC_PREFIX_OPTION} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${ICC_GXX_OPTION}"
|
||||
CPP:toolchain-icc = "icc ${ICC_PREFIX_OPTION} -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH} ${ICC_GXX_OPTION}"
|
||||
LD:toolchain-icc = "xild ${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}"
|
||||
CCLD:toolchain-icc = "icc ${ICC_PREFIX_OPTION} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${ICC_GCC_OPTION}"
|
||||
AR:toolchain-icc = "xiar"
|
||||
|
||||
DEBUG_FLAGS=" -g -feliminate-unused-debug-types"
|
||||
TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
|
||||
CFLAGS:append:toolchain-icc = " ${ICC_PREFIX_OPTION}"
|
||||
CXXFLAGS:append:toolchain-icc = " ${ICC_PREFIX_OPTION}"
|
||||
|
||||
OECMAKE_AR:toolchain-icc = "${AR}"
|
||||
|
||||
DEPENDS:append:toolchain-icc:class-target = " intel-oneapi-runtime-compilers"
|
||||
DEPENDS:append:toolchain-icc:class-target = " intel-oneapi-compiler-classic-native"
|
||||
TOOLCHAIN:class-native = "gcc"
|
||||
TOOLCHAIN:class-nativesdk = "gcc"
|
||||
TOOLCHAIN:class-cross-canadian = "gcc"
|
||||
TOOLCHAIN:class-crosssdk = "gcc"
|
||||
TOOLCHAIN:class-cross = "gcc"
|
54
conf/noniccable.conf
Normal file
54
conf/noniccable.conf
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Per package toolchain configuration
|
||||
# specify the icc build package here:
|
||||
|
||||
#force enable the default gcc build for the following packages
|
||||
TOOLCHAIN:pn-intel-oneapi-compiler = 'gcc'
|
||||
TOOLCHAIN:pn-gcc = "gcc"
|
||||
TOOLCHAIN:pn-gcc-cross = "gcc"
|
||||
TOOLCHAIN:pn-libgcc-initial = "gcc"
|
||||
TOOLCHAIN:pn-libgcc = "gcc"
|
||||
TOOLCHAIN:pn-gcc-runtime = "gcc"
|
||||
TOOLCHAIN:pn-gcc-sanitizers = "gcc"
|
||||
TOOLCHAIN:pn-glibc = "gcc"
|
||||
TOOLCHAIN:pn-glibc-initial = "gcc"
|
||||
TOOLCHAIN:pn-glibc-locale = "gcc"
|
||||
TOOLCHAIN:pn-glibc-mtrace = "gcc"
|
||||
TOOLCHAIN:pn-glibc-scripts = "gcc"
|
||||
TOOLCHAIN:pn-glibc-testsuite = "gcc"
|
||||
TOOLCHAIN:pn-grub = "gcc"
|
||||
TOOLCHAIN:pn-grub-efi = "gcc"
|
||||
TOOLCHAIN:pn-opkg-utils = "gcc"
|
||||
TOOLCHAIN:pn-binutils-cross = "gcc"
|
||||
TOOLCHAIN:pn-intel-oneapi-runtime-compilers = "gcc"
|
||||
TOOLCHAIN:pn-intel-oneapi-runtime-compilers-native = 'gcc'
|
||||
TOOLCHAIN:pn-intel-oneapi-compiler-classic = "gcc"
|
||||
|
||||
|
||||
TOOLCHAIN:pn-gnu-efi = 'gcc'
|
||||
TOOLCHAIN:pn-libgpg-error = 'gcc'
|
||||
TOOLCHAIN:pn-systemd-boot = 'gcc'
|
||||
TOOLCHAIN:pn-gdb = 'gcc'
|
||||
TOOLCHAIN:pn-zstd = 'gcc'
|
||||
TOOLCHAIN:pn-ocl-icd = 'gcc'
|
||||
TOOLCHAIN:pn-xz = 'gcc'
|
||||
TOOLCHAIN:pn-libffi = 'gcc'
|
||||
TOOLCHAIN:pn-libxcrypt = 'gcc'
|
||||
TOOLCHAIN:pn-libpcre = 'gcc'
|
||||
TOOLCHAIN:pn-icu = 'gcc'
|
||||
TOOLCHAIN:pn-curl = 'gcc'
|
||||
TOOLCHAIN:pn-python3 = "gcc"
|
||||
TOOLCHAIN:pn-syslinux = "gcc"
|
||||
TOOLCHAIN:pn-diffutils = "gcc"
|
||||
TOOLCHAIN:pn-elfutils = "gcc"
|
||||
TOOLCHAIN:pn-gawk = "gcc"
|
||||
TOOLCHAIN:pn-coreutils = "gcc"
|
||||
TOOLCHAIN:pn-findutils = "gcc"
|
||||
TOOLCHAIN:pn-grep = "gcc"
|
||||
|
||||
#TODO Fix it
|
||||
# ../glib-2.72.3/meson.build:1:0: ERROR: Compiler icpc .... can not compile programs.
|
||||
TOOLCHAIN:pn-glib-2.0 = 'gcc'
|
||||
|
||||
# do_package_qa: QA Issue: package contains bad RPATH
|
||||
TOOLCHAIN:pn-shared-mime-info = 'gcc'
|
||||
TOOLCHAIN:pn-gobject-introspection = 'gcc'
|
|
@ -0,0 +1,34 @@
|
|||
SUMMARY = "Intel® C++ Compiler Classic"
|
||||
|
||||
DESCRIPTION = "Intel® C++ Compiler Classic generates applications \
|
||||
that can run on Intel® 64 architecture."
|
||||
|
||||
HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/introducing-the-intel-c-compiler-classic.html"
|
||||
|
||||
LICENSE="EULA"
|
||||
|
||||
LIC_FILES_CHKSUM = " \
|
||||
file://opt/intel/oneapi/licensing/2022.1.0/license.htm;md5=f721d37d5ef65590e052bc47e15feec3 \
|
||||
"
|
||||
|
||||
SRC_URI = " \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0-${PV}_amd64.deb;subdir=${BPN};name=classic-compiler \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-common-licensing-2022.1.0-2022.1.0-161_all.deb;subdir=${BPN};name=license \
|
||||
"
|
||||
|
||||
SRC_URI[classic-compiler.sha256sum] = "0407cf12127f641f1e1b50e8e8e3c6c9cd27be40b849d697401fa8c140604c23"
|
||||
SRC_URI[license.sha256sum] = "30f36ef653964ac629ce77c2c2d21a923c7ba4ff88936c39a8f39237b7446cca"
|
||||
|
||||
S = "${WORKDIR}/${BPN}"
|
||||
|
||||
inherit bin_package update-alternatives
|
||||
RDEPENDS:${PN} += " intel-oneapi-runtime-compilers"
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
do_install () {
|
||||
install -d ${D}/${bindir}/
|
||||
cp -r ${S}/opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/* ${D}${bindir}/
|
||||
}
|
||||
BBCLASSEXTEND = "native nativesdk"
|
|
@ -0,0 +1,59 @@
|
|||
SUMMARY = "Intel® C++ Compiler Classic runtime common files"
|
||||
|
||||
DESCRIPTION = "Intel® C++ Compiler Classic generates applications \
|
||||
that can run on Intel® 64 architecture."
|
||||
|
||||
HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/introducing-the-intel-c-compiler-classic.html"
|
||||
|
||||
LICENSE="EULA"
|
||||
|
||||
LIC_FILES_CHKSUM = " \
|
||||
file://opt/intel/oneapi/lib/licensing/compiler/Intel%20Developer%20Tools%20EULA;md5=7bfc91523de2e84e7131d0eacf2827d4 \
|
||||
"
|
||||
|
||||
SRC_URI = " \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-compilers-${PV}_amd64.deb;subdir=${BPN};name=runtime-compilers \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-runtime-compilers-common-${PV}_all.deb;subdir=${BPN};name=common-compilers \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-2022.1.0-${PV}_amd64.deb;subdir=${BPN};name=shared-runtime \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-2022.1.0-${PV}_amd64.deb;subdir=${BPN};name=compiler-linker \
|
||||
https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-common-2022.1.0-${PV}_all.deb;subdir=${BPN};name=dpcpp-common \
|
||||
"
|
||||
|
||||
SRC_URI[runtime-compilers.sha256sum] = "0f27cbde635f30e79329248398e36e5610aa78aeda4ebc9ed1f3538ffbf0ea8d"
|
||||
SRC_URI[common-compilers.sha256sum] = "7347588844ad9e86291586c049185381ec960cde09b6fd220c626fb865f8865c"
|
||||
SRC_URI[shared-runtime.sha256sum] = "77b7201b5fe991152528ec40d586114edef12bb79c1a1a8fbfd6bd23c2aba5e1"
|
||||
SRC_URI[compiler-linker.sha256sum] = "3185dc02473b3d3a34234dd82a17c285e43701455636f93be235b52c2ac6f2c6"
|
||||
SRC_URI[dpcpp-common.sha256sum] = "5bc6452a32f5781c96498515d061d8fe9d7bba13b41eb983fe9bb0f792621906"
|
||||
|
||||
S = "${WORKDIR}/${BPN}"
|
||||
|
||||
inherit bin_package update-alternatives
|
||||
|
||||
RDEPENDS:${PN} += " ocl-icd zlib"
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
# doesn't have GNU_HASH (didn't pass LDFLAGS?)
|
||||
INSANE_SKIP:${PN} += "textrel dev-so dev-elf ldflags"
|
||||
FILES_SOLIBSDEV = ""
|
||||
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${libdir}/
|
||||
install -d ${D}${bindir}/
|
||||
install -d ${D}${libdir}/licensing/compiler/
|
||||
cp -r ${S}/opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/* ${D}${bindir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/intel64/*.so* ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/*.so* ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/*.a ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/libsycl-fallback-cstring.o ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/libsycl-fallback-cstring.spv ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/lib/licensing/compiler/* ${D}${libdir}/licensing/compiler/
|
||||
cp -r ${S}/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin/* ${D}${libdir}/
|
||||
cp -r ${S}/opt/intel/oneapi/compiler/2022.1.0/linux/lib/clang ${D}${libdir}/
|
||||
rm -rf ${D}/${bindir}/*.so*
|
||||
rm -rf ${D}/opt
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
Loading…
Reference in New Issue
Block a user