summaryrefslogtreecommitdiff
path: root/src/coreclr/hosts/unixcorerun
diff options
context:
space:
mode:
authorGeoff Norton <grompf@gmail.com>2015-04-26 15:32:22 -0700
committerGeoff Norton <grompf@gmail.com>2015-04-26 15:32:22 -0700
commit12656262569d4925aa480a3adb6685c56cb20c49 (patch)
treefbf7031f581c4accf8a34158ce2a5b74d7a4c28b /src/coreclr/hosts/unixcorerun
parentfb91a041e174116074d21c6bd610eb1f8df71079 (diff)
downloadcoreclr-12656262569d4925aa480a3adb6685c56cb20c49.tar.gz
coreclr-12656262569d4925aa480a3adb6685c56cb20c49.tar.bz2
coreclr-12656262569d4925aa480a3adb6685c56cb20c49.zip
Complete FreeBSD bringup
Fixes issue #801 which was caused by the CoreCLR and PAL being dlopened, but pthread not being initialized by the runtime linker yet. FreeBSD requires that the main executable load pthread, rather than a downstream dependency. Also fixed a few missing calls to pthread_attr_init which was causing asserts() on FBSD.
Diffstat (limited to 'src/coreclr/hosts/unixcorerun')
-rw-r--r--src/coreclr/hosts/unixcorerun/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/coreclr/hosts/unixcorerun/CMakeLists.txt b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
index 6ad4102d3e..e82f0e2d97 100644
--- a/src/coreclr/hosts/unixcorerun/CMakeLists.txt
+++ b/src/coreclr/hosts/unixcorerun/CMakeLists.txt
@@ -22,6 +22,13 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
)
endif(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+# FreeBSD requires pthread to be loaded by the executable process
+if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+ target_link_libraries(corerun
+ pthread
+ )
+endif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+
add_dependencies(corerun
coreclr
)