From f77f5b3c659f9c26347bb23eee36b94c51863e44 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Wed, 3 Dec 2014 19:17:44 -0500 Subject: [PATCH] add workaround for NULL __dso_handle --- ...cal-workaround-for-NULL-__dso_handle.patch | 25 +++++++++++++++++++ recipes/rust/rust_0.12.0+2014-12-02.bb | 1 + 2 files changed, 26 insertions(+) create mode 100644 recipes/rust/files/0020-std-thread_local-workaround-for-NULL-__dso_handle.patch diff --git a/recipes/rust/files/0020-std-thread_local-workaround-for-NULL-__dso_handle.patch b/recipes/rust/files/0020-std-thread_local-workaround-for-NULL-__dso_handle.patch new file mode 100644 index 0000000..23c0240 --- /dev/null +++ b/recipes/rust/files/0020-std-thread_local-workaround-for-NULL-__dso_handle.patch @@ -0,0 +1,25 @@ +From 4003a6e93e558fb327879b1d500bdbaa85ae06ae Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Wed, 3 Dec 2014 19:15:19 -0500 +Subject: [PATCH] std/thread_local: workaround for NULL __dso_handle + +--- + src/libstd/thread_local/mod.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs +index e2e8461..2bf891e 100644 +--- a/src/libstd/thread_local/mod.rs ++++ b/src/libstd/thread_local/mod.rs +@@ -308,7 +308,7 @@ mod imp { + #[linkage = "extern_weak"] + static __cxa_thread_atexit_impl: *const (); + } +- if !__cxa_thread_atexit_impl.is_null() { ++ if !__cxa_thread_atexit_impl.is_null() && !__dso_handle.is_null() { + type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8), + arg: *mut u8, + dso_handle: *mut u8) -> libc::c_int; +-- +2.1.3 + diff --git a/recipes/rust/rust_0.12.0+2014-12-02.bb b/recipes/rust/rust_0.12.0+2014-12-02.bb index 91a871f..9c01141 100644 --- a/recipes/rust/rust_0.12.0+2014-12-02.bb +++ b/recipes/rust/rust_0.12.0+2014-12-02.bb @@ -13,4 +13,5 @@ SRC_URI_append = "\ file://0009-XXX-remove-conflicting-realpath-hack.patch \ file://0010-XXX-configure-unneeded-windows-check.patch \ file://0011-Parallelize-submake-invocations.patch \ + file://0020-std-thread_local-workaround-for-NULL-__dso_handle.patch \ "