Ticket #9019: 0001-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch

File 0001-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch, 1.3 KB (added by dbigler, 6 years ago)

Patch that fixes the problem using xxd.

  • compat/cuda/ptx2c.sh

    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"  
    2626IN="$2"
    2727NAME="$(basename "$IN" | sed 's/\..*//')"
    2828
    29 printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
     29printf "const char %s_ptx[] = {\\" "$NAME" > "$OUT"
    3030echo >> "$OUT"
    31 sed -e "$(printf 's/\r//g')" -e 's/["\\]/\\&/g' -e "$(printf 's/^/\t"/')" -e 's/$/\\n"/' < "$IN" >> "$OUT"
    32 echo ";" >> "$OUT"
     31xxd -i < "$IN" >> "$OUT"
     32echo "  ,0x00" >> "$OUT"
     33echo "};" >> "$OUT"
    3334
    3435exit 0
  • configure

    diff --git a/configure b/configure
    index 1b1b140d6f..048e02355f 100755
    a b test_nvcc(){  
    10501050    tmpo_=$TMPO
    10511051    [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
    10521052    test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
     1053    test_cmd xxd
    10531054}
    10541055
    10551056check_nvcc() {