From: Pekka Enberg <penberg@kernel.org>
To: kvm@vger.kernel.org
Cc: Pekka Enberg <penberg@kernel.org>,
Asias He <asias.hejun@gmail.com>,
Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
Sasha Levin <levinsasha928@gmail.com>
Subject: [RFC/PATCH] kvm tools, bios: Don't include glibc headers
Date: Tue, 25 Oct 2011 15:10:51 +0300 [thread overview]
Message-ID: <1319544653-6670-1-git-send-email-penberg@kernel.org> (raw)
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 <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
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 <asm/processor-flags.h>
#include <asm/e820.h>
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 <stdint.h>
-
#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
/* VESA General Information table */
--
1.7.6.4
next reply other threads:[~2011-10-25 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 12:10 Pekka Enberg [this message]
2011-10-25 12:10 ` [PATCH 1/2] kvm tools: Kill double slash from kvm__get_dir() Pekka Enberg
2011-10-25 12:10 ` [PATCH 2/2] kvm tools: Improve "kvm setup" info and error messages Pekka Enberg
-- strict thread matches above, loose matches on Subject: below --
2011-10-23 11:24 [RFC/PATCH] kvm tools, bios: Don't include glibc headers Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319544653-6670-1-git-send-email-penberg@kernel.org \
--to=penberg@kernel.org \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).