diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-02-25 10:42:18 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-02-25 10:52:51 +0100 |
commit | 7dda95b08055350bd5525b0ff196769be82b4450 (patch) | |
tree | 99473ae52037c94b8b576ebaf0796b077f439f66 | |
parent | f619aba4543de6b9a4fe6fb63b6f1840ef509846 (diff) | |
download | astra-7dda95b08055350bd5525b0ff196769be82b4450.tar.gz astra-7dda95b08055350bd5525b0ff196769be82b4450.tar.bz2 astra-7dda95b08055350bd5525b0ff196769be82b4450.tar.xz astra-7dda95b08055350bd5525b0ff196769be82b4450.zip |
Improve logging for nvcc hack
-rw-r--r-- | build/linux/acinclude.m4 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/build/linux/acinclude.m4 b/build/linux/acinclude.m4 index 4ff9e4b..713b5d3 100644 --- a/build/linux/acinclude.m4 +++ b/build/linux/acinclude.m4 @@ -60,8 +60,14 @@ AC_DEFUN([ASTRA_RUN_STOREOUTPUT],[{ test $ac_status = 0; }]) -dnl ASTRA_RUN(command) -AC_DEFUN([ASTRA_RUN],[ASTRA_RUN_STOREOUTPUT($1,/dev/null)]) +dnl ASTRA_RUN_LOGOUTPUT(command) +AC_DEFUN([ASTRA_RUN_LOGOUTPUT],[{ + AS_ECHO(["$as_me:${as_lineno-$LINENO}: $1"]) >&AS_MESSAGE_LOG_FD + ( $1 ) >&AS_MESSAGE_LOG_FD 2>&1 + ac_status=$? + AS_ECHO(["$as_me:${as_lineno-$LINENO}: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD + test $ac_status = 0; + }]) @@ -79,9 +85,9 @@ ASTRA_RUN_STOREOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2],conftest.nvcc.out $1="no" # Check if hack for gcc 4.4 helps if grep -q __builtin_stdarg_start conftest.nvcc.out; then + AS_ECHO(["$as_me:${as_lineno-$LINENO}: Trying CUDA hack for gcc 4.4"]) >&AS_MESSAGE_LOG_FD NVCC_OPT="-Xcompiler -D__builtin_stdarg_start=__builtin_va_start" - - ASTRA_RUN([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && { + ASTRA_RUN_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && { $1="yes" $2="$$2 $NVCC_OPT" } @@ -94,6 +100,7 @@ fi rm -f conftest.cu conftest.o conftest.nvcc.out ]) + dnl ASTRA_FIND_NVCC_ARCHS(archs-to-try,cppflags-to-extend,output-list) dnl Architectures should be of the form 10,20,30,35, dnl and should be in order. The last accepted one will be used for PTX output. |