summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-07-28 13:21:24 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-07-28 13:39:10 -0700
commit7a5b1e22b731c65eb2ce1c4fc188bab00ac4ae8d (patch)
tree564cff9c6cb29044536a6e7c2636e0b0df5dda36 /cflags.SH
parentba36554e02872e48d146177a57a9cfb154727fae (diff)
downloadperl-7a5b1e22b731c65eb2ce1c4fc188bab00ac4ae8d.tar.gz
Exempt clang from -Wunused-value when run as cc
We already have an exception for it when called as clang or clang-1.2.3, but not when called as cc or anything else. Mac OS X Mountain Lion therefore ends up spitting out lots of warnings, as cc is a symlink to clang.
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH9
1 files changed, 9 insertions, 0 deletions
diff --git a/cflags.SH b/cflags.SH
index b377ece5a5..e1c409dafc 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -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