diff --git a/build/unix/makelib.sh b/build/unix/makelib.sh
index 0a1a75f5dc02dbd75c17b0972fac2f4c021aff04..986376b33a1c1d2f0d16c3134876b4efaa0362e4 100755
--- a/build/unix/makelib.sh
+++ b/build/unix/makelib.sh
@@ -33,7 +33,7 @@ rm -f $LIB
 
 if [ $PLATFORM = "macosx" ]; then
    macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
-   if [ $macosx_minor -ge 5 ]; then
+   if [ $macosx_minor -ge 5 ] && [ $LD != "icpc" ]; then
       soext="so"
    else
       soext="dylib"
diff --git a/config/Makefile.macosxicc b/config/Makefile.macosxicc
index cff077142618cf313e378813e8d56ead358f162e..f2ea57ac07251471d5d7445e5869c23d3486bee6 100644
--- a/config/Makefile.macosxicc
+++ b/config/Makefile.macosxicc
@@ -79,11 +79,12 @@ ifeq ($(subst $(MACOSX_MINOR),,123),123)
 SOFLAGS       = $(OPT) -dynamiclib -single_module \
                 -undefined dynamic_lookup -install_name $(LIBDIR)/
 endif
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-SOEXT         = so
-else
+#ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
+# not yet supported by icc 10.1 xilibtool
+#SOEXT         = so
+#else
 SOEXT         = dylib
-endif
+#endif
 
 # System libraries:
 SYSLIBS       = -lm $(EXTRA_LDFLAGS) $(OSTHREADLIBDIR) \
diff --git a/test/Makefile.arch b/test/Makefile.arch
index d21482eec26dc0e85d308f496237a4f56da49b5a..f9f726f5e01ca870a1d7c59eb926899c729ae6fa 100644
--- a/test/Makefile.arch
+++ b/test/Makefile.arch
@@ -422,6 +422,9 @@ ifeq ($(ARCH),macosxicc)
 # MacOS X with Intel icc compiler
 MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
 MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
+ifeq ($(MACOSX_MINOR),5)
+MACOSX_MINOR := 4
+endif
 CXX           = icc
 CXXFLAGS      = $(OPT) -fPIC -wd1476
 LD            = $(MACOSXTARGET) icpc