HomeClusterLabs Projects

Fix detection of warning flags for clang

Description

Fix detection of warning flags for clang

Using ./configure CC=clang, the following flags are detected
as supported:

checking whether clang supports "-Wgnu89-inline"... yes
checking whether clang supports "-Wno-strict-aliasing"... yes

Which results in a lot of warnings during make:

warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
warning: unknown warning option '-Wgnu89-inline'
[-Wunknown-warning-option]

Clang doesn't support these flags, but the compile check returns a
warning, not an error:

configure:16649: checking whether clang supports "-Wunsigned-char"
configure:16662: clang -E -Wunsigned-char conftest.c
warning: unknown warning option '-Wunsigned-char'
[-Wunknown-warning-option]
1 warning generated.
configure:16662: $? = 0
configure:16663: result: yes

Use -Wunknown-warning-option -Werror if supported

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
Ruben Kerkhof <ruben@rubenkerkhof.com>Authored on Jan 22 2015, 8:14 PM
jfriesseCommitted on Dec 16 2015, 10:35 AM
Parents
rC5ab922701aee: quorum: Display node id as unsigned int.
Branches
Unknown
Tags
Unknown

Event Timeline