[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] patch for Intel C++ compiler

From: Allan Sandfeld Jensen
Subject: patch for Intel C++ compiler
Date: Thu, 23 May 2002 23:58:47 +0200
User-agent: KMail/1.4.5


 I made a patch for supporting Intel's C and C++ compiler against in KDE-CVS, but I was told we more less used libtool from your 
cvs, and I therefore should go to the source.

I have attached the patch (I hope it applies) If you have questions or 
comments please CC me since I am not a member of this mailing-list.


---- support for Intel C++ compiler v6.0:
Besides some simple extentions of existing case statement, I have changed the 
override of build_libtool_need_lc from yes to no for non-gcc compilers. The 
reason is compilation breaks if -lc is specified to icc and I guess gcc is 
the only compiler that needs this silly hack. A better solution might be to 
remove the override since this flag is set a few places in the architecture 
specific code.

There is also one remaining issue with the generated libtool: One case (the 
first) of wl is still set to "". I can figure out where this instance is set.

RCS file: /home/kde/kde-common/admin/,v
retrieving revision 1.73
diff -u -3 -p -r1.73
---       2002/05/16 18:16:13     1.73
+++       2002/05/18 19:16:09
@@ -2364,7 +2364,7 @@ compiler="[$]2"
 _LT_AC_TAGVAR(compiler, $1)=$CC
 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-# We don't want -fno-exception wen compiling C++ code, so set the
+# We don't want -fno-exception when compiling C++ code, so set the
 # no_builtin_flag separately
 if test "$GXX" = yes; then
   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
@@ -2710,6 +2710,17 @@ case $host_os in
        # dependencies.
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v 
conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed 
"s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in 
conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; echo $list'
+      icc|icpc)
+       # Intel C++
+       # -Tused tells icpc to instantiate all used templates.
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -Tused $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname,$soname -o 
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname,$soname  -o 
$lib ${wl}-retain-symbols-file,$export_symbols'
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+       runpath_var=LD_RUN_PATH
+        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+       ;;
@@ -4021,6 +4032,12 @@ AC_MSG_CHECKING([for $compiler option to
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+         icc|icpc)
+           # Intel C++
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption,ld,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
@@ -5036,7 +5073,7 @@ fi
 # Do we need to explicitly link libc?
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 if test "$enable_shared" = yes && test "$GCC" = yes; then
   case $_LT_AC_TAGVAR(archive_cmds, $1) in

reply via email to

[Prev in Thread] Current Thread [Next in Thread]