[vlc-commits] m4: fix c++ check for -f flags
Filip Roséen
git at videolan.org
Fri Feb 24 00:22:56 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu Feb 23 14:54:17 2017 +0100| [c1ec8734036319d18f87555bc1b728e46299c54a] | committer: Jean-Baptiste Kempf
m4: fix c++ check for -f flags
Both gcc and clang generate warnings for unsupported -f$FLAG by
default, meaning that the previous implementation would consider
unsupported flags as supported (as a warning is not an error that
fails compilation).
The addition of -Werror treats warnings as errors, and will prevent
false-positives in terms of -f$FLAG support.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1ec8734036319d18f87555bc1b728e46299c54a
---
m4/flags.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/flags.m4 b/m4/flags.m4
index 0a5c7c9..0907f3b 100644
--- a/m4/flags.m4
+++ b/m4/flags.m4
@@ -48,7 +48,7 @@ AC_DEFUN([RDC_PROG_CXX_FLAGS_IFELSE],
CXXFLAGS_save="${CXXFLAGS}"
as_ac_var=`echo "ac_cv_prog_cxx_flags_$1" | $as_tr_sh`
AC_CACHE_CHECK([if $CXX accepts $1], [$as_ac_var], [
- CXXFLAGS="${CXXFLAGS} $1"
+ CXXFLAGS="${CXXFLAGS} -Werror $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
eval "$as_ac_var=yes"
],[
More information about the vlc-commits
mailing list