From 374540f18c065b05f6a5293271bd3b0ce0557666 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 11 Sep 2014 17:37:55 +0200 Subject: [PATCH] Fix flags for darwin's gcc which is actually clang --- configure.ac | 14 +++++++++++--- mediastreamer2 | 2 +- oRTP | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 78fe9a105..675c4c08f 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],) AC_SUBST([docdir], [${datadir}/doc]) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIR([m4]) -dnl don't put anythingelse before AC_PROG_CC unless checking if macro still work for clang +dnl do not put anythingelse before AC_PROG_CC unless checking if macro still work for clang AC_PROG_CXX(["xcrun clang++" g++]) AC_PROG_CC(["xcrun clang" gcc]) @@ -207,7 +207,7 @@ if test "$enable_ldap" = "true"; then if test "$found_ldap$found_sasl" = "yesyes"; then AC_DEFINE(BUILD_LDAP,1,[Defined if LDAP build option enabled]) else - AC_MSG_ERROR([Can't use LDAP due to previous errors]) + AC_MSG_ERROR([Cannot use LDAP due to previous errors]) fi fi @@ -673,7 +673,15 @@ case $CC in STRICT_OPTIONS="$STRICT_OPTIONS -Wno-array-bounds " ;; esac - +# because Darwin's gcc is actually clang, we need to check it... +case "$target_os" in + *darwin*) + STRICT_OPTIONS="$STRICT_OPTIONS -Wno-error=unknown-warning-option -Qunused-arguments -Wno-tautological-compare -Wno-unused-function " + #disabled due to wrong optimization false positive with small string + #(cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903) + STRICT_OPTIONS="$STRICT_OPTIONS -Wno-array-bounds " + ;; +esac if test "$strictness" = "yes" ; then STRICT_OPTIONS="$STRICT_OPTIONS -Werror" CFLAGS="$CFLAGS -fno-strict-aliasing" diff --git a/mediastreamer2 b/mediastreamer2 index 417ec0f12..bac391639 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 417ec0f125c6399dd51a226b9da1b9f221a3ac6e +Subproject commit bac391639600f85893bcd0a8cd8cc2ca81ca41cf diff --git a/oRTP b/oRTP index f38aebd6e..7c2a32967 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit f38aebd6e534b5e2fba0aec33c196561a9f5db8e +Subproject commit 7c2a3296743dd89b126c9e1c8ecf2d7f8d769db6