Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | require gcc-configure-common.inc |
| 2 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 3 | SUMMARY = "Runtime libraries from GCC" |
| 4 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 5 | # Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 6 | # All gcc-runtime packages are now covered by the runtime exception. |
| 7 | LICENSE = "GPL-3.0-with-GCC-exception" |
| 8 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | CXXFLAGS:remove = "-fvisibility-inlines-hidden" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | |
| 11 | EXTRA_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu" |
| 18 | EXTRA_OECONF:append = " --cache-file=${B}/config.cache" |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 19 | EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir" |
| 20 | EXTRA_OECONF:append:libc-baremetal = " --with-target-subdir" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 22 | # Disable ifuncs for libatomic on arm conflicts -march/-mcpu |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | EXTRA_OECONF:append:arm = " libat_cv_have_ifunc=no " |
| 24 | EXTRA_OECONF:append:armeb = " libat_cv_have_ifunc=no " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | DISABLE_STATIC:class-nativesdk ?= "" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | |
| 28 | # Newlib does not support symbol versioning on libsdtcc++ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | SYMVERS_CONF:libc-newlib = "" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 30 | |
| 31 | # Building with thumb enabled on armv6t fails |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | ARM_INSTRUCTION_SET:armv6 = "arm" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 33 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | RUNTIMELIBITM = "libitm" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | RUNTIMELIBITM:arc = "" |
| 36 | RUNTIMELIBITM:mipsarch = "" |
| 37 | RUNTIMELIBITM:nios2 = "" |
| 38 | RUNTIMELIBITM:microblaze = "" |
| 39 | RUNTIMELIBITM:riscv32 = "" |
| 40 | RUNTIMELIBITM:riscv64 = "" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 41 | RUNTIMELIBITM:loongarch64 = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | RUNTIMELIBSSP ?= "" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | RUNTIMELIBSSP:mingw32 ?= "libssp" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 44 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 46 | ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ |
| 47 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 | # Only build libstdc++ for newlib |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | RUNTIMETARGET:libc-newlib = "libstdc++-v3" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 50 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | # libiberty |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | # libgfortran needs separate recipe due to libquadmath dependency |
| 53 | |
| 54 | do_configure () { |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 55 | export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib" |
| 56 | # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure |
| 57 | # tests. Create a dummy empty lib for the purposes of configure. |
| 58 | mkdir -p ${WORKDIR}/dummylib |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 59 | ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o |
| 60 | ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 61 | for d in libgcc ${RUNTIMETARGET}; do |
| 62 | echo "Configuring $d" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 63 | rm -rf ${B}/${TARGET_SYS}/$d/ |
| 64 | mkdir -p ${B}/${TARGET_SYS}/$d/ |
| 65 | cd ${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | chmod a+x ${S}/$d/configure |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 67 | ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 68 | if [ "$d" = "libgcc" ]; then |
| 69 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) |
| 70 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 71 | done |
| 72 | } |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 73 | EXTRACONFFUNCS += "extract_stashed_builddir" |
| 74 | do_configure[depends] += "${COMPILERDEP}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 75 | |
| 76 | do_compile () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 77 | for d in libgcc ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 78 | cd ${B}/${TARGET_SYS}/$d/ |
| 79 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | done |
| 81 | } |
| 82 | |
| 83 | do_install () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 84 | for d in ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 85 | cd ${B}/${TARGET_SYS}/$d/ |
| 86 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 87 | done |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 88 | install -d ${D}${datadir}/gdb/auto-load/${libdir} |
| 89 | mv ${D}${libdir}/libstdc++*-gdb.py ${D}${datadir}/gdb/auto-load/${libdir} |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 90 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then |
| 91 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 92 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 93 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include |
| 94 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 95 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 96 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 97 | rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir |
| 98 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then |
| 99 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude |
| 100 | fi |
| 101 | if [ -d ${D}${infodir} ]; then |
| 102 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} |
| 103 | fi |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 104 | if [ -d ${D}${libdir} ]; then |
| 105 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir} |
| 106 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 107 | } |
| 108 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 109 | do_install:append:class-target () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 110 | if [ "${TARGET_OS}" = "linux-gnuspe" ]; then |
| 111 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 112 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 113 | |
| 114 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 115 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 116 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 117 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32 |
| 118 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 119 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 120 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 121 | else |
| 122 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 123 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 124 | elif [ "${TARGET_OS}" = "linux-gnux32" ]; then |
| 125 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 126 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 127 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32 |
| 128 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 129 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 130 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 131 | else |
| 132 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 133 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 134 | elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
Brad Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 135 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 136 | ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits |
| 137 | ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 138 | fi |
| 139 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 140 | if [ "${TARGET_ARCH}" = "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 141 | ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32 |
| 142 | fi |
| 143 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 144 | if [ "${TCLIBC}" != "glibc" ]; then |
| 145 | case "${TARGET_OS}" in |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 146 | "linux-musl" | "linux-*spe") extra_target_os="linux";; |
| 147 | "linux-musleabi") extra_target_os="linux-gnueabi";; |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 148 | *) extra_target_os="linux";; |
| 149 | esac |
| 150 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os |
| 151 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 152 | chown -R root:root ${D} |
| 153 | } |
| 154 | |
| 155 | INHIBIT_DEFAULT_DEPS = "1" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 156 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 157 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" |
| 158 | |
| 159 | BBCLASSEXTEND = "nativesdk" |
| 160 | |
| 161 | PACKAGES = "\ |
| 162 | ${PN}-dbg \ |
| 163 | libstdc++ \ |
| 164 | libstdc++-precompile-dev \ |
| 165 | libstdc++-dev \ |
| 166 | libstdc++-staticdev \ |
| 167 | libg2c \ |
| 168 | libg2c-dev \ |
| 169 | libssp \ |
| 170 | libssp-dev \ |
| 171 | libssp-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 172 | libquadmath \ |
| 173 | libquadmath-dev \ |
| 174 | libquadmath-staticdev \ |
| 175 | libgomp \ |
| 176 | libgomp-dev \ |
| 177 | libgomp-staticdev \ |
| 178 | libatomic \ |
| 179 | libatomic-dev \ |
| 180 | libatomic-staticdev \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 181 | libitm \ |
| 182 | libitm-dev \ |
| 183 | libitm-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 184 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 185 | # The base package doesn't exist, so we clear the recommends. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 186 | RRECOMMENDS:${PN}-dbg = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 187 | |
| 188 | # include python debugging scripts |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 189 | FILES:${PN}-dbg += "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 190 | ${datadir}/gcc-${BINV}/python/libstdcxx \ |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 191 | ${datadir}/gdb/auto-load \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 192 | " |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 193 | # Needed by libstdcxx pretty printer, however it is disabled intentionally |
| 194 | # as it adds build time dependency on bash and some cases e.g. no GPL3 cases |
| 195 | # bash is not availbale and builds fails |
| 196 | # So it needs to be added manually to images sadly. |
| 197 | # RDEPENDS:${PN}-dbg += "python3-datetime" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 198 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 199 | FILES:libg2c = "${target_libdir}/libg2c.so.*" |
| 200 | SUMMARY:libg2c = "Companion runtime library for g77" |
| 201 | FILES:libg2c-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 202 | ${libdir}/libg2c.so \ |
| 203 | ${libdir}/libg2c.a \ |
| 204 | ${libdir}/libfrtbegin.a \ |
| 205 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 206 | SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 207 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 208 | FILES:libstdc++ = "${libdir}/libstdc++.so.*" |
| 209 | SUMMARY:libstdc++ = "GNU standard C++ library" |
| 210 | FILES:libstdc++-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 211 | ${includedir}/c++/ \ |
| 212 | ${libdir}/libstdc++.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 213 | ${libdir}/libstdc++*.la \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 214 | ${libdir}/libsupc++.la \ |
| 215 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 216 | SUMMARY:libstdc++-dev = "GNU standard C++ library - development files" |
| 217 | FILES:libstdc++-staticdev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 218 | ${libdir}/libstdc++*.a \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 219 | ${libdir}/libsupc++.a \ |
| 220 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 221 | SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 222 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 223 | FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" |
| 224 | SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 225 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 226 | FILES:libssp = "${libdir}/libssp.so.*" |
| 227 | SUMMARY:libssp = "GNU stack smashing protection library" |
| 228 | FILES:libssp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 229 | ${libdir}/libssp*.so \ |
| 230 | ${libdir}/libssp*_nonshared.a \ |
| 231 | ${libdir}/libssp*.la \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 232 | ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 233 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 234 | SUMMARY:libssp-dev = "GNU stack smashing protection library - development files" |
| 235 | FILES:libssp-staticdev = "${libdir}/libssp*.a" |
| 236 | SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 237 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 238 | FILES:libquadmath = "${libdir}/libquadmath*.so.*" |
| 239 | SUMMARY:libquadmath = "GNU quad-precision math library" |
| 240 | FILES:libquadmath-dev = "\ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 241 | ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 242 | ${libdir}/libquadmath*.so \ |
| 243 | ${libdir}/libquadmath.la \ |
| 244 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 245 | SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files" |
| 246 | FILES:libquadmath-staticdev = "${libdir}/libquadmath.a" |
| 247 | SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 248 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 249 | FILES:libgomp = "${libdir}/libgomp*${SOLIBS}" |
| 250 | SUMMARY:libgomp = "GNU OpenMP parallel programming library" |
| 251 | FILES:libgomp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 252 | ${libdir}/libgomp*${SOLIBSDEV} \ |
| 253 | ${libdir}/libgomp*.la \ |
| 254 | ${libdir}/libgomp.spec \ |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 255 | ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 256 | ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \ |
| 257 | ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 258 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 259 | SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files" |
| 260 | FILES:libgomp-staticdev = "${libdir}/libgomp*.a" |
| 261 | SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 262 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 263 | FILES:libatomic = "${libdir}/libatomic.so.*" |
| 264 | SUMMARY:libatomic = "GNU C++11 atomics support library" |
| 265 | FILES:libatomic-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 266 | ${libdir}/libatomic.so \ |
| 267 | ${libdir}/libatomic.la \ |
| 268 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 269 | SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files" |
| 270 | FILES:libatomic-staticdev = "${libdir}/libatomic.a" |
| 271 | SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 272 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 273 | FILES:libitm = "${libdir}/libitm.so.*" |
| 274 | SUMMARY:libitm = "GNU transactional memory support library" |
| 275 | FILES:libitm-dev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 276 | ${libdir}/libitm.so \ |
| 277 | ${libdir}/libitm.la \ |
| 278 | ${libdir}/libitm.spec \ |
| 279 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 280 | SUMMARY:libitm-dev = "GNU transactional memory support library - development files" |
| 281 | FILES:libitm-staticdev = "${libdir}/libitm.a" |
| 282 | SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 283 | |
| 284 | require gcc-testsuite.inc |
| 285 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 286 | EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} " |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 287 | |
| 288 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" |
| 289 | # prettyprinters and xmethods require gdb tooling |
| 290 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" |
| 291 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" |
| 292 | |
| 293 | # specific host and target dependencies required for test suite running |
| 294 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" |
| 295 | do_check[depends] += "virtual/libc:do_populate_sysroot" |
| 296 | # only depend on qemu if targeting linux user execution |
| 297 | do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}" |
| 298 | # extend the recipe sysroot to include the built libraries (for qemu usermode) |
| 299 | do_check[prefuncs] += "extend_recipe_sysroot" |
| 300 | do_check[prefuncs] += "check_prepare" |
| 301 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" |
| 302 | do_check[nostamp] = "1" |
| 303 | do_check() { |
| 304 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" |
| 305 | |
| 306 | # HACK: this works around the configure setting CXX with -nostd* args |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 307 | sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1) |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 308 | |
| 309 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then |
| 310 | # qemu user has issues allocating large amounts of memory |
| 311 | export G_SLICE=always-malloc |
| 312 | # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory |
| 313 | ulimit -m 4194304 |
| 314 | ulimit -v 10485760 |
| 315 | fi |
| 316 | |
| 317 | oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}" |
| 318 | } |
| 319 | addtask check after do_compile do_populate_sysroot |
| 320 | |