martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
314 stars 58 forks source link

Make vala C code errors non-fatal #229

Closed martinpitt closed 9 months ago

martinpitt commented 9 months ago

meson 1.4 stopped hiding valac's warnings [1], which fails compilation due to our -Werror= settings. There's not much that we can do at this point, so stop making them non-fatal.

This reverts the gentoo-hacks option from commit 539af0b4f36. Turns out that this wasn't a compiler change in Gentoo after all, but that Gentoo backported [2] that meson change at that time.

Many thanks to Dominique Leuenberger @DimStar77 for tracking down the root cause!

Fixes #228

[1] https://github.com/mesonbuild/meson/commit/5f659af870011e [2] https://github.com/gentoo/gentoo/pull/34141

martinpitt commented 9 months ago

Meh, rawhide and also fedora:latest fail with

error: unknown warning option '-Werror=discarded-qualifiers'; did you mean '-Werror=ignored-qualifiers'? [-Werror,-Wunknown-warning-option]

No, ignored-qualifiers does not work, Gentoo fails with that. So I suppose there needs to be a way to detect whether gcc supports a particular warning?

martinpitt commented 9 months ago

A-ha! https://mesonbuild.com/Reference-manual_returned_compiler.html#compilerget_supported_arguments