From 2ce2a2fd8f72f22c64413f18e7944ede89a2be5e Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Thu, 2 Jan 2020 09:06:10 -0700 Subject: [PATCH 1/2] make mpifort obey disable-wrapper-runpath related to #6539 Signed-off-by: Howard Pritchard (cherry picked from commit 37b3e2f3fa7a4971dda64d8d2ff933dc4d4c807d) --- config/opal_setup_wrappers.m4 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/config/opal_setup_wrappers.m4 b/config/opal_setup_wrappers.m4 index 6a3be1fc80b..639531f7f15 100644 --- a/config/opal_setup_wrappers.m4 +++ b/config/opal_setup_wrappers.m4 @@ -15,6 +15,8 @@ dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015-2017 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl Copyright (c) 2016 IBM Corporation. All rights reserved. +dnl Copyright (c) 2020 Triad National Security, LLC. All rights +dnl reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -216,6 +218,7 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[ # Set the output in $runpath_args runpath_args= + runpath_fc_args= LDFLAGS_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags" AS_IF([test x"$enable_wrapper_runpath" = x"yes"], @@ -226,17 +229,17 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[ runpath_args="-Wl,--enable-new-dtags" AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])], [AC_MSG_RESULT([no])]) - AC_LANG_POP([C])]) - m4_ifdef([project_ompi],[ - OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[]) - - LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags" - AC_LANG_PUSH([Fortran]) - AC_LINK_IFELSE([AC_LANG_SOURCE([[program test -end program]])], - [runpath_fc_args="${wl_fc}--enable-new-dtags"], - [runpath_fc_args=""]) - AC_LANG_POP([Fortran])]) + AC_LANG_POP([C]) + m4_ifdef([project_ompi], + [OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[]) + LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags" + AC_LANG_PUSH([Fortran]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[program test end program]])], + [runpath_fc_args="${wl_fc}--enable-new-dtags" + AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])], + [AC_MSG_RESULT([no])]) + AC_LANG_POP([Fortran])])]) + LDFLAGS=$LDFLAGS_save OPAL_VAR_SCOPE_POP From ccde99e24ced39d9760ce08084b13219dc689f28 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 28 Jan 2020 12:34:49 -0700 Subject: [PATCH 2/2] PR 7268 follow-up Forgot to include a fix for the fortran test used to check if new dtags is supported. Related to #7268 Related to #6539 #1089 This patch is already included on v4.0.x branch. Signed-off-by: Howard Pritchard (cherry picked from commit 5354b9b41c8790fc4d4d84e1c59b3a51bf931c01) --- config/opal_setup_wrappers.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/opal_setup_wrappers.m4 b/config/opal_setup_wrappers.m4 index 639531f7f15..77ae5120bbd 100644 --- a/config/opal_setup_wrappers.m4 +++ b/config/opal_setup_wrappers.m4 @@ -234,7 +234,8 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[ [OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[]) LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags" AC_LANG_PUSH([Fortran]) - AC_LINK_IFELSE([AC_LANG_SOURCE([[program test end program]])], + AC_LINK_IFELSE([AC_LANG_SOURCE([[program test +end program]])], [runpath_fc_args="${wl_fc}--enable-new-dtags" AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])], [AC_MSG_RESULT([no])])