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 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | # Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3" |
| 6 | # All gcc-runtime packages are now covered by the runtime exception. |
| 7 | LICENSE = "GPL-3.0-with-GCC-exception" |
| 8 | |
| 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 | |
| 17 | EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 18 | EXTRA_OECONF_append = " --cache-file=${B}/config.cache" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 20 | # Disable ifuncs for libatomic on arm conflicts -march/-mcpu |
| 21 | EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no " |
| 22 | |
| 23 | # Building with thumb enabled on armv6t fails |
| 24 | ARM_INSTRUCTION_SET_armv6 = "arm" |
| 25 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 26 | RUNTIMELIBITM = "libitm" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | RUNTIMELIBITM_arc = "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | RUNTIMELIBITM_mipsarch = "" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 29 | RUNTIMELIBITM_nios2 = "" |
| 30 | RUNTIMELIBITM_microblaze = "" |
Brad Bishop | 0011132 | 2018-04-01 22:23:53 -0400 | [diff] [blame] | 31 | RUNTIMELIBITM_riscv32 = "" |
| 32 | RUNTIMELIBITM_riscv64 = "" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | RUNTIMELIBSSP ?= "" |
| 34 | RUNTIMELIBSSP_mingw32 ?= "libssp" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 35 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 37 | ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ |
| 38 | " |
| 39 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | # libiberty |
| 41 | # libmudflap |
| 42 | # libgfortran needs separate recipe due to libquadmath dependency |
| 43 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" |
| 45 | SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" |
| 46 | |
| 47 | DEBUG_PREFIX_MAP_class-target = " \ |
| 48 | -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \ |
| 49 | -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \ |
| 50 | -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \ |
| 51 | -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \ |
| 52 | -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \ |
| 53 | -fdebug-prefix-map=${B}=${SLIB_NEW} \ |
| 54 | " |
| 55 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | do_configure () { |
| 57 | export CXX="${CXX} -nostdinc++ -nostdlib++" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | for d in libgcc ${RUNTIMETARGET}; do |
| 59 | echo "Configuring $d" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 60 | rm -rf ${B}/${TARGET_SYS}/$d/ |
| 61 | mkdir -p ${B}/${TARGET_SYS}/$d/ |
| 62 | cd ${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 63 | chmod a+x ${S}/$d/configure |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 64 | relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 65 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 66 | if [ "$d" = "libgcc" ]; then |
| 67 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) |
| 68 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | done |
| 70 | } |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 71 | EXTRACONFFUNCS += "extract_stashed_builddir" |
| 72 | do_configure[depends] += "${COMPILERDEP}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 73 | |
| 74 | do_compile () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 75 | for d in libgcc ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 76 | cd ${B}/${TARGET_SYS}/$d/ |
| 77 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 78 | done |
| 79 | } |
| 80 | |
| 81 | do_install () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 82 | for d in ${RUNTIMETARGET}; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 83 | cd ${B}/${TARGET_SYS}/$d/ |
| 84 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | done |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 86 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then |
| 87 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 88 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include |
| 89 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include |
| 90 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 91 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 92 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 93 | rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir |
| 94 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then |
| 95 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude |
| 96 | fi |
| 97 | if [ -d ${D}${infodir} ]; then |
| 98 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} |
| 99 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | do_install_append_class-target () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 103 | if [ "${TARGET_OS}" = "linux-gnuspe" ]; then |
| 104 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 105 | fi |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 106 | |
| 107 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 108 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 109 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 110 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32 |
| 111 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 112 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 113 | 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] | 114 | else |
| 115 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 116 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 117 | elif [ "${TARGET_OS}" = "linux-gnux32" ]; then |
| 118 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
| 119 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
| 120 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32 |
| 121 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
| 122 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 123 | 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] | 124 | else |
| 125 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
| 126 | fi |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 127 | 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] | 128 | 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] | 129 | ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits |
| 130 | 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] | 131 | fi |
| 132 | |
| 133 | if [ "${TCLIBC}" != "glibc" ]; then |
| 134 | case "${TARGET_OS}" in |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 135 | "linux-musl" | "linux-*spe") extra_target_os="linux";; |
| 136 | "linux-musleabi") extra_target_os="linux-gnueabi";; |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 137 | *) extra_target_os="linux";; |
| 138 | esac |
| 139 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os |
| 140 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 141 | chown -R root:root ${D} |
| 142 | } |
| 143 | |
| 144 | INHIBIT_DEFAULT_DEPS = "1" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 145 | 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] | 146 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" |
| 147 | |
| 148 | BBCLASSEXTEND = "nativesdk" |
| 149 | |
| 150 | PACKAGES = "\ |
| 151 | ${PN}-dbg \ |
| 152 | libstdc++ \ |
| 153 | libstdc++-precompile-dev \ |
| 154 | libstdc++-dev \ |
| 155 | libstdc++-staticdev \ |
| 156 | libg2c \ |
| 157 | libg2c-dev \ |
| 158 | libssp \ |
| 159 | libssp-dev \ |
| 160 | libssp-staticdev \ |
| 161 | libmudflap \ |
| 162 | libmudflap-dev \ |
| 163 | libmudflap-staticdev \ |
| 164 | libquadmath \ |
| 165 | libquadmath-dev \ |
| 166 | libquadmath-staticdev \ |
| 167 | libgomp \ |
| 168 | libgomp-dev \ |
| 169 | libgomp-staticdev \ |
| 170 | libatomic \ |
| 171 | libatomic-dev \ |
| 172 | libatomic-staticdev \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 173 | libitm \ |
| 174 | libitm-dev \ |
| 175 | libitm-staticdev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 176 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 177 | # The base package doesn't exist, so we clear the recommends. |
| 178 | RRECOMMENDS_${PN}-dbg = "" |
| 179 | |
| 180 | # include python debugging scripts |
| 181 | FILES_${PN}-dbg += "\ |
| 182 | ${libdir}/libstdc++.so.*-gdb.py \ |
| 183 | ${datadir}/gcc-${BINV}/python/libstdcxx \ |
| 184 | " |
| 185 | |
| 186 | FILES_libg2c = "${target_libdir}/libg2c.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 187 | SUMMARY_libg2c = "Companion runtime library for g77" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 188 | FILES_libg2c-dev = "\ |
| 189 | ${libdir}/libg2c.so \ |
| 190 | ${libdir}/libg2c.a \ |
| 191 | ${libdir}/libfrtbegin.a \ |
| 192 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 193 | SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 194 | |
| 195 | FILES_libstdc++ = "${libdir}/libstdc++.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 196 | SUMMARY_libstdc++ = "GNU standard C++ library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 197 | FILES_libstdc++-dev = "\ |
| 198 | ${includedir}/c++/ \ |
| 199 | ${libdir}/libstdc++.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 200 | ${libdir}/libstdc++*.la \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 201 | ${libdir}/libsupc++.la \ |
| 202 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 203 | SUMMARY_libstdc++-dev = "GNU standard C++ library - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 204 | FILES_libstdc++-staticdev = "\ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 205 | ${libdir}/libstdc++*.a \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | ${libdir}/libsupc++.a \ |
| 207 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 208 | SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 209 | |
| 210 | FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 211 | SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 212 | |
| 213 | FILES_libssp = "${libdir}/libssp.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 214 | SUMMARY_libssp = "GNU stack smashing protection library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 215 | FILES_libssp-dev = "\ |
| 216 | ${libdir}/libssp*.so \ |
| 217 | ${libdir}/libssp*_nonshared.a \ |
| 218 | ${libdir}/libssp*.la \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 219 | ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 220 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 221 | SUMMARY_libssp-dev = "GNU stack smashing protection library - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 222 | FILES_libssp-staticdev = "${libdir}/libssp*.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 223 | SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 224 | |
| 225 | FILES_libquadmath = "${libdir}/libquadmath*.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 226 | SUMMARY_libquadmath = "GNU quad-precision math library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 227 | FILES_libquadmath-dev = "\ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 228 | ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 229 | ${libdir}/libquadmath*.so \ |
| 230 | ${libdir}/libquadmath.la \ |
| 231 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 232 | SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 233 | FILES_libquadmath-staticdev = "${libdir}/libquadmath.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 234 | SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 235 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 236 | # NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 237 | FILES_libmudflap = "${libdir}/libmudflap*.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 238 | SUMMARY_libmudflap = "Pointer debugging library for gcc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 239 | FILES_libmudflap-dev = "\ |
| 240 | ${libdir}/libmudflap*.so \ |
| 241 | ${libdir}/libmudflap.la \ |
| 242 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 243 | SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 244 | FILES_libmudflap-staticdev = "${libdir}/libmudflap.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 245 | SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 246 | |
| 247 | FILES_libgomp = "${libdir}/libgomp*${SOLIBS}" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 248 | SUMMARY_libgomp = "GNU OpenMP parallel programming library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 249 | FILES_libgomp-dev = "\ |
| 250 | ${libdir}/libgomp*${SOLIBSDEV} \ |
| 251 | ${libdir}/libgomp*.la \ |
| 252 | ${libdir}/libgomp.spec \ |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 253 | ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \ |
| 254 | ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 255 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 256 | SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 257 | FILES_libgomp-staticdev = "${libdir}/libgomp*.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 258 | SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 259 | |
| 260 | FILES_libatomic = "${libdir}/libatomic.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 261 | SUMMARY_libatomic = "GNU C++11 atomics support library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 262 | FILES_libatomic-dev = "\ |
| 263 | ${libdir}/libatomic.so \ |
| 264 | ${libdir}/libatomic.la \ |
| 265 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 266 | SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 267 | FILES_libatomic-staticdev = "${libdir}/libatomic.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 268 | SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 269 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 270 | FILES_libitm = "${libdir}/libitm.so.*" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 271 | SUMMARY_libitm = "GNU transactional memory support library" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 272 | FILES_libitm-dev = "\ |
| 273 | ${libdir}/libitm.so \ |
| 274 | ${libdir}/libitm.la \ |
| 275 | ${libdir}/libitm.spec \ |
| 276 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 277 | SUMMARY_libitm-dev = "GNU transactional memory support library - development files" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 278 | FILES_libitm-staticdev = "${libdir}/libitm.a" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 279 | SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 280 | |
| 281 | require gcc-testsuite.inc |
| 282 | |
| 283 | EXTRA_OEMAKE_prepend_task-check = "${PARALLEL_MAKE} " |
| 284 | |
| 285 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" |
| 286 | # prettyprinters and xmethods require gdb tooling |
| 287 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" |
| 288 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" |
| 289 | |
| 290 | # specific host and target dependencies required for test suite running |
| 291 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" |
| 292 | do_check[depends] += "virtual/libc:do_populate_sysroot" |
| 293 | # only depend on qemu if targeting linux user execution |
| 294 | do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}" |
| 295 | # extend the recipe sysroot to include the built libraries (for qemu usermode) |
| 296 | do_check[prefuncs] += "extend_recipe_sysroot" |
| 297 | do_check[prefuncs] += "check_prepare" |
| 298 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" |
| 299 | do_check[nostamp] = "1" |
| 300 | do_check() { |
| 301 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" |
| 302 | |
| 303 | # HACK: this works around the configure setting CXX with -nostd* args |
| 304 | sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1) |
| 305 | # HACK: this works around the de-stashing changes to configargs.h, as well as recipe-sysroot changing the content |
| 306 | sed -i '/static const char configuration_arguments/d' ${B}/gcc/configargs.h |
| 307 | ${CC} -v 2>&1 | grep "^Configured with:" | \ |
| 308 | sed 's/Configured with: \(.*\)/static const char configuration_arguments[] = "\1";/g' >> ${B}/gcc/configargs.h |
| 309 | |
| 310 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then |
| 311 | # qemu user has issues allocating large amounts of memory |
| 312 | export G_SLICE=always-malloc |
| 313 | # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory |
| 314 | ulimit -m 4194304 |
| 315 | ulimit -v 10485760 |
| 316 | fi |
| 317 | |
| 318 | oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}" |
| 319 | } |
| 320 | addtask check after do_compile do_populate_sysroot |
| 321 | |