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 = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | RUNTIMELIBSSP ?= "" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | RUNTIMELIBSSP:mingw32 ?= "libssp" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 43 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 45 | ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ |
| 46 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 47 | # Only build libstdc++ for newlib |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | RUNTIMETARGET:libc-newlib = "libstdc++-v3" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 49 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | # libiberty |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | # libgfortran needs separate recipe due to libquadmath dependency |
| 52 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 53 | # Relative path to be repaced into debug info |
| 54 | REL_S = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 55 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | DEBUG_PREFIX_MAP:class-target = " \ |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 57 | -fdebug-prefix-map=${WORKDIR}/${MLPREFIX}recipe-sysroot= \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 58 | -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 59 | -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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 65 | " |
| 66 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 67 | do_configure () { |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 68 | 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 Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 72 | ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o |
| 73 | ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 74 | for d in libgcc ${RUNTIMETARGET}; do |
| 75 | echo "Configuring $d" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 76 | rm -rf ${B}/${TARGET_SYS}/$d/ |
| 77 | mkdir -p ${B}/${TARGET_SYS}/$d/ |
| 78 | cd ${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 79 | chmod a+x ${S}/$d/configure |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 80 | relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 81 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 82 | 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | done |
| 86 | } |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 87 | EXTRACONFFUNCS += "extract_stashed_builddir" |
| 88 | do_configure[depends] += "${COMPILERDEP}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 89 | |
| 90 | do_compile () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 91 | for d in libgcc ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 92 | cd ${B}/${TARGET_SYS}/$d/ |
| 93 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 94 | done |
| 95 | } |
| 96 | |
| 97 | do_install () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 98 | for d in ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 99 | cd ${B}/${TARGET_SYS}/$d/ |
| 100 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 101 | done |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 102 | 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 107 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 108 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 109 | 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 116 | } |
| 117 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 118 | do_install:append:class-target () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 119 | if [ "${TARGET_OS}" = "linux-gnuspe" ]; then |
| 120 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 121 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 122 | |
| 123 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 124 | 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 130 | else |
| 131 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 132 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 133 | 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 140 | else |
| 141 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 142 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 143 | 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] | 144 | 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] | 145 | 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 147 | fi |
| 148 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 149 | 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 153 | if [ "${TCLIBC}" != "glibc" ]; then |
| 154 | case "${TARGET_OS}" in |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 155 | "linux-musl" | "linux-*spe") extra_target_os="linux";; |
| 156 | "linux-musleabi") extra_target_os="linux-gnueabi";; |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 157 | *) 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 161 | chown -R root:root ${D} |
| 162 | } |
| 163 | |
| 164 | INHIBIT_DEFAULT_DEPS = "1" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 165 | 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] | 166 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" |
| 167 | |
| 168 | BBCLASSEXTEND = "nativesdk" |
| 169 | |
| 170 | PACKAGES = "\ |
| 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 181 | libquadmath \ |
| 182 | libquadmath-dev \ |
| 183 | libquadmath-staticdev \ |
| 184 | libgomp \ |
| 185 | libgomp-dev \ |
| 186 | libgomp-staticdev \ |
| 187 | libatomic \ |
| 188 | libatomic-dev \ |
| 189 | libatomic-staticdev \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 190 | libitm \ |
| 191 | libitm-dev \ |
| 192 | libitm-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 193 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 194 | # The base package doesn't exist, so we clear the recommends. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 195 | RRECOMMENDS:${PN}-dbg = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 196 | |
| 197 | # include python debugging scripts |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 198 | FILES:${PN}-dbg += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 199 | ${libdir}/libstdc++.*-gdb.py \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 200 | ${datadir}/gcc-${BINV}/python/libstdcxx \ |
| 201 | " |
| 202 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 203 | FILES:libg2c = "${target_libdir}/libg2c.so.*" |
| 204 | SUMMARY:libg2c = "Companion runtime library for g77" |
| 205 | FILES:libg2c-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | ${libdir}/libg2c.so \ |
| 207 | ${libdir}/libg2c.a \ |
| 208 | ${libdir}/libfrtbegin.a \ |
| 209 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 210 | SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 211 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 212 | FILES:libstdc++ = "${libdir}/libstdc++.so.*" |
| 213 | SUMMARY:libstdc++ = "GNU standard C++ library" |
| 214 | FILES:libstdc++-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 215 | ${includedir}/c++/ \ |
| 216 | ${libdir}/libstdc++.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 217 | ${libdir}/libstdc++*.la \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 218 | ${libdir}/libsupc++.la \ |
| 219 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 220 | SUMMARY:libstdc++-dev = "GNU standard C++ library - development files" |
| 221 | FILES:libstdc++-staticdev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 222 | ${libdir}/libstdc++*.a \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 223 | ${libdir}/libsupc++.a \ |
| 224 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 225 | SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 226 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 227 | FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" |
| 228 | SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 229 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 230 | FILES:libssp = "${libdir}/libssp.so.*" |
| 231 | SUMMARY:libssp = "GNU stack smashing protection library" |
| 232 | FILES:libssp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 233 | ${libdir}/libssp*.so \ |
| 234 | ${libdir}/libssp*_nonshared.a \ |
| 235 | ${libdir}/libssp*.la \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 236 | ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \ |
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 | SUMMARY:libssp-dev = "GNU stack smashing protection library - development files" |
| 239 | FILES:libssp-staticdev = "${libdir}/libssp*.a" |
| 240 | SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 241 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 242 | FILES:libquadmath = "${libdir}/libquadmath*.so.*" |
| 243 | SUMMARY:libquadmath = "GNU quad-precision math library" |
| 244 | FILES:libquadmath-dev = "\ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 245 | ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 246 | ${libdir}/libquadmath*.so \ |
| 247 | ${libdir}/libquadmath.la \ |
| 248 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 249 | SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files" |
| 250 | FILES:libquadmath-staticdev = "${libdir}/libquadmath.a" |
| 251 | SUMMARY:libquadmath-staticdev = "GNU quad-precision math 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:libgomp = "${libdir}/libgomp*${SOLIBS}" |
| 254 | SUMMARY:libgomp = "GNU OpenMP parallel programming library" |
| 255 | FILES:libgomp-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 256 | ${libdir}/libgomp*${SOLIBSDEV} \ |
| 257 | ${libdir}/libgomp*.la \ |
| 258 | ${libdir}/libgomp.spec \ |
Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 259 | ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 260 | ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \ |
| 261 | ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \ |
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 | SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files" |
| 264 | FILES:libgomp-staticdev = "${libdir}/libgomp*.a" |
| 265 | SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 266 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 267 | FILES:libatomic = "${libdir}/libatomic.so.*" |
| 268 | SUMMARY:libatomic = "GNU C++11 atomics support library" |
| 269 | FILES:libatomic-dev = "\ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 270 | ${libdir}/libatomic.so \ |
| 271 | ${libdir}/libatomic.la \ |
| 272 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 273 | SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files" |
| 274 | FILES:libatomic-staticdev = "${libdir}/libatomic.a" |
| 275 | SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 276 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 277 | FILES:libitm = "${libdir}/libitm.so.*" |
| 278 | SUMMARY:libitm = "GNU transactional memory support library" |
| 279 | FILES:libitm-dev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 280 | ${libdir}/libitm.so \ |
| 281 | ${libdir}/libitm.la \ |
| 282 | ${libdir}/libitm.spec \ |
| 283 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 284 | SUMMARY:libitm-dev = "GNU transactional memory support library - development files" |
| 285 | FILES:libitm-staticdev = "${libdir}/libitm.a" |
| 286 | SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 287 | |
| 288 | require gcc-testsuite.inc |
| 289 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 290 | EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} " |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 291 | |
| 292 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" |
| 293 | # prettyprinters and xmethods require gdb tooling |
| 294 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" |
| 295 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" |
| 296 | |
| 297 | # specific host and target dependencies required for test suite running |
| 298 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" |
| 299 | do_check[depends] += "virtual/libc:do_populate_sysroot" |
| 300 | # only depend on qemu if targeting linux user execution |
| 301 | do_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) |
| 303 | do_check[prefuncs] += "extend_recipe_sysroot" |
| 304 | do_check[prefuncs] += "check_prepare" |
| 305 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" |
| 306 | do_check[nostamp] = "1" |
| 307 | do_check() { |
| 308 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" |
| 309 | |
| 310 | # HACK: this works around the configure setting CXX with -nostd* args |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 311 | 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] | 312 | |
| 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 | } |
| 323 | addtask check after do_compile do_populate_sysroot |
| 324 | |