scons: fix hook for 'deprecated' attribute

On the new release, the compilation is polluted by the same warning:
    > ''deprecated' attribute directive ignored

It seems that the hook added in this patch does not work:

The snippet of code compile with TryCompile on g++{8,9}.
It probably comes from the fact that the compilation
only creates a warning and not an error.

By adding temporarily '-Werror' for this compilation test,
it filters the faulty gcc versions.

Change-Id: I2b8b7a1a7e06df437b76e98d212947f4f9452311
Reviewed-by: Gabe Black <>
Maintainer: Gabe Black <>
Tested-by: kokoro <>
(cherry picked from commit a366e66272b7c4b01037d68a7723922b49f506cd)
Maintainer: Bobby R. Bruce <>
Reviewed-by: Jason Lowe-Power <>
Reviewed-by: Daniel Carvalho <>
1 file changed