Skip to content

Commit 5000b45

Browse files
committed
opal: disable code patcher if --disable-dlopen
Signed-off-by: Nathan Hjelm <[email protected]>
1 parent df6a4a3 commit 5000b45

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config/opal_configure_options.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ else
283283
OPAL_ENABLE_DLOPEN_SUPPORT=1
284284
AC_MSG_RESULT([yes])
285285
fi
286-
286+
AC_DEFINE_UNQUOTED(OPAL_ENABLE_DLOPEN_SUPPORT, $OPAL_ENABLE_DLOPEN_SUPPORT,
287+
[Whether we want to enable dlopen support])
287288

288289
#
289290
# Heterogeneous support

opal/util/opal_patcher.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <dlfcn.h>
2626
#include <assert.h>
2727

28-
#if defined(__i386__) || defined(__x86_64__) || defined(__ia64__)
28+
#if OPAL_ENABLE_DLOPEN_SUPPORT && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
2929

3030
static void flush_and_invalidate_cache (unsigned long a)
3131
{
@@ -202,7 +202,7 @@ bool opal_patch_supported (void)
202202

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

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

0 commit comments

Comments
 (0)