From: Ralf Wildenhues Date: Sun, 13 Sep 2009 09:00:31 +0000 (+0200) Subject: Initial support for the Cuda Compiler Driver on Linux. X-Git-Tag: v2.2.7b~56 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=741a9867eb71eb258ca1ed5b85bc7f03ce864195;p=thirdparty%2Flibtool.git Initial support for the Cuda Compiler Driver on Linux. * libltdl/config/ltmain.m4sh (func_mode_compile): Accept source file extensions `.cu' and `.cup'. * libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC) (_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver. * NEWS, THANKS: Update. Report by Mahesh Narayanamurthi. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 70ea1c140..12ca0852b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-09-18 Ralf Wildenhues + + Initial support for the Cuda Compiler Driver on Linux. + * libltdl/config/ltmain.m4sh (func_mode_compile): Accept source + file extensions `.cu' and `.cup'. + * libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC) + (_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver. + * NEWS, THANKS: Update. + Report by Mahesh Narayanamurthi. + 2009-09-12 Dave Korn Control where win32 DLLs get installed. diff --git a/NEWS b/NEWS index f96a7179d..78433789b 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team: - Initial support for compilers on BlueGene BG/L. - Improved support for Atari FreeMiNT. - With binutils 2.19.50+, shared libraries can be built on AIX. + - Initial support for the Cuda Compiler Driver on GNU/Linux. * Bug fixes: diff --git a/THANKS b/THANKS index 54c989bd2..7731a82bb 100644 --- a/THANKS +++ b/THANKS @@ -120,6 +120,7 @@ Kurt D. Zeilenga Kurt@OpenLDAP.Org Maciej Helminiak dion2@wp.pl Maciej W. Rozycki macro@linux-mips.org + Mahesh Narayanamurthi mahesh.mach@gmail.com Manfred Weichel Manfred.Weichel@pdb.siemens.de Marc Espie espie@nerim.net Marc J. Fraioli fraioli@dg-rtp.dg.com diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index ab9492824..f1bf43fb8 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -783,7 +783,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index a8c186b37..02f5b5dee 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -3287,7 +3287,12 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3939,6 +3944,13 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -4424,6 +4436,10 @@ _LT_EOF xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9