From 2133b11083c9b7c671c2ee175461d9a206c87a29 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Thu, 19 Jun 2008 19:35:52 +0200 Subject: [PATCH] Newer Intel compilers do not grok -KPIC any more. * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] : Use -fPIC, newer Intel compilers (icc 10, ifort 9) reject -KPIC. * tests/localization.at: Skip test if the compiler fails merely due to the locale setting. * THANKS: Update. Report by Vincent Lefevre. Signed-off-by: Ralf Wildenhues --- ChangeLog | 9 +++++++++ THANKS | 1 + libltdl/m4/libtool.m4 | 18 ++++++++++++++---- tests/localization.at | 4 ++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 826d92a8a..4d003e655 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-19 Ralf Wildenhues + + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] : + Use -fPIC, newer Intel compilers (icc 10, ifort 9) reject -KPIC. + * tests/localization.at: Skip test if the compiler fails merely + due to the locale setting. + * THANKS: Update. + Report by Vincent Lefevre. + 2008-06-17 Ralf Wildenhues * doc/libtool.texi (Linking executables, Static libraries) diff --git a/THANKS b/THANKS index c6726c6b1..602376db8 100644 --- a/THANKS +++ b/THANKS @@ -135,6 +135,7 @@ Tom Tromey tromey@cygnus.com Tor Lillqvist tml@iki.fi Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de + Vincent Lefevre vincent@vinc17.org Xavier Pianet xavier@xingo.com Юрий Андреевич Пухальский pooh@cryptopro.ru diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 103269d7e..04d95a33c 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -3697,12 +3697,19 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc* | ecpc* ) - # Intel C++ + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -3968,12 +3975,15 @@ m4_if([$1], [CXX], [ linux* | k*bsd*-gnu) case $cc_basename in - icc* | ecc*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - ifort*) + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' diff --git a/tests/localization.at b/tests/localization.at index 311aca743..d489fefa6 100644 --- a/tests/localization.at +++ b/tests/localization.at @@ -38,6 +38,10 @@ AT_DATA([b.c], [[int y; ]]) +# First see if setting a locale is accepted at all. +AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], [stdout], [stderr]) + +# Find out about expected output. AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr]) mv -f stdout expected-stdout mv -f stderr expected-stderr -- 2.47.2