Skip to content

Commit

Permalink
opal: disable code patcher if --disable-dlopen
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Hjelm <[email protected]>
  • Loading branch information
hjelmn committed Mar 28, 2016
1 parent df6a4a3 commit 5000b45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/opal_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ else
OPAL_ENABLE_DLOPEN_SUPPORT=1
AC_MSG_RESULT([yes])
fi

AC_DEFINE_UNQUOTED(OPAL_ENABLE_DLOPEN_SUPPORT, $OPAL_ENABLE_DLOPEN_SUPPORT,
[Whether we want to enable dlopen support])

#
# Heterogeneous support
Expand Down
4 changes: 2 additions & 2 deletions opal/util/opal_patcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <dlfcn.h>
#include <assert.h>

#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
#if OPAL_ENABLE_DLOPEN_SUPPORT && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))

static void flush_and_invalidate_cache (unsigned long a)
{
Expand Down Expand Up @@ -202,7 +202,7 @@ bool opal_patch_supported (void)

/* end of #if defined(__i386__) || defined(__x86_64__) || defined(__ia64__) */
// ------------------------------------------------- PPC equivalent:
#elif defined(__PPC__)
#elif OPAL_ENABLE_DLOPEN_SUPPORT && defined(__PPC__)

static inline uintptr_t addr_text (uintptr_t addr) {
#if (defined(__PPC64__) || defined(__powerpc64__) || defined(__PPC__)) && _CALL_ELF != 2
Expand Down

0 comments on commit 5000b45

Please sign in to comment.