forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gridaphobe/darwin-stdenv
fix some packages that won't build in the darwin-clang-stdenv
- Loading branch information
Showing
12 changed files
with
125 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/configure b/configure | ||
index d45e88f..25d872b 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -322,7 +322,14 @@ case "$bytecc,$target" in | ||
bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" | ||
mathlib="";; | ||
*,*-*-darwin*) | ||
- bytecccompopts="-fno-defer-pop $gcc_warnings" | ||
+ # On recent version of OSX, gcc is a symlink to clang | ||
+ if $bytecc --version | grep -q clang; then | ||
+ # -fno-defer-pop is not supported by clang, and make recent | ||
+ # versions of clang to fail | ||
+ bytecccompopts="$gcc_warnings" | ||
+ else | ||
+ bytecccompopts="-fno-defer-pop $gcc_warnings" | ||
+ fi | ||
mathlib="" | ||
mkexe="$mkexe -Wl,-no_compact_unwind" | ||
# Tell gcc that we can use 32-bit code addresses for threaded code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
diff --git a/boost/atomic/detail/cas128strong.hpp b/boost/atomic/detail/cas128strong.hpp | ||
index 906c13e..dcb4d7d 100644 | ||
--- a/boost/atomic/detail/cas128strong.hpp | ||
+++ b/boost/atomic/detail/cas128strong.hpp | ||
@@ -196,15 +196,17 @@ class base_atomic<T, void, 16, Sign> | ||
|
||
public: | ||
BOOST_DEFAULTED_FUNCTION(base_atomic(void), {}) | ||
- explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) | ||
+ explicit base_atomic(value_type const& v) BOOST_NOEXCEPT | ||
{ | ||
+ memset(&v_, 0, sizeof(v_)); | ||
memcpy(&v_, &v, sizeof(value_type)); | ||
} | ||
|
||
void | ||
store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type value_s = 0; | ||
+ storage_type value_s; | ||
+ memset(&value_s, 0, sizeof(value_s)); | ||
memcpy(&value_s, &value, sizeof(value_type)); | ||
platform_fence_before_store(order); | ||
platform_store128(value_s, &v_); | ||
@@ -247,7 +249,9 @@ class base_atomic<T, void, 16, Sign> | ||
memory_order success_order, | ||
memory_order failure_order) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type expected_s = 0, desired_s = 0; | ||
+ storage_type expected_s, desired_s; | ||
+ memset(&expected_s, 0, sizeof(expected_s)); | ||
+ memset(&desired_s, 0, sizeof(desired_s)); | ||
memcpy(&expected_s, &expected, sizeof(value_type)); | ||
memcpy(&desired_s, &desired, sizeof(value_type)); | ||
|
||
diff --git a/boost/atomic/detail/gcc-atomic.hpp b/boost/atomic/detail/gcc-atomic.hpp | ||
index a130590..4af99a1 100644 | ||
--- a/boost/atomic/detail/gcc-atomic.hpp | ||
+++ b/boost/atomic/detail/gcc-atomic.hpp | ||
@@ -958,14 +958,16 @@ class base_atomic<T, void, 16, Sign> | ||
|
||
public: | ||
BOOST_DEFAULTED_FUNCTION(base_atomic(void), {}) | ||
- explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) | ||
+ explicit base_atomic(value_type const& v) BOOST_NOEXCEPT | ||
{ | ||
+ memset(&v_, 0, sizeof(v_)); | ||
memcpy(&v_, &v, sizeof(value_type)); | ||
} | ||
|
||
void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type tmp = 0; | ||
+ storage_type tmp; | ||
+ memset(&tmp, 0, sizeof(tmp)); | ||
memcpy(&tmp, &v, sizeof(value_type)); | ||
__atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); | ||
} | ||
@@ -980,7 +982,8 @@ class base_atomic<T, void, 16, Sign> | ||
|
||
value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type tmp = 0; | ||
+ storage_type tmp; | ||
+ memset(&tmp, 0, sizeof(tmp)); | ||
memcpy(&tmp, &v, sizeof(value_type)); | ||
tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order)); | ||
value_type res; | ||
@@ -994,7 +997,9 @@ class base_atomic<T, void, 16, Sign> | ||
memory_order success_order, | ||
memory_order failure_order) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type expected_s = 0, desired_s = 0; | ||
+ storage_type expected_s, desired_s; | ||
+ memset(&expected_s, 0, sizeof(expected_s)); | ||
+ memset(&desired_s, 0, sizeof(desired_s)); | ||
memcpy(&expected_s, &expected, sizeof(value_type)); | ||
memcpy(&desired_s, &desired, sizeof(value_type)); | ||
const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false, | ||
@@ -1010,7 +1015,9 @@ class base_atomic<T, void, 16, Sign> | ||
memory_order success_order, | ||
memory_order failure_order) volatile BOOST_NOEXCEPT | ||
{ | ||
- storage_type expected_s = 0, desired_s = 0; | ||
+ storage_type expected_s, desired_s; | ||
+ memset(&expected_s, 0, sizeof(expected_s)); | ||
+ memset(&desired_s, 0, sizeof(desired_s)); | ||
memcpy(&expected_s, &expected, sizeof(value_type)); | ||
memcpy(&desired_s, &desired, sizeof(value_type)); | ||
const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters