From 7a5b1e22b731c65eb2ce1c4fc188bab00ac4ae8d Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 28 Jul 2013 13:21:24 -0700 Subject: 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. --- cflags.SH | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cflags.SH') 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 -- cgit v1.2.1