On 6/21/17 9:32 PM, Martin Storsjö wrote:
> Using check_cflags with -Werror parameters in clang is normally
> futile, since the tests always pass, but add new warnings instead.
> 
> Since the check for -Werror=partial-availability is in the OS section
> of configure, we need to try adding this option here as well, not
> in the section adding other warning flags later.
> 
> This fixes warnings about -Werror=partial-availability being unknown
> for each compile command, when building with Xcode 6.
> ---
> Or should this be in an OS-independent step before the whole OS handling
> block in configure, making sure that cflags checks work as intended for
> clang, anywhere in the rest of configure?

Probably keeping it clang-global would be nicer.

I'm ok in having the patch as-is if you do not have time to test.

> ---
>  configure | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure b/configure
> index bbed2258b9..a4b602d8f2 100755
> --- a/configure
> +++ b/configure
> @@ -3972,6 +3972,7 @@ case $target_os in
>          SHFLAGS='-dynamiclib -Wl,-single_module 
> -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
>          enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
>          add_ldflags -Wl,-dynamic,-search_paths_first
> +        enabled clang && check_cflags -Werror=unknown-warning-option
>          check_cflags -Werror=partial-availability
>          SLIBSUF=".dylib"
>          SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
> 

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to