This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make OLD_COPY_ON_WRITE handle SvLEN==0 scalars
[perl5.git] / cflags.SH
index 899c465..e1c409d 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -142,7 +142,7 @@ Intel*) ;; # # Is that you, Intel C++?
        case " $ccflags " in
        *" $opt "*) ;; # Skip if already there.
        *) rm -f _cflags$_exe
-          case "`$cc $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in
+          case "`$cc -DPERL_NO_INLINE_FUNCTIONS $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in
           *"unrecognized"*) ;;
           *"implicit declaration"*) ;; # Was something useful hidden?
           *"Invalid"*) ;;
@@ -306,7 +306,7 @@ for file do
     cppflags=`echo $cppflags|sed 's/-Wdeclaration-after-statement/ /'`
 
     case "$cc" in
-    *clang)
+    *clang*)
       # clang complains a lot about -Wunused-value which are not fixable
       warn="$warn -Wno-unused-value"
       ;;
@@ -327,6 +327,15 @@ for file do
         esac
       done
       ;;
+    *)
+      # clang may not be called clang
+      case "`$cc -v 2>&1`" in
+      *clang*)
+        case "$warn" in
+        *-Wno-unused-value) ;;
+        *) warn="$warn -Wno-unused-value"
+        esac
+      esac
     esac