libsemanage: fix build by disabling clobbered warning

This turns the GCC clobbered error into a warning which should fix:

```
emanage_store.c: In function 'semanage_exec_prog':
semanage_store.c:1278:6: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wclobbered-Werror=clobbered8;;]
 1278 |  int i;
      |      ^
cc1: all warnings being treated as errors
```
This commit is contained in:
Bas van Dijk 2021-02-08 14:08:17 +01:00
parent 3ed5570514
commit 6005700c53

View File

@ -30,6 +30,16 @@ stdenv.mkDerivation rec {
"DEFAULT_SEMANAGE_CONF_LOCATION=$(out)/etc/selinux/semanage.conf"
];
# The following turns the 'clobbered' error into a warning
# which should fix the following error:
#
# semanage_store.c: In function 'semanage_exec_prog':
# semanage_store.c:1278:6: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wclobbered-Werror=clobbered8;;]
# 1278 | int i;
# | ^
# cc1: all warnings being treated as errors
NIX_CFLAGS_COMPILE = [ "-Wno-error=clobbered" ];
installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
meta = removeAttrs libsepol.meta ["outputsToInstall"] // {