Home
last modified time | relevance | path

Searched hist:"092 db7fbba04072db5aa28cb11b0b0840e4c532f" (Results 1 – 1 of 1) sorted by relevance

/optee_os/mk/
H A Dcc-option.mk092db7fbba04072db5aa28cb11b0b0840e4c532f Wed May 17 08:31:53 UTC 2023 Jerome Forissier <jerome.forissier@linaro.org> build: add -Werror to cc-option check

Clang emits a warning, not an error, and returns a success status when
passed a -Wxxx option that it does not recognize. This makes the
cc-option macro behave incorrectly with Clang when testing such options.

$ aarch64-linux-gnu-gcc -Wdoes-not-exist -c -x c /dev/null
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-Wdoes-not-exist’
$ echo $?
1

$ clang --target=aarch64-linux-gnu -Wdoes-not-exist -c -x c /dev/null
warning: unknown warning option '-Wdoes-not-exist'; did you mean '-Wmicrosoft-exists'? [-Wunknown-warning-option]
1 warning generated.
$ echo $?
0

Fix that by adding -Werror to the test command.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>