diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 917ac0a19c1c2c2a981b179b20ec4d3c8c617356..24a99df2248b6b87449339d396589f36fe29f9a3 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -322,11 +322,13 @@ BASE=$BASE2
 #
 
 if [ x"@GXX@" = x"yes" ] ; then
-  gcclib=`@CC@ @CFLAGS@ --print-libgcc-file`
-  if [ $? -ne 0 ] ; then
-    echo "Warning: Couldn't find libgcc.a!"
-  else
+  gcclib=`@CC@ @CFLAGS@ --print-libgcc-file 2>/dev/null` || true
+  if [ -z "$gcclib" ] ; then
+    echo "Warning: Compiler doesn't tell libgcc.a!"
+  elif [ -f "$gcclib" ] ; then
     $CP $gcclib $BASE/lib/libmygcc.a
+  else
+    echo "Warning: Compiler result '$gcclib' not found / no file!"
   fi
 fi