All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] 2.6.13-bs3 amd64 compilation broken?
  2005-10-07 14:28 [uml-devel] 2.6.13-bs3 amd64 compilation broken? Antoine Martin
@ 2005-10-07 13:45 ` Alan Menegotto
  2005-10-07 17:37   ` Blaisorblade
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Menegotto @ 2005-10-07 13:45 UTC (permalink / raw)
  To: user-mode-linux-devel

Antoine Martin wrote:

>I tried twice to be sure, but compile fails near the end:
>
> CC      arch/um/sys-x86_64/stub_segv.o
>arch/um/sys-x86_64/stub_segv.c: In function `stub_segv_handler':
>arch/um/sys-x86_64/stub_segv.c:41: warning: implicit declaration of
>function `container_of'
>arch/um/sys-x86_64/stub_segv.c:41: error: parse error before "struct"
>make[1]: *** [arch/um/sys-x86_64/stub_segv.o] Error 1
>make: *** [arch/um/sys-x86_64] Error 2
>
>Antoine
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by:
>Power Architecture Resource Center: Free content, downloads, discussions,
>and more. http://solutions.newsforge.com/ibmarch.tmpl
>_______________________________________________
>User-mode-linux-devel mailing list
>User-mode-linux-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>
>  
>
I've got no such errors compiling 2.6.13-bs9 (probably one version 
further, I'm not sure about the version). Try the latest 'bs patch' and 
the latest vanilla kernel version (2.6.13-3) and the error should be gone.

-- 
Saudações

Alan Menegotto
Depto de Informática
Grupo Centro Clínico
Fone: (51) 3287-9234



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [uml-devel] 2.6.13-bs3 amd64 compilation broken?
@ 2005-10-07 14:28 Antoine Martin
  2005-10-07 13:45 ` Alan Menegotto
  0 siblings, 1 reply; 4+ messages in thread
From: Antoine Martin @ 2005-10-07 14:28 UTC (permalink / raw)
  To: UML devel, Blaisorblade

I tried twice to be sure, but compile fails near the end:

 CC      arch/um/sys-x86_64/stub_segv.o
arch/um/sys-x86_64/stub_segv.c: In function `stub_segv_handler':
arch/um/sys-x86_64/stub_segv.c:41: warning: implicit declaration of
function `container_of'
arch/um/sys-x86_64/stub_segv.c:41: error: parse error before "struct"
make[1]: *** [arch/um/sys-x86_64/stub_segv.o] Error 1
make: *** [arch/um/sys-x86_64] Error 2

Antoine



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] 2.6.13-bs3 amd64 compilation broken?
  2005-10-07 13:45 ` Alan Menegotto
@ 2005-10-07 17:37   ` Blaisorblade
  2005-10-09 18:24     ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Blaisorblade @ 2005-10-07 17:37 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Alan Menegotto

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

On Friday 07 October 2005 15:45, Alan Menegotto wrote:
> Antoine Martin wrote:
> >I tried twice to be sure, but compile fails near the end:
> >
> > CC      arch/um/sys-x86_64/stub_segv.o
> >arch/um/sys-x86_64/stub_segv.c: In function `stub_segv_handler':
> >arch/um/sys-x86_64/stub_segv.c:41: warning: implicit declaration of
> >function `container_of'
> >arch/um/sys-x86_64/stub_segv.c:41: error: parse error before "struct"
> >make[1]: *** [arch/um/sys-x86_64/stub_segv.o] Error 1
> >make: *** [arch/um/sys-x86_64] Error 2
> >
> >Antoine

> I've got no such errors compiling 2.6.13-bs9 (probably one version
> further, I'm not sure about the version). Try the latest 'bs patch' and
> the latest vanilla kernel version (2.6.13-3) and the error should be gone.
Probably you tried 2.6.12-bs9 - 2.6.13 latest -bs is 3.

Also, this was added in -bs3, to fix another problem.

Try the attached patch.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

[-- Attachment #2: uml-early-x86_64-crash-fix-compile --]
[-- Type: text/x-diff, Size: 1444 bytes --]

uml: compile-time fix for x86_64 frame pointer fix

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

This should fix the compile-time error on x86_64. We can't get container_of from
host headers, since it's new in 2.6. offsetof, instead, is ANSI C. But it's
untested.

Jeff, stick this with the original patch when sending it upstream (it's
introduced by your fix for frame-pointer-less x86_64 binaries).

After Antoine Martin tested this on his build environment, anyway.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Index: linux-2.6.13/arch/um/sys-x86_64/stub_segv.c
===================================================================
--- linux-2.6.13.orig/arch/um/sys-x86_64/stub_segv.c
+++ linux-2.6.13/arch/um/sys-x86_64/stub_segv.c
@@ -9,6 +9,7 @@
 #include "uml-config.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/faultinfo.h"
+#include <stddef.h>
 
 /* Copied from sys-x86_64/signal.c - Can't find an equivalent definition
  * in the libc headers anywhere.
@@ -20,6 +21,11 @@ struct rt_sigframe
         struct siginfo info;
 };
 
+/* Copied here from <linux/kernel.h> - we're userspace. */
+#define container_of(ptr, type, member) ({			\
+        const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+        (type *)( (char *)__mptr - offsetof(type,member) );})
+
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig)
 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] 2.6.13-bs3 amd64 compilation broken?
  2005-10-07 17:37   ` Blaisorblade
@ 2005-10-09 18:24     ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2005-10-09 18:24 UTC (permalink / raw)
  To: Blaisorblade; +Cc: user-mode-linux-devel, Alan Menegotto

On Fri, Oct 07, 2005 at 07:37:27PM +0200, Blaisorblade wrote:
> Jeff, stick this with the original patch when sending it upstream (it's
> introduced by your fix for frame-pointer-less x86_64 binaries).

Done, thanks.

		Jeff


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-09 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-07 14:28 [uml-devel] 2.6.13-bs3 amd64 compilation broken? Antoine Martin
2005-10-07 13:45 ` Alan Menegotto
2005-10-07 17:37   ` Blaisorblade
2005-10-09 18:24     ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.