From 34bab2b0caa6ee955d5d2f7882a6cd36cf142536 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 18 Jan 2016 17:29:58 +0100 Subject: Allow user to pass NVCCFLAGS to configure --- build/linux/acinclude.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build/linux/acinclude.m4') diff --git a/build/linux/acinclude.m4 b/build/linux/acinclude.m4 index e4b6de7..d6866c3 100644 --- a/build/linux/acinclude.m4 +++ b/build/linux/acinclude.m4 @@ -93,13 +93,13 @@ int main() { } _ACEOF $1="yes" -ASTRA_RUN_STOREOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2],conftest.nvcc.out) || { +ASTRA_RUN_STOREOUTPUT([$NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$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_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu $$2 $NVCC_OPT]) && { + ASTRA_RUN_LOGOUTPUT([$NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$2 $NVCC_OPT]) && { $1="yes" $2="$$2 $NVCC_OPT" } @@ -133,7 +133,7 @@ IFS=, for arch in $1; do IFS=$astra_save_IFS NVCC_opt="-gencode=arch=compute_$arch,code=sm_$arch" - $NVCC -c -o conftest.o conftest.cu $$2 $NVCC_opt >conftest.nvcc.out 2>&1 && { + $NVCC -c -o conftest.o conftest.cu $NVCCFLAGS $$2 $NVCC_opt >conftest.nvcc.out 2>&1 && { NVCC_lastarch=$arch NVCC_extra="$NVCC_extra $NVCC_opt" NVCC_list="${NVCC_list:+$NVCC_list, }$arch" -- cgit v1.2.3