Commit b14397f7 authored by Kenneth Raffenetti's avatar Kenneth Raffenetti
Browse files

patch libtool for ifort on darwin



Recent versions of ifort on darwin will drop flags intended for the
linker unless they are prefixed with "-Wl,". Jeff Hammond checked with
the Intel compiler folks, and they confirmed that "-Wl," has been
supported since the initial ifort release on OSX (9.1).

Closes #2024
Signed-off-by: default avatarJunchao Zhang <jczhang@mcs.anl.gov>
parent 6ce38c27
......@@ -951,7 +951,22 @@ if [ "$do_build_configure" = "yes" ] ; then
fi
fi
if [ $powerpcle_patch_requires_rebuild = "yes" -o $nagfor_patch_requires_rebuild = "yes" ] ; then
# There is no need to patch if we're not going to use Fortran.
ifort_patch_requires_rebuild=no
if [ $do_bindings = "yes" ] ; then
echo_n "Patching libtool.m4 for compatibility with ifort on OSX... "
patch -N -s -l $amdir/confdb/libtool.m4 maint/darwin-ifort.patch
if [ $? -eq 0 ] ; then
ifort_patch_requires_rebuild=yes
# Remove possible leftovers, which don't imply a failure
rm -f $amdir/confdb/libtool.m4.orig
echo "done"
else
echo "failed"
fi
fi
if [ $powerpcle_patch_requires_rebuild = "yes" -o $nagfor_patch_requires_rebuild = "yes" -o $ifort_patch_requires_rebuild = "yes" ] ; then
# Rebuild configure
(cd $amdir && $autoconf -f) || exit 1
# Reset libtool.m4 timestamps to avoid confusing make
......
--- confdb/libtool.m4~ 2014-12-23 10:59:38.000000000 -0600
+++ confdb/libtool.m4 2014-12-23 11:05:54.000000000 -0600
@@ -1097,7 +1097,10 @@
_LT_TAGVAR(link_all_deplibs, $1)=yes
_LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _lt_dar_can_shared=yes
+ ;;
*) _lt_dar_can_shared=$GCC ;;
esac
if test "$_lt_dar_can_shared" = "yes"; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment