Skip to content

Commit de92d1b

Browse files
authored
Merge pull request #3506 from hppritcha/topic/fix_issue_1089
configury: add option to disable enable-new-dtags
2 parents 1fe452d + ebb30c1 commit de92d1b

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,10 @@ INSTALLATION OPTIONS
796796
This rpath/runpath behavior can be disabled via
797797
--disable-wrapper-rpath.
798798

799+
If you would like to keep the rpath option, but not enable runpath
800+
a different configure option is avalabile
801+
--disable-wrapper-runpath.
802+
799803
--enable-dlopen
800804
Build all of Open MPI's components as standalone Dynamic Shared
801805
Objects (DSO's) that are loaded at run-time (this is the default).

config/opal_setup_wrappers.m4

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
130130
[enable rpath/runpath support in the wrapper compilers (default=yes)])])
131131
AS_IF([test "$enable_wrapper_rpath" != "no"], [enable_wrapper_rpath=yes])
132132
AC_MSG_RESULT([$enable_wrapper_rpath])
133+
134+
AC_MSG_CHECKING([if want wrapper compiler runpath support])
135+
AC_ARG_ENABLE([wrapper-runpath],
136+
[AS_HELP_STRING([--enable--wrapper-runpath],
137+
[enable runpath in the wrapper compilers if linker supports it (default: enabled, unless wrapper-rpath is disabled).])])
138+
AS_IF([test "$enable_wrapper_runpath" != "no"], [enable_wrapper_runpath=yes])
139+
AC_MSG_RESULT([$enable_wrapper_runpath])
140+
141+
AS_IF([test "$enable_wrapper_rpath" = "no" && test "$enable_wrapper_runpath" = "yes"],
142+
[AC_MSG_ERROR([--enable-wrapper-runpath cannot be selected with --disable-wrapper-rpath])])
133143
])
134144

135145
# Check to see whether the linker supports DT_RPATH. We'll need to
@@ -220,18 +230,19 @@ EOF
220230
AC_DEFUN([OPAL_SETUP_RUNPATH],[
221231
OPAL_VAR_SCOPE_PUSH([LDFLAGS_save rpath_script rpath_outfile wl_fc])
222232

223-
AC_MSG_CHECKING([if linker supports RUNPATH])
224233
# Set the output in $runpath_args
225234
runpath_args=
226235
LDFLAGS_save=$LDFLAGS
227236
LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
228-
AC_LANG_PUSH([C])
229-
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 7;])],
230-
[WRAPPER_RPATH_SUPPORT=runpath
231-
runpath_args="-Wl,--enable-new-dtags"
232-
AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
233-
[AC_MSG_RESULT([no])])
234-
AC_LANG_POP([C])
237+
AS_IF([test x"$enable_wrapper_runpath" = x"yes"],
238+
[AC_LANG_PUSH([C])
239+
AC_MSG_CHECKING([if linker supports RUNPATH])
240+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 7;])],
241+
[WRAPPER_RPATH_SUPPORT=runpath
242+
runpath_args="-Wl,--enable-new-dtags"
243+
AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
244+
[AC_MSG_RESULT([no])])
245+
AC_LANG_POP([C])])
235246
m4_ifdef([project_ompi],[
236247
# Output goes into globally-visible $rpath_args. Run this in a
237248
# sub-process so that we don't pollute the current process

0 commit comments

Comments
 (0)