blob: b8bfdcedadfe0ad6c96405a50a45c347a3fe21c0 [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
Andrew Geisslerd5838332022-05-27 11:33:10 -05005# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05006# All gcc-runtime packages are now covered by the runtime exception.
7LICENSE = "GPL-3.0-with-GCC-exception"
8
Patrick Williams213cb262021-08-07 19:21:33 -05009CXXFLAGS: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
Patrick Williams213cb262021-08-07 19:21:33 -050017EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu"
18EXTRA_OECONF:append = " --cache-file=${B}/config.cache"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050019EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir"
20EXTRA_OECONF:append:libc-baremetal = " --with-target-subdir"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021
Brad Bishop08902b02019-08-20 09:16:51 -040022# Disable ifuncs for libatomic on arm conflicts -march/-mcpu
Patrick Williams213cb262021-08-07 19:21:33 -050023EXTRA_OECONF:append:arm = " libat_cv_have_ifunc=no "
24EXTRA_OECONF:append:armeb = " libat_cv_have_ifunc=no "
Andrew Geissler82c905d2020-04-13 13:39:40 -050025
Patrick Williams213cb262021-08-07 19:21:33 -050026DISABLE_STATIC:class-nativesdk ?= ""
Andrew Geissler82c905d2020-04-13 13:39:40 -050027
28# Newlib does not support symbol versioning on libsdtcc++
Patrick Williams213cb262021-08-07 19:21:33 -050029SYMVERS_CONF:libc-newlib = ""
Brad Bishop08902b02019-08-20 09:16:51 -040030
31# Building with thumb enabled on armv6t fails
Patrick Williams213cb262021-08-07 19:21:33 -050032ARM_INSTRUCTION_SET:armv6 = "arm"
Brad Bishop08902b02019-08-20 09:16:51 -040033
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034RUNTIMELIBITM = "libitm"
Patrick Williams213cb262021-08-07 19:21:33 -050035RUNTIMELIBITM:arc = ""
36RUNTIMELIBITM:mipsarch = ""
37RUNTIMELIBITM:nios2 = ""
38RUNTIMELIBITM:microblaze = ""
39RUNTIMELIBITM:riscv32 = ""
40RUNTIMELIBITM:riscv64 = ""
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041RUNTIMELIBSSP ?= ""
Patrick Williams213cb262021-08-07 19:21:33 -050042RUNTIMELIBSSP:mingw32 ?= "libssp"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050043
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050045 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
46"
Andrew Geissler82c905d2020-04-13 13:39:40 -050047# Only build libstdc++ for newlib
Patrick Williams213cb262021-08-07 19:21:33 -050048RUNTIMETARGET:libc-newlib = "libstdc++-v3"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050# libiberty
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051# libgfortran needs separate recipe due to libquadmath dependency
52
Andrew Geisslerc926e172021-05-07 16:11:35 -050053# Relative path to be repaced into debug info
54REL_S = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040055
Patrick Williams213cb262021-08-07 19:21:33 -050056DEBUG_PREFIX_MAP:class-target = " \
Andrew Geissler615f2f12022-07-15 14:00:58 -050057 -fdebug-prefix-map=${WORKDIR}/${MLPREFIX}recipe-sysroot= \
Brad Bishop316dfdd2018-06-25 12:45:53 -040058 -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
Andrew Geisslerc926e172021-05-07 16:11:35 -050059 -fdebug-prefix-map=${S}=${REL_S} \
60 -fdebug-prefix-map=${S}/include=${REL_S}/libstdc++-v3/../include \
61 -fdebug-prefix-map=${S}/libiberty=${REL_S}/libstdc++-v3/../libiberty \
62 -fdebug-prefix-map=${S}/libgcc=${REL_S}/libstdc++-v3/../libgcc \
63 -fdebug-prefix-map=${B}=${REL_S} \
64 -ffile-prefix-map=${B}/${HOST_SYS}/libstdc++-v3/include=${includedir}/c++/${BINV} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040065 "
66
Patrick Williamsc124f4f2015-09-15 14:41:29 -050067do_configure () {
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000068 export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib"
69 # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
70 # tests. Create a dummy empty lib for the purposes of configure.
71 mkdir -p ${WORKDIR}/dummylib
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050072 ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o
73 ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o
Patrick Williamsc124f4f2015-09-15 14:41:29 -050074 for d in libgcc ${RUNTIMETARGET}; do
75 echo "Configuring $d"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050076 rm -rf ${B}/${TARGET_SYS}/$d/
77 mkdir -p ${B}/${TARGET_SYS}/$d/
78 cd ${B}/${TARGET_SYS}/$d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050079 chmod a+x ${S}/$d/configure
Brad Bishop6e60e8b2018-02-01 10:27:11 -050080 relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050081 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
Brad Bishopd7bf8c12018-02-25 22:55:05 -050082 if [ "$d" = "libgcc" ]; then
83 (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h)
84 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050085 done
86}
Brad Bishop6e60e8b2018-02-01 10:27:11 -050087EXTRACONFFUNCS += "extract_stashed_builddir"
88do_configure[depends] += "${COMPILERDEP}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050089
90do_compile () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050091 for d in libgcc ${RUNTIMETARGET}; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -050092 cd ${B}/${TARGET_SYS}/$d/
93 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050094 done
95}
96
97do_install () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050098 for d in ${RUNTIMETARGET}; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -050099 cd ${B}/${TARGET_SYS}/$d/
100 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500101 done
Brad Bishop08902b02019-08-20 09:16:51 -0400102 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
103 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
104 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
105 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
106 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500107 rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500108 rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500109 rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
110 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
111 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
112 fi
113 if [ -d ${D}${infodir} ]; then
114 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
115 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600116}
117
Patrick Williams213cb262021-08-07 19:21:33 -0500118do_install:append:class-target () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500119 if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
120 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
121 fi
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600122
123 if [ "${TARGET_OS}" = "linux-gnun32" ]; then
Brad Bishopf3fd2882019-06-21 08:06:37 -0400124 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
125 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
126 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32
127 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
128 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
129 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600130 else
131 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
132 fi
Brad Bishopf3fd2882019-06-21 08:06:37 -0400133 elif [ "${TARGET_OS}" = "linux-gnux32" ]; then
134 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
135 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux
136 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32
137 elif [ "${MULTILIB_VARIANTS}" != "" ]; then
138 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
139 ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600140 else
141 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
142 fi
Brad Bishopf3fd2882019-06-21 08:06:37 -0400143 elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
Brad Bishopc8f47122019-06-24 09:36:18 -0400144 mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
Brad Bishopf3fd2882019-06-21 08:06:37 -0400145 ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits
146 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 -0600147 fi
148
Andrew Geissler635e0e42020-08-21 15:58:33 -0500149 if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then
150 ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32
151 fi
152
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600153 if [ "${TCLIBC}" != "glibc" ]; then
154 case "${TARGET_OS}" in
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500155 "linux-musl" | "linux-*spe") extra_target_os="linux";;
156 "linux-musleabi") extra_target_os="linux-gnueabi";;
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600157 *) extra_target_os="linux";;
158 esac
159 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
160 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500161 chown -R root:root ${D}
162}
163
164INHIBIT_DEFAULT_DEPS = "1"
Brad Bishop19323692019-04-05 15:28:33 -0400165DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500166PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
167
168BBCLASSEXTEND = "nativesdk"
169
170PACKAGES = "\
171 ${PN}-dbg \
172 libstdc++ \
173 libstdc++-precompile-dev \
174 libstdc++-dev \
175 libstdc++-staticdev \
176 libg2c \
177 libg2c-dev \
178 libssp \
179 libssp-dev \
180 libssp-staticdev \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500181 libquadmath \
182 libquadmath-dev \
183 libquadmath-staticdev \
184 libgomp \
185 libgomp-dev \
186 libgomp-staticdev \
187 libatomic \
188 libatomic-dev \
189 libatomic-staticdev \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500190 libitm \
191 libitm-dev \
192 libitm-staticdev \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500193"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500194# The base package doesn't exist, so we clear the recommends.
Patrick Williams213cb262021-08-07 19:21:33 -0500195RRECOMMENDS:${PN}-dbg = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500196
197# include python debugging scripts
Patrick Williams213cb262021-08-07 19:21:33 -0500198FILES:${PN}-dbg += "\
Andrew Geissler82c905d2020-04-13 13:39:40 -0500199 ${libdir}/libstdc++.*-gdb.py \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500200 ${datadir}/gcc-${BINV}/python/libstdcxx \
201"
202
Patrick Williams213cb262021-08-07 19:21:33 -0500203FILES:libg2c = "${target_libdir}/libg2c.so.*"
204SUMMARY:libg2c = "Companion runtime library for g77"
205FILES:libg2c-dev = "\
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500206 ${libdir}/libg2c.so \
207 ${libdir}/libg2c.a \
208 ${libdir}/libfrtbegin.a \
209"
Patrick Williams213cb262021-08-07 19:21:33 -0500210SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500211
Patrick Williams213cb262021-08-07 19:21:33 -0500212FILES:libstdc++ = "${libdir}/libstdc++.so.*"
213SUMMARY:libstdc++ = "GNU standard C++ library"
214FILES:libstdc++-dev = "\
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500215 ${includedir}/c++/ \
216 ${libdir}/libstdc++.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500217 ${libdir}/libstdc++*.la \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500218 ${libdir}/libsupc++.la \
219"
Patrick Williams213cb262021-08-07 19:21:33 -0500220SUMMARY:libstdc++-dev = "GNU standard C++ library - development files"
221FILES:libstdc++-staticdev = "\
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500222 ${libdir}/libstdc++*.a \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500223 ${libdir}/libsupc++.a \
224"
Patrick Williams213cb262021-08-07 19:21:33 -0500225SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500226
Patrick Williams213cb262021-08-07 19:21:33 -0500227FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
228SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500229
Patrick Williams213cb262021-08-07 19:21:33 -0500230FILES:libssp = "${libdir}/libssp.so.*"
231SUMMARY:libssp = "GNU stack smashing protection library"
232FILES:libssp-dev = "\
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500233 ${libdir}/libssp*.so \
234 ${libdir}/libssp*_nonshared.a \
235 ${libdir}/libssp*.la \
Brad Bishop08902b02019-08-20 09:16:51 -0400236 ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500237"
Patrick Williams213cb262021-08-07 19:21:33 -0500238SUMMARY:libssp-dev = "GNU stack smashing protection library - development files"
239FILES:libssp-staticdev = "${libdir}/libssp*.a"
240SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500241
Patrick Williams213cb262021-08-07 19:21:33 -0500242FILES:libquadmath = "${libdir}/libquadmath*.so.*"
243SUMMARY:libquadmath = "GNU quad-precision math library"
244FILES:libquadmath-dev = "\
Brad Bishop08902b02019-08-20 09:16:51 -0400245 ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500246 ${libdir}/libquadmath*.so \
247 ${libdir}/libquadmath.la \
248"
Patrick Williams213cb262021-08-07 19:21:33 -0500249SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files"
250FILES:libquadmath-staticdev = "${libdir}/libquadmath.a"
251SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500252
Patrick Williams213cb262021-08-07 19:21:33 -0500253FILES:libgomp = "${libdir}/libgomp*${SOLIBS}"
254SUMMARY:libgomp = "GNU OpenMP parallel programming library"
255FILES:libgomp-dev = "\
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500256 ${libdir}/libgomp*${SOLIBSDEV} \
257 ${libdir}/libgomp*.la \
258 ${libdir}/libgomp.spec \
Andrew Geisslerc182c622020-05-15 14:13:32 -0500259 ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \
Brad Bishop08902b02019-08-20 09:16:51 -0400260 ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
261 ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500262"
Patrick Williams213cb262021-08-07 19:21:33 -0500263SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files"
264FILES:libgomp-staticdev = "${libdir}/libgomp*.a"
265SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500266
Patrick Williams213cb262021-08-07 19:21:33 -0500267FILES:libatomic = "${libdir}/libatomic.so.*"
268SUMMARY:libatomic = "GNU C++11 atomics support library"
269FILES:libatomic-dev = "\
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500270 ${libdir}/libatomic.so \
271 ${libdir}/libatomic.la \
272"
Patrick Williams213cb262021-08-07 19:21:33 -0500273SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files"
274FILES:libatomic-staticdev = "${libdir}/libatomic.a"
275SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500276
Patrick Williams213cb262021-08-07 19:21:33 -0500277FILES:libitm = "${libdir}/libitm.so.*"
278SUMMARY:libitm = "GNU transactional memory support library"
279FILES:libitm-dev = "\
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500280 ${libdir}/libitm.so \
281 ${libdir}/libitm.la \
282 ${libdir}/libitm.spec \
283"
Patrick Williams213cb262021-08-07 19:21:33 -0500284SUMMARY:libitm-dev = "GNU transactional memory support library - development files"
285FILES:libitm-staticdev = "${libdir}/libitm.a"
286SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files"
Brad Bishop79641f22019-09-10 07:20:22 -0400287
288require gcc-testsuite.inc
289
Patrick Williams213cb262021-08-07 19:21:33 -0500290EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} "
Brad Bishop79641f22019-09-10 07:20:22 -0400291
292MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}"
293# prettyprinters and xmethods require gdb tooling
294MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp"
295MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'"
296
297# specific host and target dependencies required for test suite running
298do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot"
299do_check[depends] += "virtual/libc:do_populate_sysroot"
300# only depend on qemu if targeting linux user execution
301do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}"
302# extend the recipe sysroot to include the built libraries (for qemu usermode)
303do_check[prefuncs] += "extend_recipe_sysroot"
304do_check[prefuncs] += "check_prepare"
305do_check[dirs] = "${WORKDIR}/dejagnu ${B}"
306do_check[nostamp] = "1"
307do_check() {
308 export DEJAGNU="${WORKDIR}/dejagnu/site.exp"
309
310 # HACK: this works around the configure setting CXX with -nostd* args
Andrew Geissler7e0e3c02022-02-25 20:34:39 +0000311 sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1)
Brad Bishop79641f22019-09-10 07:20:22 -0400312
313 if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
314 # qemu user has issues allocating large amounts of memory
315 export G_SLICE=always-malloc
316 # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory
317 ulimit -m 4194304
318 ulimit -v 10485760
319 fi
320
321 oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}"
322}
323addtask check after do_compile do_populate_sysroot
324