From 7fbc0825773eb597c5a3f5679a8d58ced0d9456f Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Tue, 29 Aug 2017 01:46:13 +0100 Subject: compat/cuda/ptx2c: strip CR from each line Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which need to be stripped to work with gcc. Signed-off-by: Timo Rothenpieler --- compat/cuda/ptx2c.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compat') diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh index 1f37023290..5ccabbf56f 100755 --- a/compat/cuda/ptx2c.sh +++ b/compat/cuda/ptx2c.sh @@ -29,7 +29,7 @@ NAME="$(basename "$IN" | sed 's/\..*//')" printf "const char %s_ptx[] = \\" "$NAME" > "$OUT" while read LINE do - printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed 's/["\\]/\\&/g')" >> "$OUT" + printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed -e 's/\r//g' -e 's/["\\]/\\&/g')" >> "$OUT" done < "$IN" printf ";\n" >> "$OUT" -- cgit v1.2.1