Dear HDF community,

When building HDF4 with icc 12.0.5 I experienced linker errors.

I was able to track them down to configure.ac: If the compiler path in
$CC contained a dash (-) and $CC contained no flags, the full compiler
path was added to the front of the CFLAGS. As a consequence, icc could
not link anymore.

The following patch should fix that (works for me):

- - --- configure.ac        2012-03-01 15:00:28.000000000 +0100
+++ configure.ac        2012-03-01 15:00:40.000000000 +0100
@@ -815,7 +815,7 @@
 dnl Report anything stripped as a flag in CFLAGS and
 dnl only the compiler in CC_VERSION.
 CC_NOFLAGS=`echo $CC | sed 's/ -.*//'`
- - -CFLAGS_TO_ADD=`echo $CC | grep - | sed 's/.* -/-/'`
+CFLAGS_TO_ADD=`echo $CC | grep \ - | sed 's/.* -/-/'`
 if test -n $CFLAGS_TO_ADD; then
   CFLAGS="$CFLAGS_TO_ADD$CFLAGS"
 fi

I hope it proves useful!

Best wishes,
Arne Babenhauserheide

PS: Sorry for only jumping in here without introduction. I just
thought it better to send the patch to you instead of letting it rot
on my disk, and hdf-forum was the most fitting address I could find.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to