summaryrefslogtreecommitdiff
path: root/src/coreclr
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-01-22 16:16:21 +0100
committerKamil Rytarowski <n54@gmx.com>2016-01-22 17:01:51 +0100
commit6a552280632a087ce3724a2c7329405ed1369b14 (patch)
tree3d99869c2c3e17a9b0ec298922cf0f05206c84c2 /src/coreclr
parent431f7ff1150561a9d27e29c155706e279328446a (diff)
downloadcoreclr-6a552280632a087ce3724a2c7329405ed1369b14.tar.gz
coreclr-6a552280632a087ce3724a2c7329405ed1369b14.tar.bz2
coreclr-6a552280632a087ce3724a2c7329405ed1369b14.zip
NetBSD: Don't link with -ldl for dlopen(3) on NetBSD
NAME dlopen, dlclose, dlsym, dlvsym, dladdr, dlctl, dlerror - dynamic link interface LIBRARY (These functions are not in a library. They are included in every dynamically linked program automatically.) SYNOPSIS #include <dlfcn.h> void * dlopen(const char *path, int mode);
Diffstat (limited to 'src/coreclr')
-rw-r--r--src/coreclr/hosts/unixcoreconsole/CMakeLists.txt6
-rw-r--r--src/coreclr/hosts/unixcorerun/CMakeLists.txt6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
index ec5f0e7f6b..f4840edf38 100644
--- a/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
+++ b/src/coreclr/hosts/unixcoreconsole/CMakeLists.txt
@@ -12,12 +12,12 @@ add_executable(coreconsole
${CORECONSOLE_SOURCES}
)
-# FreeBSD implements dlopen in libc
-if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+# FreeBSD and NetBSD implement dlopen(3) in libc
+if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
target_link_libraries(coreconsole
dl
)
-endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
# Libc turns locks into no-ops if pthread was not loaded into process yet. Loading
# pthread by the process executable ensures that all locks are initialized properly.
diff --git a/src/coreclr/hosts/unixcorerun/CMakeLists.txt b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
index 48da17c9e0..4563ba9938 100644
--- a/src/coreclr/hosts/unixcorerun/CMakeLists.txt
+++ b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
@@ -12,12 +12,12 @@ add_executable(corerun
${CORERUN_SOURCES}
)
-# FreeBSD implements dlopen in libc
-if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+# FreeBSD and NetBSD implement dlopen(3) in libc
+if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
target_link_libraries(corerun
dl
)
-endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
# Libc turns locks into no-ops if pthread was not loaded into process yet. Loading
# pthread by the process executable ensures that all locks are initialized properly.