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 |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 88 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then |
| 89 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 90 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 91 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include |
| 92 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 93 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 94 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 95 | rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir |
| 96 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then |
| 97 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude |
| 98 | fi |
| 99 | if [ -d ${D}${infodir} ]; then |
| 100 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} |
| 101 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 102 | } |
| 103 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 104 | do_install:append:class-target () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 105 | if [ "${TARGET_OS}" = "linux-gnuspe" ]; then |
| 106 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 107 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 108 | |
| 109 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 110 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 111 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 112 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32 |
| 113 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 114 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 115 | 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] | 116 | else |
| 117 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 118 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 119 | elif [ "${TARGET_OS}" = "linux-gnux32" ]; then |
| 120 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 121 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 122 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32 |
| 123 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 124 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 125 | 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] | 126 | else |
| 127 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 128 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 129 | 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] | 130 | 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] | 131 | ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits |
| 132 | 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] | 133 | fi |
| 134 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 135 | if [ "${TARGET_ARCH}" = "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 136 | ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32 |
| 137 | fi |
| 138 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 139 | if [ "${TCLIBC}" != "glibc" ]; then |
| 140 | case "${TARGET_OS}" in |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 141 | "linux-musl" | "linux-*spe") extra_target_os="linux";; |
| 142 | "linux-musleabi") extra_target_os="linux-gnueabi";; |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 143 | *) extra_target_os="linux";; |
| 144 | esac |
| 145 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os |
| 146 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 147 | chown -R root:root ${D} |
| 148 | } |
| 149 | |
| 150 | INHIBIT_DEFAULT_DEPS = "1" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 151 | 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] | 152 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" |
| 153 | |
| 154 | BBCLASSEXTEND = "nativesdk" |
| 155 | |
| 156 | PACKAGES = "\ |
| 157 | ${PN}-dbg \ |
| 158 | libstdc++ \ |
| 159 | libstdc++-precompile-dev \ |
| 160 | libstdc++-dev \ |
| 161 | libstdc++-staticdev \ |
| 162 | libg2c \ |
| 163 | libg2c-dev \ |
| 164 | libssp \ |
| 165 | libssp-dev \ |
| 166 | libssp-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 167 | libquadmath \ |
| 168 | libquadmath-dev \ |
| 169 | libquadmath-staticdev \ |
| 170 | libgomp \ |
| 171 | libgomp-dev \ |
| 172 | libgomp-staticdev \ |
| 173 | libatomic \ |
| 174 | libatomic-dev \ |
| 175 | libatomic-staticdev \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 176 | libitm \ |
| 177 | libitm-dev \ |
| 178 | libitm-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 179 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 180 | # The base package doesn't exist, so we clear the recommends. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 181 | RRECOMMENDS:${PN}-dbg = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 182 | |
| 183 | # include python debugging scripts |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 184 | FILES:${PN}-dbg += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 185 | ${libdir}/libstdc++.*-gdb.py \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 186 | ${datadir}/gcc-${BINV}/python/libstdcxx \ |
| 187 | " |
| 188 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 189 | FILES:libg2c = "${target_libdir}/libg2c.so.*" |
| 190 | SUMMARY:libg2c = "Companion runtime library for g77" |
| 191 | FILES:libg2c-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 192 | ${libdir}/libg2c.so \ |
| 193 | ${libdir}/libg2c.a \ |
| 194 | ${libdir}/libfrtbegin.a \ |
| 195 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 196 | SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 197 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 198 | FILES:libstdc++ = "${libdir}/libstdc++.so.*" |
| 199 | SUMMARY:libstdc++ = "GNU standard C++ library" |
| 200 | FILES:libstdc++-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 201 | ${includedir}/c++/ \ |
| 202 | ${libdir}/libstdc++.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 203 | ${libdir}/libstdc++*.la \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 204 | ${libdir}/libsupc++.la \ |
| 205 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 206 | SUMMARY:libstdc++-dev = "GNU standard C++ library - development files" |
| 207 | FILES:libstdc++-staticdev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 208 | ${libdir}/libstdc++*.a \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 209 | ${libdir}/libsupc++.a \ |
| 210 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 211 | SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 212 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 213 | FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" |
| 214 | SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 215 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 216 | FILES:libssp = "${libdir}/libssp.so.*" |
| 217 | SUMMARY:libssp = "GNU stack smashing protection library" |
| 218 | FILES:libssp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 219 | ${libdir}/libssp*.so \ |
| 220 | ${libdir}/libssp*_nonshared.a \ |
| 221 | ${libdir}/libssp*.la \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 222 | ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 223 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 224 | SUMMARY:libssp-dev = "GNU stack smashing protection library - development files" |
| 225 | FILES:libssp-staticdev = "${libdir}/libssp*.a" |
| 226 | SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 227 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 228 | FILES:libquadmath = "${libdir}/libquadmath*.so.*" |
| 229 | SUMMARY:libquadmath = "GNU quad-precision math library" |
| 230 | FILES:libquadmath-dev = "\ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 231 | ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 232 | ${libdir}/libquadmath*.so \ |
| 233 | ${libdir}/libquadmath.la \ |
| 234 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 235 | SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files" |
| 236 | FILES:libquadmath-staticdev = "${libdir}/libquadmath.a" |
| 237 | SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 238 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 239 | FILES:libgomp = "${libdir}/libgomp*${SOLIBS}" |
| 240 | SUMMARY:libgomp = "GNU OpenMP parallel programming library" |
| 241 | FILES:libgomp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 242 | ${libdir}/libgomp*${SOLIBSDEV} \ |
| 243 | ${libdir}/libgomp*.la \ |
| 244 | ${libdir}/libgomp.spec \ |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 245 | ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 246 | ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \ |
| 247 | ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \ |
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 | SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files" |
| 250 | FILES:libgomp-staticdev = "${libdir}/libgomp*.a" |
| 251 | SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 252 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 253 | FILES:libatomic = "${libdir}/libatomic.so.*" |
| 254 | SUMMARY:libatomic = "GNU C++11 atomics support library" |
| 255 | FILES:libatomic-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 256 | ${libdir}/libatomic.so \ |
| 257 | ${libdir}/libatomic.la \ |
| 258 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 259 | SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files" |
| 260 | FILES:libatomic-staticdev = "${libdir}/libatomic.a" |
| 261 | SUMMARY:libatomic-staticdev = "GNU C++11 atomics support 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:libitm = "${libdir}/libitm.so.*" |
| 264 | SUMMARY:libitm = "GNU transactional memory support library" |
| 265 | FILES:libitm-dev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 266 | ${libdir}/libitm.so \ |
| 267 | ${libdir}/libitm.la \ |
| 268 | ${libdir}/libitm.spec \ |
| 269 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 270 | SUMMARY:libitm-dev = "GNU transactional memory support library - development files" |
| 271 | FILES:libitm-staticdev = "${libdir}/libitm.a" |
| 272 | SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 273 | |
| 274 | require gcc-testsuite.inc |
| 275 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 276 | EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} " |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 277 | |
| 278 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" |
| 279 | # prettyprinters and xmethods require gdb tooling |
| 280 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" |
| 281 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" |
| 282 | |
| 283 | # specific host and target dependencies required for test suite running |
| 284 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" |
| 285 | do_check[depends] += "virtual/libc:do_populate_sysroot" |
| 286 | # only depend on qemu if targeting linux user execution |
| 287 | do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}" |
| 288 | # extend the recipe sysroot to include the built libraries (for qemu usermode) |
| 289 | do_check[prefuncs] += "extend_recipe_sysroot" |
| 290 | do_check[prefuncs] += "check_prepare" |
| 291 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" |
| 292 | do_check[nostamp] = "1" |
| 293 | do_check() { |
| 294 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" |
| 295 | |
| 296 | # HACK: this works around the configure setting CXX with -nostd* args |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 297 | 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] | 298 | |
| 299 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then |
| 300 | # qemu user has issues allocating large amounts of memory |
| 301 | export G_SLICE=always-malloc |
| 302 | # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory |
| 303 | ulimit -m 4194304 |
| 304 | ulimit -v 10485760 |
| 305 | fi |
| 306 | |
| 307 | oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}" |
| 308 | } |
| 309 | addtask check after do_compile do_populate_sysroot |
| 310 | |