I use a myriad of FORTRAN compilers, and libtool (to alleviate the myriad of headaches that come along with using a myriad of FORTRAN compilers). Libtool was generating lovely compilations until I moved to ifort 10.X. Intel has deprecated the -KPIC option and now only supports -fPIC option. This causes a problem when I run configure to build libtools, becuase when I compile code using libtool and ifort the -fPIC option is not specified, and at link time I get a symbol rellocation error. I know that the 9.X series of the intel compiler supports -fPIC as well as -KPIC. Would it be possible to have future versions of libtool check for the -fPIC option rather than the -KPIC option. Or better yet, have libtool check for the version of the intel compiler and then select the proper option? The first change is easy, as I did this my self. The second change requires some more thought and may be overkill. Below, is a diff on what I did to get the correct behaviour (Change 1):
address@hidden libtool]$ diff -Naur libtool-2.2.4/configure ~/libtool-2.2.4/configure
--- libtool-2.2.4/configure 2008-05-04 15:07:24.000000000 -0400
+++ /home/aha/libtool-2.2.4/configure 2008-08-05 15:08:57.000000000 -0400
@@ -8069,7 +8069,7 @@
case $cc_basename in
icc* | ecc* | ifort*)
lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_pic='-fPIC'
lt_prog_compiler_static='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95*)
@@ -17363,7 +17363,7 @@
case $cc_basename in
icc* | ecc* | ifort*)
lt_prog_compiler_wl_F77='-Wl,'
- lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_pic_F77='-fPIC'
lt_prog_compiler_static_F77='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95*)
@@ -20291,7 +20291,7 @@
case $cc_basename in
icc* | ecc* | ifort*)
lt_prog_compiler_wl_FC='-Wl,'
- lt_prog_compiler_pic_FC='-KPIC'
+ lt_prog_compiler_pic_FC='-fPIC'
lt_prog_compiler_static_FC='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95*)
@@ -22909,7 +22909,7 @@
case $cc_basename in
icc* | ecc* | ifort*)
lt_prog_compiler_wl_GCJ='-Wl,'
- lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_pic_GCJ='-fPIC'
lt_prog_compiler_static_GCJ='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95*)
Your humble libtool servant.
--
Aquil H. Abdullah
address@hidden