Skip to content

Commit

Permalink
mpl: pass MPL's CFLAGS back to MPICH
Browse files Browse the repository at this point in the history
MPL exports additional CFLAGS as MPL_CFLAGS. Only the ones that added
by the MPL configure will be passed. The PAC_CONFIG_MPL macro will add
them to CFLAGS.
  • Loading branch information
yfguo committed Sep 26, 2024
1 parent 1bc18d1 commit 269670b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions confdb/aclocal_modules.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ AC_DEFUN([PAC_CONFIG_MPL],[
PAC_CONFIG_MPL_EMBEDDED
PAC_APPEND_FLAG([-I${main_top_builddir}/src/mpl/include], [CPPFLAGS])
PAC_APPEND_FLAG([-I${use_top_srcdir}/src/mpl/include], [CPPFLAGS])
PAC_APPEND_FLAG([${MPL_CFLAGS}], [CFLAGS])
mplsrcdir="src/mpl"
mpllib="src/mpl/libmpl.la"
], [
Expand Down
4 changes: 4 additions & 0 deletions src/mpl/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ LT_PREREQ([2.2.6])
PAC_PUSH_FLAG([CFLAGS])
LT_INIT()
PAC_POP_FLAG([CFLAGS])
PARENT_CFLAGS=${CFLAGS}

# ----------------------------------------------------------------------------
# Set default library names if names haven't already been provided
Expand Down Expand Up @@ -1405,6 +1406,9 @@ AX_GCC_VAR_ATTRIBUTE(used)

PAC_POP_ALL_FLAGS

MPL_CFLAGS=$(_escaped_prefix=$(echo $PARENT_CFLAGS | sed 's/ /\\ /g') ;; echo $CFLAGS | sed "s/^$_escaped_prefix//")
AC_SUBST(MPL_CFLAGS)

dnl Final output
AC_CONFIG_FILES([Makefile localdefs include/mpl_timer.h])
AC_OUTPUT
1 change: 1 addition & 0 deletions src/mpl/localdefs.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

GPU_SUPPORT="@GPU_SUPPORT@"
CPPFLAGS="@CPPFLAGS@"
MPL_CFLAGS="@MPL_CFLAGS@"
WRAPPER_LIBS="$WRAPPER_LIBS @LDFLAGS@ @LIBS@"
COMPILER_TLS="@COMPILER_TLS@"

0 comments on commit 269670b

Please sign in to comment.