Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Peter O'Gorman
Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.

Hi Chris,

Your config.log confirms that ifort does not define __GNUC__, thanks.

Could you confirm that this patch fixes it.

Peter
-- 
Peter O'Gorman
http://pogma.com
From a33319273b5b70b8dc98c698fe99d039a1873c23 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman [EMAIL PROTECTED]
Date: Fri, 13 Jun 2008 10:53:34 -0500
Subject: [PATCH] Support ifort on darwin.

* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Build
shared libraries with ifort.
Reported by Christopher Hulbert.
---
 ChangeLog |7 +++
 libltdl/m4/libtool.m4 |6 +-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 92b3214..c22304d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-13  Peter O'Gorman  [EMAIL PROTECTED]
+
+	Support ifort on darwin.
+	* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Build
+	shared libraries with ifort.
+	Reported by Christopher Hulbert.
+
 2008-06-01  Charles Wilson  [EMAIL PROTECTED]
 
 	[mingw] fix cross-compile-with-wine case
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 654f54a..103269d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
-  if test $GCC = yes; then
+  case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test $_lt_dar_can_shared = yes; then
 output_verbose_link_cmd=echo
 _LT_TAGVAR(archive_cmds, $1)=\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}
 _LT_TAGVAR(module_cmds, $1)=\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}
-- 
1.5.4.1



Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Christopher Hulbert
On Fri, Jun 13, 2008 at 11:55 AM, Peter O'Gorman [EMAIL PROTECTED] wrote:
 Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.

 Hi Chris,

 Your config.log confirms that ifort does not define __GNUC__, thanks.

 Could you confirm that this patch fixes it.

Yes, the ifort linker now supports shared libraries.

Chris


 Peter
 --
 Peter O'Gorman
 http://pogma.com





Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Peter O'Gorman
Christopher Hulbert wrote:
 On Fri, Jun 13, 2008 at 11:55 AM, Peter O'Gorman [EMAIL PROTECTED] wrote:
 Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.
 Hi Chris,

 Your config.log confirms that ifort does not define __GNUC__, thanks.

 Could you confirm that this patch fixes it.
 
 Yes, the ifort linker now supports shared libraries.

Ok, thanks, I pushed the patch.

Peter
-- 
Peter O'Gorman
http://pogma.com




Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Christopher Hulbert
On Thu, Jun 12, 2008 at 7:42 PM, Bob Friesenhahn
[EMAIL PROTECTED] wrote:
 On Thu, 12 Jun 2008, Christopher Hulbert wrote:

 In libtool 2.2.2, building shared libraries using Intel fortran
 compilers seem to be disabled (although the icc compiler appears to
 say yes). Thus, mixed language shared libraries or purely fortran

 I suspect that this is already fixed for the next release (fix already in
 GIT):

 2008-05-25  Ralf Wildenhues  [EMAIL PROTECTED]

Fix ifort settings again.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] ifort:
Unlike icc and ecc, not all ifort versions understand `-KPIC',
e.g. version 10.1, so use `-fPIC' instead.
Report by Jeff Squyres.

Thanks. I will try the version from git.

Chris


 Bob
 ==
 Bob Friesenhahn
 [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
 GraphicsMagick Maintainer,http://www.GraphicsMagick.org/




___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Christopher Hulbert
On Thu, Jun 12, 2008 at 7:42 PM, Bob Friesenhahn
[EMAIL PROTECTED] wrote:
 On Thu, 12 Jun 2008, Christopher Hulbert wrote:

 In libtool 2.2.2, building shared libraries using Intel fortran
 compilers seem to be disabled (although the icc compiler appears to
 say yes). Thus, mixed language shared libraries or purely fortran

 I suspect that this is already fixed for the next release (fix already in
 GIT):

 2008-05-25  Ralf Wildenhues  [EMAIL PROTECTED]

Fix ifort settings again.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] ifort:
Unlike icc and ecc, not all ifort versions understand `-KPIC',
e.g. version 10.1, so use `-fPIC' instead.
Report by Jeff Squyres.

GIT version still reports that the ifort linker does not support
shared libraries. The config.log is attached.

Chris


 Bob
 ==
 Bob Friesenhahn
 [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
 GraphicsMagick Maintainer,http://www.GraphicsMagick.org/




config.log.gz
Description: GNU Zip compressed data
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Peter O'Gorman
Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.

Hi Chris,

Your config.log confirms that ifort does not define __GNUC__, thanks.

Could you confirm that this patch fixes it.

Peter
-- 
Peter O'Gorman
http://pogma.com
From a33319273b5b70b8dc98c698fe99d039a1873c23 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman [EMAIL PROTECTED]
Date: Fri, 13 Jun 2008 10:53:34 -0500
Subject: [PATCH] Support ifort on darwin.

* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Build
shared libraries with ifort.
Reported by Christopher Hulbert.
---
 ChangeLog |7 +++
 libltdl/m4/libtool.m4 |6 +-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 92b3214..c22304d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-13  Peter O'Gorman  [EMAIL PROTECTED]
+
+	Support ifort on darwin.
+	* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Build
+	shared libraries with ifort.
+	Reported by Christopher Hulbert.
+
 2008-06-01  Charles Wilson  [EMAIL PROTECTED]
 
 	[mingw] fix cross-compile-with-wine case
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 654f54a..103269d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
-  if test $GCC = yes; then
+  case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test $_lt_dar_can_shared = yes; then
 output_verbose_link_cmd=echo
 _LT_TAGVAR(archive_cmds, $1)=\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}
 _LT_TAGVAR(module_cmds, $1)=\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}
-- 
1.5.4.1

___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Christopher Hulbert
On Fri, Jun 13, 2008 at 11:55 AM, Peter O'Gorman [EMAIL PROTECTED] wrote:
 Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.

 Hi Chris,

 Your config.log confirms that ifort does not define __GNUC__, thanks.

 Could you confirm that this patch fixes it.

Yes, the ifort linker now supports shared libraries.

Chris


 Peter
 --
 Peter O'Gorman
 http://pogma.com



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-13 Thread Peter O'Gorman
Christopher Hulbert wrote:
 On Fri, Jun 13, 2008 at 11:55 AM, Peter O'Gorman [EMAIL PROTECTED] wrote:
 Christopher Hulbert wrote:

 GIT version still reports that the ifort linker does not support
 shared libraries. The config.log is attached.
 Hi Chris,

 Your config.log confirms that ifort does not define __GNUC__, thanks.

 Could you confirm that this patch fixes it.
 
 Yes, the ifort linker now supports shared libraries.

Ok, thanks, I pushed the patch.

Peter
-- 
Peter O'Gorman
http://pogma.com


___
http://lists.gnu.org/mailman/listinfo/libtool


shared libraries on darwin using Intel compiler

2008-06-12 Thread Christopher Hulbert
In libtool 2.2.2, building shared libraries using Intel fortran
compilers seem to be disabled (although the icc compiler appears to
say yes). Thus, mixed language shared libraries or purely fortran
shared libraries can't be built. I have the intel 10.1 compilers. As a
quick way to get shared libraries working, I hacked the
_LT_LINKER_SHLIBS function for the darwin case to what's below, but
I'm sure there's a better way of doing this. What would be the more
preferable way of adding support for shared libraries using Intel
fortran compiler? I'm not sure why it works for icc but not ifort.
Using the hack below I can successfully link with the fortran linker
and build the shared library.

Chris

 darwin* | rhapsody*)
-  _LT_DARWIN_LINKER_FEATURES($1)
+  case $cc_basename in
+icc* | ifort*)
+  GCC_save=$GCC
+  GCC=yes
+  _LT_DARWIN_LINKER_FEATURES($1)
+  GCC=$GCC_save
+  ;;
+*)
+  _LT_DARWIN_LINKER_FEATURES($1)
+  ;;
+  esac
   ;;


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-12 Thread Peter O'Gorman
Christopher Hulbert wrote:
 In libtool 2.2.2, building shared libraries using Intel fortran
 compilers seem to be disabled (although the icc compiler appears to
 say yes). Thus, mixed language shared libraries or purely fortran
 shared libraries can't be built. I have the intel 10.1 compilers. As a
 quick way to get shared libraries working, I hacked the
 _LT_LINKER_SHLIBS function for the darwin case to what's below, but
 I'm sure there's a better way of doing this. What would be the more
 preferable way of adding support for shared libraries using Intel
 fortran compiler? I'm not sure why it works for icc but not ifort.
 Using the hack below I can successfully link with the fortran linker
 and build the shared library.

Hi Chris,

I will look at this, but to answer your question about why icc works -
it defines __GNUC__ and behaves almost exactly the same as gcc (I
believe it calls gcc to do its linking), so the existing commands for
gcc work fine with icc.

I am unsure why they do not work with ifort, I would have thought that
would similarly define __GNUC__. Could you please send me a config.log
from a libtool using package (or from libtool itself) without this patch
applied.

Thanks,
Peter
-- 
Peter O'Gorman
http://pogma.com


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: shared libraries on darwin using Intel compiler

2008-06-12 Thread Bob Friesenhahn

On Thu, 12 Jun 2008, Christopher Hulbert wrote:


In libtool 2.2.2, building shared libraries using Intel fortran
compilers seem to be disabled (although the icc compiler appears to
say yes). Thus, mixed language shared libraries or purely fortran


I suspect that this is already fixed for the next release (fix already 
in GIT):


2008-05-25  Ralf Wildenhues  [EMAIL PROTECTED]

Fix ifort settings again.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] ifort:
Unlike icc and ecc, not all ifort versions understand `-KPIC',
e.g. version 10.1, so use `-fPIC' instead.
Report by Jeff Squyres.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/



___
http://lists.gnu.org/mailman/listinfo/libtool