blob: 38c1672876b7a764bd600947016a6493f9ef20af [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001require gcc-configure-common.inc
2
Patrick Williamsc0f7c042017-02-23 20:41:17 -06003SUMMARY = "Runtime libraries from GCC"
4
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
6# All gcc-runtime packages are now covered by the runtime exception.
7LICENSE = "GPL-3.0-with-GCC-exception"
8
9CXXFLAGS_remove = "-fvisibility-inlines-hidden"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
11EXTRA_OECONF_PATHS = "\
12 --with-gxx-include-dir=${includedir}/c++/${BINV} \
13 --with-sysroot=/not/exist \
14 --with-build-sysroot=${STAGING_DIR_TARGET} \
15"
16
17EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
Brad Bishop19323692019-04-05 15:28:33 -040018EXTRA_OECONF_append = " --cache-file=${B}/config.cache"
Andrew Geissler82c905d2020-04-13 13:39:40 -050019EXTRA_OECONF_append_libc-newlib = " --with-newlib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
Andrew Geisslerc182c622020-05-15 14:13:32 -050021# cortex-a55 is ARMv8.2-a based but libatomic explicitly asks for -march=armv8.1-a
22# which caused -march conflicts in gcc
23TUNE_CCARGS_remove = "-mcpu=cortex-a55+crc -mcpu=cortex-a55 -mcpu=cortex-a55+crc+crypto"
24
Brad Bishop08902b02019-08-20 09:16:51 -040025# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
26EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
Andrew Geissler82c905d2020-04-13 13:39:40 -050027EXTRA_OECONF_append_armeb = " libat_cv_have_ifunc=no "
28
29DISABLE_STATIC_class-nativesdk ?= ""
30
31# Newlib does not support symbol versioning on libsdtcc++
32SYMVERS_CONF_libc-newlib = ""
Brad Bishop08902b02019-08-20 09:16:51 -040033
34# Building with thumb enabled on armv6t fails
35ARM_INSTRUCTION_SET_armv6 = "arm"
36
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037RUNTIMELIBITM = "libitm"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038RUNTIMELIBITM_arc = ""
Brad Bishop6e60e8b2018-02-01 10:27:11 -050039RUNTIMELIBITM_mipsarch = ""
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050040RUNTIMELIBITM_nios2 = ""
41RUNTIMELIBITM_microblaze = ""
Brad Bishop00111322018-04-01 22:23:53 -040042RUNTIMELIBITM_riscv32 = ""
43RUNTIMELIBITM_riscv64 = ""
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044RUNTIMELIBSSP ?= ""
45RUNTIMELIBSSP_mingw32 ?= "libssp"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050048 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
49"
Andrew Geissler82c905d2020-04-13 13:39:40 -050050# Only build libstdc++ for newlib
51RUNTIMETARGET_libc-newlib = "libstdc++-v3"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050052
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053# libiberty
54# libmudflap
55# libgfortran needs separate recipe due to libquadmath dependency
56
Brad Bishop316dfdd2018-06-25 12:45:53 -040057SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
58SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
59
60DEBUG_PREFIX_MAP_class-target = " \
61 -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
62 -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
63 -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
64 -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
65 -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
66 -fdebug-prefix-map=${B}=${SLIB_NEW} \
67 "
68
Patrick Williamsc124f4f2015-09-15 14:41:29 -050069do_configure () {
70 export CXX="${CXX} -nostdinc++ -nostdlib++"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050071 for d in libgcc ${RUNTIMETARGET}; do
72 echo "Configuring $d"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050073 rm -rf ${B}/${TARGET_SYS}/$d/
74 mkdir -p ${B}/${TARGET_SYS}/$d/
75 cd ${B}/${TARGET_SYS}/$d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050076 chmod a+x ${S}/$d/configure
Brad Bishop6e60e8b2018-02-01 10:27:11 -050077 relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050078 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
Brad Bishopd7bf8c12018-02-25 22:55:05 -050079 if [ "$d" = "libgcc" ]; then
80 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
81 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050082 done
83}
Brad Bishop6e60e8b2018-02-01 10:27:11 -050084EXTRACONFFUNCS += "extract_stashed_builddir"
85do_configure[depends] += "${COMPILERDEP}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050086
87do_compile () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050088 for d in libgcc ${RUNTIMETARGET}; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -050089 cd ${B}/${TARGET_SYS}/$d/
90 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050091 done
92}
93
94do_install () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050095 for d in ${RUNTIMETARGET}; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -050096 cd ${B}/${TARGET_SYS}/$d/
97 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
Patrick Williamsc124f4f2015-09-15 14:41:29 -050098 done
Brad Bishop08902b02019-08-20 09:16:51 -040099 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
100 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
101 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
102 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
103 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500104 rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500105 rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500106 rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
107 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
108 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
109 fi
110 if [ -d ${D}${infodir} ]; then
111 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
112 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600113}
114
115do_install_append_class-target () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500116 if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
117 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
118 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600119
120 if [ "${TARGET_OS}" = "linux-gnun32" ]; then
Brad Bishopf3fd2882019-06-21 08:06:37 -0400121 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
122 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
123 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32
124 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
125 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
126 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600127 else
128 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
129 fi
Brad Bishopf3fd2882019-06-21 08:06:37 -0400130 elif [ "${TARGET_OS}" = "linux-gnux32" ]; then
131 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
132 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
133 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32
134 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
135 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
136 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600137 else
138 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
139 fi
Brad Bishopf3fd2882019-06-21 08:06:37 -0400140 elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
Brad Bishopc8f47122019-06-24 09:36:18 -0400141 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
Brad Bishopf3fd2882019-06-21 08:06:37 -0400142 ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits
143 ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600144 fi
145
146 if [ "${TCLIBC}" != "glibc" ]; then
147 case "${TARGET_OS}" in
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500148 "linux-musl" | "linux-*spe") extra_target_os="linux";;
149 "linux-musleabi") extra_target_os="linux-gnueabi";;
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600150 *) extra_target_os="linux";;
151 esac
152 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
153 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500154 chown -R root:root ${D}
155}
156
157INHIBIT_DEFAULT_DEPS = "1"
Brad Bishop19323692019-04-05 15:28:33 -0400158DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500159PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
160
161BBCLASSEXTEND = "nativesdk"
162
163PACKAGES = "\
164 ${PN}-dbg \
165 libstdc++ \
166 libstdc++-precompile-dev \
167 libstdc++-dev \
168 libstdc++-staticdev \
169 libg2c \
170 libg2c-dev \
171 libssp \
172 libssp-dev \
173 libssp-staticdev \
174 libmudflap \
175 libmudflap-dev \
176 libmudflap-staticdev \
177 libquadmath \
178 libquadmath-dev \
179 libquadmath-staticdev \
180 libgomp \
181 libgomp-dev \
182 libgomp-staticdev \
183 libatomic \
184 libatomic-dev \
185 libatomic-staticdev \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500186 libitm \
187 libitm-dev \
188 libitm-staticdev \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500189"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500190# The base package doesn't exist, so we clear the recommends.
191RRECOMMENDS_${PN}-dbg = ""
192
193# include python debugging scripts
194FILES_${PN}-dbg += "\
Andrew Geissler82c905d2020-04-13 13:39:40 -0500195 ${libdir}/libstdc++.*-gdb.py \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500196 ${datadir}/gcc-${BINV}/python/libstdcxx \
197"
198
199FILES_libg2c = "${target_libdir}/libg2c.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600200SUMMARY_libg2c = "Companion runtime library for g77"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500201FILES_libg2c-dev = "\
202 ${libdir}/libg2c.so \
203 ${libdir}/libg2c.a \
204 ${libdir}/libfrtbegin.a \
205"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600206SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500207
208FILES_libstdc++ = "${libdir}/libstdc++.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600209SUMMARY_libstdc++ = "GNU standard C++ library"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500210FILES_libstdc++-dev = "\
211 ${includedir}/c++/ \
212 ${libdir}/libstdc++.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500213 ${libdir}/libstdc++*.la \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500214 ${libdir}/libsupc++.la \
215"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600216SUMMARY_libstdc++-dev = "GNU standard C++ library - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500217FILES_libstdc++-staticdev = "\
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500218 ${libdir}/libstdc++*.a \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500219 ${libdir}/libsupc++.a \
220"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600221SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500222
223FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600224SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500225
226FILES_libssp = "${libdir}/libssp.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600227SUMMARY_libssp = "GNU stack smashing protection library"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500228FILES_libssp-dev = "\
229 ${libdir}/libssp*.so \
230 ${libdir}/libssp*_nonshared.a \
231 ${libdir}/libssp*.la \
Brad Bishop08902b02019-08-20 09:16:51 -0400232 ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500233"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600234SUMMARY_libssp-dev = "GNU stack smashing protection library - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500235FILES_libssp-staticdev = "${libdir}/libssp*.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600236SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500237
238FILES_libquadmath = "${libdir}/libquadmath*.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600239SUMMARY_libquadmath = "GNU quad-precision math library"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500240FILES_libquadmath-dev = "\
Brad Bishop08902b02019-08-20 09:16:51 -0400241 ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500242 ${libdir}/libquadmath*.so \
243 ${libdir}/libquadmath.la \
244"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600245SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500246FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600247SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500248
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600249# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500250FILES_libmudflap = "${libdir}/libmudflap*.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600251SUMMARY_libmudflap = "Pointer debugging library for gcc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500252FILES_libmudflap-dev = "\
253 ${libdir}/libmudflap*.so \
254 ${libdir}/libmudflap.la \
255"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600256SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500257FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600258SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500259
260FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600261SUMMARY_libgomp = "GNU OpenMP parallel programming library"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500262FILES_libgomp-dev = "\
263 ${libdir}/libgomp*${SOLIBSDEV} \
264 ${libdir}/libgomp*.la \
265 ${libdir}/libgomp.spec \
Andrew Geisslerc182c622020-05-15 14:13:32 -0500266 ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \
Brad Bishop08902b02019-08-20 09:16:51 -0400267 ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
268 ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500269"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600270SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500271FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600272SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500273
274FILES_libatomic = "${libdir}/libatomic.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600275SUMMARY_libatomic = "GNU C++11 atomics support library"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500276FILES_libatomic-dev = "\
277 ${libdir}/libatomic.so \
278 ${libdir}/libatomic.la \
279"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600280SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500281FILES_libatomic-staticdev = "${libdir}/libatomic.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600282SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500283
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500284FILES_libitm = "${libdir}/libitm.so.*"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600285SUMMARY_libitm = "GNU transactional memory support library"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500286FILES_libitm-dev = "\
287 ${libdir}/libitm.so \
288 ${libdir}/libitm.la \
289 ${libdir}/libitm.spec \
290"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600291SUMMARY_libitm-dev = "GNU transactional memory support library - development files"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500292FILES_libitm-staticdev = "${libdir}/libitm.a"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600293SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"
Brad Bishop79641f22019-09-10 07:20:22 -0400294
295require gcc-testsuite.inc
296
297EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} "
298
299MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}"
300# prettyprinters and xmethods require gdb tooling
301MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp"
302MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'"
303
304# specific host and target dependencies required for test suite running
305do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot"
306do_check[depends] += "virtual/libc:do_populate_sysroot"
307# only depend on qemu if targeting linux user execution
308do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}"
309# extend the recipe sysroot to include the built libraries (for qemu usermode)
310do_check[prefuncs] += "extend_recipe_sysroot"
311do_check[prefuncs] += "check_prepare"
312do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
313do_check[nostamp] = "1"
314do_check() {
315 export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
316
317 # HACK: this works around the configure setting CXX with -nostd* args
318 sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1)
Brad Bishop79641f22019-09-10 07:20:22 -0400319
320 if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
321 # qemu user has issues allocating large amounts of memory
322 export G_SLICE=always-malloc
323 # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory
324 ulimit -m 4194304
325 ulimit -v 10485760
326 fi
327
328 oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}"
329}
330addtask check after do_compile do_populate_sysroot
331