Skip to content

Commit

Permalink
recipe: simplify configuration of MPI compiler wrapper flags
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcinl committed Jul 30, 2024
1 parent 1cee4bd commit 02bd70c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions recipe/build-mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export FC=$(basename "$FC")
unset FFLAGS F77 F90 F95

# tweak compiler flags
wrapper_ldflags="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"
export LIBRARY_PATH="$PREFIX/lib"
if [[ "$target_platform" == osx-* ]]; then
# FIXME: remove autogen when autotools patch no longer required
Expand All @@ -22,13 +21,21 @@ if [[ "$target_platform" == osx-* ]]; then
fi
fi

# tweak wrapper flags
wrapper_cflags=""
wrapper_cxxflags=""
wrapper_fcflags=""
wrapper_ldflags=""
if [[ "$target_platform" == linux-* ]]; then
# allow-shlib-undefined required for dependencies to link against older sysroot
# avoids undefined
wrapper_ldflags="-Wl,--allow-shlib-undefined"
fi

# UCX support
build_with_ucx=""
if [[ "$target_platform" == linux-* ]]; then
build_with_ucx="--with-ucx=$PREFIX"
# allow-shlib-undefined required for dependencies to link against older sysroot
# avoids undefined
wrapper_ldflags="${wrapper_ldflags} -Wl,--allow-shlib-undefined"
fi

# CUDA support
Expand Down Expand Up @@ -61,12 +68,7 @@ fi
./configure --prefix=$PREFIX \
--disable-dependency-tracking \
--enable-mpi-fortran \
--disable-wrapper-rpath \
--disable-wrapper-runpath \
--with-mpi-moduledir='${includedir}' \
--with-wrapper-cflags="-I$PREFIX/include" \
--with-wrapper-cxxflags="-I$PREFIX/include" \
--with-wrapper-fcflags="-I$PREFIX/include" \
--with-wrapper-ldflags="${wrapper_ldflags}" \
--with-sge \
--with-hwloc=$PREFIX \
Expand Down

0 comments on commit 02bd70c

Please sign in to comment.