Merge pull request #176070 from trofi/workaround-fno-common-for-xe-guest-utilities

This commit is contained in:
Sandro 2022-06-03 17:13:07 +02:00 committed by GitHub
commit 6daa6cabc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,11 @@ stdenv.mkDerivation (rec {
tar xf "$NIX_BUILD_TOP/$name/xenstore-sources.tar.bz2"
'';
# Workaround build failure on -fno-common toolchains:
# ld: utils.o:xenstore/utils.h:27:
# multiple definition of `xprintf'; xenstored_core.o:xenstore/utils.h:27: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
buildPhase = ''
export CC=gcc
export CFLAGS='-Wall -Wstrict-prototypes -Wno-unused-local-typedefs -Wno-sizeof-pointer-memaccess'