nixpkgs/pkgs/development/r-modules/patches/rpud.patch
Bjørn Forsman 22321f2e58 cudatoolkit: don't move $out/include to $out/usr_include
This effectively reverts 86c283824f
("If cuda headers are presented to nix [...]") and all the following
workarounds that was added due to that commit.

As far as I can tell[1] this hack isn't needed anymore. And moving
includes to $out/usr_include causes pain for cudatoolkit users, so
better get rid of it.

In patches that did more than the $out/usr_include workaround, I only
changed the line back to $out/include instead of re-generating the
patches and fully removing the changed line.

[1]: I build tested blender and caffe, and temporarily added
recurseIntoAttrs to rPackages and haskellPackages so that nox-review
could get proper coverage. However, many of the packages do not build
even before this patch. I also built CUDA samples with cudatoolkit7
that ran fine.
2015-09-10 10:35:40 +02:00

29 lines
930 B
Diff

diff -ru -x '*~' rpud_orig/configure rpud/configure
--- rpud_orig/configure 2010-09-08 02:14:55.000000000 +0900
+++ rpud/configure 2014-10-25 16:46:39.479098648 +0900
@@ -1794,7 +1794,7 @@
fi
LIBS="-L${CUDA_HOME}${CUDA_LIB_DIR} -lcublas -lcuda"
-RPATHFLAG="-Wl,-rpath,${CUDA_HOME}${CUDA_LIB_DIR}"
+RPATHFLAG="-Xlinker -rpath=${CUDA_HOME}${CUDA_LIB_DIR}"
diff -ru -x '*~' rpud_orig/src/Makefile.in rpud/src/Makefile.in
--- rpud_orig/src/Makefile.in 2010-08-31 01:53:50.000000000 +0900
+++ rpud/src/Makefile.in 2014-10-25 16:45:30.248109883 +0900
@@ -3,11 +3,11 @@
OBJS := rpud.o rpudist.o
#compiler/preprocessor options
-INCS := -I@CUDA_HOME@/include
+INCS := -I@CUDA_HOME@/include
PARAMS := -Xcompiler "@R_INCLUDE@ @CPICFLAGS@"
#linker options
-LD_PARAMS := -Xlinker "@R_LIB@ @RPATHFLAG@"
+LD_PARAMS := -Xlinker "--export-dynamic -fopenmp -L${R_HOME}/lib -lR @RPATHFLAG@"
LIBS := @LIBS@
TARGETS := rpud.so