forked from mirrors/nixpkgs
cudatoolkit: fix build with newer glibc versions
Packages that use CUDA would fail to build with missing defines.
This commit is contained in:
parent
3430b0e859
commit
cd7c8e42c6
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue