From 6dd12a7210fb4cf2e69b6c83628021d83ba132c3 Mon Sep 17 00:00:00 2001
From: "Don C. Bigler" <don.bigler@framatome.com>
Date: Fri, 4 Dec 2020 12:39:55 -0500
Subject: [PATCH] Patch for ticket #9019 CUDA Compile Broken Using MSVC
Signed-off-by: Don C. Bigler <don.bigler@framatome.com>
---
compat/cuda/ptx2c.sh | 7 ++++---
configure | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh
index 48452379c2..1c486dc30e 100755
|
a
|
b
|
OUT="$1"
|
| 26 | 26 | IN="$2" |
| 27 | 27 | NAME="$(basename "$IN" | sed 's/\..*//')" |
| 28 | 28 | |
| 29 | | printf "const char %s_ptx[] = \\" "$NAME" > "$OUT" |
| | 29 | printf "const char %s_ptx[] = {\\" "$NAME" > "$OUT" |
| 30 | 30 | echo >> "$OUT" |
| 31 | | sed -e "$(printf 's/\r//g')" -e 's/["\\]/\\&/g' -e "$(printf 's/^/\t"/')" -e 's/$/\\n"/' < "$IN" >> "$OUT" |
| 32 | | echo ";" >> "$OUT" |
| | 31 | xxd -i < "$IN" >> "$OUT" |
| | 32 | echo " ,0x00" >> "$OUT" |
| | 33 | echo "};" >> "$OUT" |
| 33 | 34 | |
| 34 | 35 | exit 0 |
diff --git a/configure b/configure
index 1b1b140d6f..048e02355f 100755
|
a
|
b
|
test_nvcc(){
|
| 1050 | 1050 | tmpo_=$TMPO |
| 1051 | 1051 | [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_) |
| 1052 | 1052 | test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_ |
| | 1053 | test_cmd xxd |
| 1053 | 1054 | } |
| 1054 | 1055 | |
| 1055 | 1056 | check_nvcc() { |