diff options
author | Zoltán Böszörményi <zboszor@gmail.com> | 2023-06-07 09:27:07 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-06-08 14:08:55 -0700 |
commit | aceaf2bfdaa98bc364ac13e8dd85ead831966216 (patch) | |
tree | f1dee91e65220fb4ac04fbb30bf0861cb1904993 | |
parent | deaa4c111fd3cb12dd7d6cba0550316d71dd8b07 (diff) | |
download | meta-openembedded-aceaf2bfdaa98bc364ac13e8dd85ead831966216.tar.gz |
mpich: Upgrade to 4.1.1
mpich 4.1+ has its own official way to allow cross-compiling,
use it.
Remove the old PACKAGECONFIG[x11], the configuration option
does not exist anymore.
Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN
parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't
enable either by default to keep the current minimalistic build.
Remove configuration options that don't exist in the new version.
Fix TMPDIR being emitted into binaries and scripts like mpicc and mpicxx
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 67 |
2 files changed, 67 insertions, 58 deletions
diff --git a/meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb b/meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted file mode 100644 index 000f739812..0000000000 --- a/meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | SUMMARY = "Message Passing Interface (MPI) implementation" | ||
2 | HOMEPAGE = "http://www.mpich.org/" | ||
3 | SECTION = "devel" | ||
4 | |||
5 | LICENSE = "BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163" | ||
7 | |||
8 | SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" | ||
9 | SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501" | ||
10 | |||
11 | RDEPENDS:${PN} += "bash perl libxml2" | ||
12 | |||
13 | EXTRA_OECONF = "--enable-debuginfo \ | ||
14 | --enable-fast \ | ||
15 | --enable-shared \ | ||
16 | --with-pm=gforker \ | ||
17 | --disable-rpath \ | ||
18 | --disable-f77 \ | ||
19 | --disable-fc \ | ||
20 | --disable-fortran \ | ||
21 | --disable-cxx \ | ||
22 | BASH_SHELL='${USRBINPATH}/env bash' \ | ||
23 | PERL='${USRBINPATH}/env perl' \ | ||
24 | --with-device=ch3:nemesis \ | ||
25 | --with-rdmacm=no \ | ||
26 | --disable-numa \ | ||
27 | " | ||
28 | |||
29 | PACKAGECONFIG += " \ | ||
30 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ | ||
31 | " | ||
32 | PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11" | ||
33 | |||
34 | # libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang | ||
35 | LDFLAGS:append:x86-64 = " -lgcc" | ||
36 | LDFLAGS:append:x86 = " -lgcc" | ||
37 | |||
38 | inherit autotools gettext pkgconfig | ||
39 | |||
40 | do_configure() { | ||
41 | for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \ | ||
42 | src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \ | ||
43 | modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \ | ||
44 | test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb; do | ||
45 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d | ||
46 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d | ||
47 | done | ||
48 | # cd ${S} | ||
49 | # autoupdate | ||
50 | # autoreconf --verbose --install --force | ||
51 | # cd ${B} | ||
52 | oe_runconf | ||
53 | } | ||
54 | |||
55 | do_install:append() { | ||
56 | sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la | ||
57 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc | ||
58 | } | ||
diff --git a/meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb b/meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file mode 100644 index 0000000000..cd13b91d7b --- /dev/null +++ b/meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | |||
@@ -0,0 +1,67 @@ | |||
1 | SUMMARY = "Message Passing Interface (MPI) implementation" | ||
2 | HOMEPAGE = "http://www.mpich.org/" | ||
3 | SECTION = "devel" | ||
4 | |||
5 | LICENSE = "BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3" | ||
7 | |||
8 | SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" | ||
9 | SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2" | ||
10 | |||
11 | RDEPENDS:${PN} += "bash perl libxml2" | ||
12 | |||
13 | EXTRA_OECONF = "--enable-debuginfo \ | ||
14 | --enable-fast \ | ||
15 | --enable-shared \ | ||
16 | --with-pm=gforker \ | ||
17 | BASH_SHELL='${USRBINPATH}/env bash' \ | ||
18 | PERL='${USRBINPATH}/env perl' \ | ||
19 | --with-device=ch3:nemesis \ | ||
20 | " | ||
21 | |||
22 | PACKAGECONFIG ??= "" | ||
23 | |||
24 | PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx" | ||
25 | PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fortran,libgfortran" | ||
26 | |||
27 | # libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang | ||
28 | LDFLAGS:append:x86-64 = " -lgcc" | ||
29 | LDFLAGS:append:x86 = " -lgcc" | ||
30 | |||
31 | inherit autotools gettext pkgconfig qemu | ||
32 | |||
33 | DEPENDS += "qemu-native" | ||
34 | |||
35 | do_configure() { | ||
36 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then | ||
37 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
38 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
39 | #!/bin/sh | ||
40 | $qemu_binary "\$@" | ||
41 | EOF | ||
42 | chmod +x ${WORKDIR}/qemuwrapper | ||
43 | |||
44 | sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl | ||
45 | |||
46 | cd ${WORKDIR} | ||
47 | perl ${S}/maint/gen_cross.pl | ||
48 | |||
49 | sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt | ||
50 | fi | ||
51 | |||
52 | cd ${S} | ||
53 | ./autogen.sh | ||
54 | |||
55 | cd ${B} | ||
56 | oe_runconf | ||
57 | sed -i -e 's,${WORKDIR},,g' ${B}/src/include/mpichinfo.h | ||
58 | } | ||
59 | |||
60 | do_install:append() { | ||
61 | sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la | ||
62 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicxx | ||
63 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}${bindir}/mpicc | ||
64 | sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc | ||
65 | sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicc | ||
66 | sed -i 's,${RECIPE_SYSROOT},/,g' ${D}${bindir}/mpicxx | ||
67 | } | ||