diff options
author | fanquake <fanquake@gmail.com> | 2022-06-21 10:06:15 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-04-17 15:47:13 +0100 |
commit | ec7a8839a2b5313ad50b14605a9b1e227b290fd5 (patch) | |
tree | 2cbe09cde9f5de60dd01dd88c1fec0ac72cd454d | |
parent | 0567787f5ef9e45f96cb375dcd7e06117a9fd629 (diff) |
build: suppress array-bounds errors in libxkbcommon
These occur when building with GCC 12.1.
It might be the case that these would be suppressed by updating the
package, but that would also require installing new build tools (meson),
as well as potentially more dependencies (wayland).
```bash
In function 'ExprCreateBoolean',
inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
src/xkbcomp/ast-build.c:119:23: error: array subscript 'ExprDef[0]' is partly outside array bounds of 'unsigned char[32]' [-Werror=array-bounds]
119 | expr->boolean.set = set;
| ~~~~~~~~~~~~~~~~~~^~~~~
In function 'ExprCreate',
inlined from 'ExprCreateBoolean' at src/xkbcomp/ast-build.c:118:5,
inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
src/xkbcomp/ast-build.c:75:21: note: object of size 32 allocated by 'malloc'
75 | ExprDef *expr = malloc(size);
| ^~~~~~~~~~~~
```
Github-Pull: #25436
Rebased-From: 1bdbbbdc46c4e50bf07bc362e7e391ea1a53ea2f
-rw-r--r-- | depends/packages/libxkbcommon.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/depends/packages/libxkbcommon.mk b/depends/packages/libxkbcommon.mk index 8c6c56545f..bcdcf671f7 100644 --- a/depends/packages/libxkbcommon.mk +++ b/depends/packages/libxkbcommon.mk @@ -5,9 +5,14 @@ $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b $(package)_dependencies=libxcb +# This package explicitly enables -Werror=array-bounds, which causes build failures +# with GCC 12.1+. Work around that by turning errors back into warnings. +# This workaround would be dropped if the package was updated, as that would require +# a different build system (Meson) define $(package)_set_vars $(package)_config_opts = --enable-option-checking --disable-dependency-tracking $(package)_config_opts += --disable-static --disable-docs +$(package)_cflags += -Wno-error=array-bounds endef define $(package)_preprocess_cmds |