Re: [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum'

Sergio Luis
2008-02-18T01:03:24Z

Christian Kujau wrote:
> On Sun, 17 Feb 2008, Sergio Luis wrote:
>> It doesn't fix the problem totally. If we select
>> Virtualization->Linux hypervisor example code (CONFIG_LGUEST)
>> as a module, we will get the same build errors,
>
> Confirmed, the build errors persist with CONFIG_LGUEST=m and Rusty's
> patch applied.
>
> thanks,
> Christian.

This will make sure CONFIG_LGUEST is set when building the linux hypervisor example code as both module and built-in,
so that the LGUEST_* offsets will be generated for both cases in asm-offset.h.
I am sure you guys will have a better way to fix this, but anyway...
-sergio

--- linux-2.6.25-rc2.orig/drivers/lguest/Kconfig 2008-02-16 23:21:29.000000000 -0300
+++ linux-2.6.25-rc2/drivers/lguest/Kconfig 2008-02-17 21:44:57.000000000 -0300
@@ -1,7 +1,17 @@
config LGUEST
- tristate "Linux hypervisor example code"
+ bool "Linux hypervisor"
depends on X86_32 && EXPERIMENTAL && !X86_PAE && FUTEX && !(X86_VISWS || X86_VOYAGER)
+ default y
+ ---help---
+ This allows you to select the linux hypervisor example code.
+
+if LGUEST
+
+config LGUEST_HYPERVISOR
+ tristate "Linux hypervisor example code"
+ depends on LGUEST
select HVC_DRIVER
+ default m
---help---
This is a very simple module which allows you to run
multiple instances of the same Linux kernel, using the
@@ -10,3 +20,5 @@
not "rustyvisor". See Documentation/lguest/lguest.txt.

If unsure, say N. If curious, say M. If masochistic, say Y.
+
+endif # LGUEST