Skip to content

Commit e9a54e8

Browse files
authored
Merge pull request #7268 from hppritcha/topic/fix_6539_master
make mpifort obey disable-wrapper-runpath
2 parents 548ed56 + 37b3e2f commit e9a54e8

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

config/opal_setup_wrappers.m4

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
1515
dnl Copyright (c) 2015-2017 Research Organization for Information Science
1616
dnl and Technology (RIST). All rights reserved.
1717
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
18+
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
19+
dnl reserved.
1820
dnl $COPYRIGHT$
1921
dnl
2022
dnl Additional copyrights may follow
@@ -216,6 +218,7 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[
216218

217219
# Set the output in $runpath_args
218220
runpath_args=
221+
runpath_fc_args=
219222
LDFLAGS_save=$LDFLAGS
220223
LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
221224
AS_IF([test x"$enable_wrapper_runpath" = x"yes"],
@@ -226,17 +229,17 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[
226229
runpath_args="-Wl,--enable-new-dtags"
227230
AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
228231
[AC_MSG_RESULT([no])])
229-
AC_LANG_POP([C])])
230-
m4_ifdef([project_ompi],[
231-
OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[])
232-
233-
LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags"
234-
AC_LANG_PUSH([Fortran])
235-
AC_LINK_IFELSE([AC_LANG_SOURCE([[program test
236-
end program]])],
237-
[runpath_fc_args="${wl_fc}--enable-new-dtags"],
238-
[runpath_fc_args=""])
239-
AC_LANG_POP([Fortran])])
232+
AC_LANG_POP([C])
233+
m4_ifdef([project_ompi],
234+
[OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[])
235+
LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags"
236+
AC_LANG_PUSH([Fortran])
237+
AC_LINK_IFELSE([AC_LANG_SOURCE([[program test end program]])],
238+
[runpath_fc_args="${wl_fc}--enable-new-dtags"
239+
AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
240+
[AC_MSG_RESULT([no])])
241+
AC_LANG_POP([Fortran])])])
242+
240243
LDFLAGS=$LDFLAGS_save
241244

242245
OPAL_VAR_SCOPE_POP

0 commit comments

Comments
 (0)