diff --git a/meson.build b/meson.build index 05cab01..d9cc2c1 100644 --- a/meson.build +++ b/meson.build @@ -37,6 +37,21 @@ if get_option('b_ndebug') == 'true' add_project_arguments('-Wno-error=unused-but-set-variable', '-Wno-error=unused-variable', language: 'c') endif +# HACK: between Jan 5 and Jan 8 2024, Gentoo changed something that causes +# hundreds of warnings when compiling the vala-generated C code; ignore these +if get_option('gentoo-hacks') + add_project_arguments( + '-Wno-error', + '-Wno-error=incompatible-pointer-types', + '-Wno-error=pointer-sign', + '-Wno-error=unused-function', + '-Wno-error=unused-label', + '-Wno-error=unused-but-set-variable', + '-Wno-error=unused-variable', + '-Wno-error=unused-value', + language: 'c') +endif + conf = configuration_data() cc = meson.get_compiler('c') valac = meson.get_compiler('vala') diff --git a/meson_options.txt b/meson_options.txt index 0383d34..8cf2e96 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,3 +2,8 @@ option('gtk_doc', type : 'boolean', value : false, description : 'use gtk-doc to build documentation') + +option('gentoo-hacks', + type : 'boolean', + value : false, + description : 'disable gcc fatal warnings, for Gentoo builds') diff --git a/tests/run-gentoo b/tests/run-gentoo index bb0cb0e..172cd3d 100755 --- a/tests/run-gentoo +++ b/tests/run-gentoo @@ -27,7 +27,7 @@ git config --global safe.directory /source cd /source export VALAC=\$(ls /usr/bin/valac-* |sort | tail -n1) -meson setup /tmp/dbg --buildtype debug --werror +meson setup /tmp/dbg --buildtype debug --werror -Dgentoo-hacks=true export BRITTLE_TESTS="${BRITTLE_TESTS:-}" meson test -C /tmp/dbg -v --num-processes=1