From: Pekka Enberg Subject: [RFC/PATCH] kvm tools, bios: Don't include glibc headers Date: Tue, 25 Oct 2011 15:10:51 +0300 Message-ID: <1319544653-6670-1-git-send-email-penberg@kernel.org> Cc: Pekka Enberg , Asias He , Cyrill Gorcunov , Ingo Molnar , Sasha Levin To: kvm@vger.kernel.org Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:54575 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756173Ab1JYMLD (ORCPT ); Tue, 25 Oct 2011 08:11:03 -0400 Received: by bkbzt19 with SMTP id zt19so418637bkb.19 for ; Tue, 25 Oct 2011 05:11:02 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: We should not include glibc headers from BIOS code which can't rely on glibc at runtime. This patch fixes the following build breakage on 64-bit: CC bios/e820.o In file included from /usr/include/features.h:387:0, from /usr/include/unistd.h:26, from include/kvm/util.h:12, from bios/e820.c:5: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. make: *** [bios/bios.bin.elf] Error 1 when built without the 'glibc-devel.i686' package on Fedora, for example. Cc: Asias He Cc: Cyrill Gorcunov Cc: Ingo Molnar Cc: Sasha Levin Signed-off-by: Pekka Enberg --- tools/kvm/README | 2 +- tools/kvm/bios/e820.c | 1 - tools/kvm/bios/int10.c | 3 --- 3 files changed, 1 insertions(+), 5 deletions(-) diff --git a/tools/kvm/README b/tools/kvm/README index 7cbf530..c262995 100644 --- a/tools/kvm/README +++ b/tools/kvm/README @@ -102,7 +102,7 @@ For rpm based systems: 32-bit: yum install glibc-devel 64-bit: -yum install glibc-devel glibc-devel.i686 glibc-static +yum install glibc-devel glibc-static On 64-bit Arch Linux make sure the multilib repository is enabled in your /etc/pacman.conf and run diff --git a/tools/kvm/bios/e820.c b/tools/kvm/bios/e820.c index 1eafb5b..a9bca29 100644 --- a/tools/kvm/bios/e820.c +++ b/tools/kvm/bios/e820.c @@ -2,7 +2,6 @@ #include "kvm/segment.h" #include "kvm/bios.h" -#include "kvm/util.h" #include #include diff --git a/tools/kvm/bios/int10.c b/tools/kvm/bios/int10.c index 6387ca8..32f7c92 100644 --- a/tools/kvm/bios/int10.c +++ b/tools/kvm/bios/int10.c @@ -1,12 +1,9 @@ #include "kvm/segment.h" #include "kvm/bios.h" -#include "kvm/util.h" #include "kvm/vesa.h" #include "bios/memcpy.h" -#include - #define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24)) /* VESA General Information table */ -- 1.7.6.4