diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-12-12 13:16:51 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-12-14 16:03:08 +0100 |
commit | cd7c8e42c6ea9e1c35443e3587810d3528b26fb7 (patch) | |
tree | e9f5e083fe4ff297b84efa2d52454f3b84785d0a /pkgs/development/compilers | |
parent | 3430b0e859ef75a2c3caa23c4c337e16f5094c0f (diff) | |
download | nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar.gz nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar.bz2 nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar.lz nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar.xz nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.tar.zst nixlib-cd7c8e42c6ea9e1c35443e3587810d3528b26fb7.zip |
cudatoolkit: fix build with newer glibc versions
Packages that use CUDA would fail to build with missing defines.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/cudatoolkit/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index 62b2e7c18508..fd8930bc8547 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -94,6 +94,9 @@ let # Change the #error on GCC > 4.9 to a #warning. sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/' + # Fix builds with newer glibc version + sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h" + # Ensure that cmake can find CUDA. mkdir -p $out/nix-support echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook |