[ovs-dev] autoconf test OVS_ENABLE_OPTION fails to detect options unsupported by clang

Ed Maste emaste at freebsd.org
Fri Jun 21 14:03:21 UTC 2013

In clang's attempt to be GCC compatible it ignores, but does not fail
on, unknown -W options.  Configure then ends up added the option to
WARNING_FLAGS, and the warning is then emitted for every file

>From config.log:

configure:7388: checking whether clang accepts -Wno-override-init
configure:7406: clang -c -g -O2 -Wno-override-init  conftest.c >&5
clang: warning: unknown warning option '-Wno-override-init'; did you
mean '-Wno-over-aligned'?
warning: unknown warning option '-Wno-override-init'; did you mean
'-Wno-over-aligned'? [-Wunknown-warning-option]
1 warning generated.
configure:7406: $? = 0

With a quick search I didn't find a canonical way to test this in
autoconf, although adding -Werror does change the return value to 1 in
this case.

More information about the dev mailing list