linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Compile UML-2.4.28+bs2 on FC4 with gcc4 - with my hack (yuk)
@ 2005-08-14  6:06 Phill Wombat
  0 siblings, 0 replies; only message in thread
From: Phill Wombat @ 2005-08-14  6:06 UTC (permalink / raw)
  To: UML Devel List

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

 cc -D__KERNEL__ -I/home/phill/linux-2.4.28/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-U__i386__ -Ui386 -DUM_FASTCALL -g -D__arch_um__ -DSUBARCH="i386"
-D_LARGEFILE64_SOURCE -I/home/phill/linux-2.4.28/arch/um/include
-Derrno=kernel_errno
-I/home/phill/linux-2.4.28/arch/um/kernel/tt/include
-I/home/phill/linux-2.4.28/arch/um/kernel/skas/include
-fno-unit-at-a-time   -nostdinc -iwithprefix include
-DKBUILD_BASENAME=binfmt_elf -save-temps -c -o binfmt_elf.o binfmt_elf.c
In file included
from /home/phill/linux-2.4.28/include/asm/byteorder.h:5,

from /home/phill/linux-2.4.28/include/linux/kernel.h:16,

from /home/phill/linux-2.4.28/include/asm/arch/system.h:6,

from /home/phill/linux-2.4.28/include/asm/system-generic.h:5,
                 from /home/phill/linux-2.4.28/include/asm/system.h:5,

from /home/phill/linux-2.4.28/include/linux/spinlock.h:7,

from /home/phill/linux-2.4.28/include/linux/module.h:13,
                 from binfmt_elf.c:13:
/home/phill/linux-2.4.28/include/asm/arch/byteorder.h:14: warning: type
qualifiers ignored on function return type
/home/phill/linux-2.4.28/include/asm/arch/byteorder.h:30: warning: type
qualifiers ignored on function return type
In file included
from /home/phill/linux-2.4.28/include/linux/byteorder/little_endian.h:12,

from /home/phill/linux-2.4.28/include/asm/arch/byteorder.h:66,

from /home/phill/linux-2.4.28/include/asm/byteorder.h:5,

from /home/phill/linux-2.4.28/include/linux/kernel.h:16,

from /home/phill/linux-2.4.28/include/asm/arch/system.h:6,

from /home/phill/linux-2.4.28/include/asm/system-generic.h:5,
                 from /home/phill/linux-2.4.28/include/asm/system.h:5,

from /home/phill/linux-2.4.28/include/linux/spinlock.h:7,

from /home/phill/linux-2.4.28/include/linux/module.h:13,
                 from binfmt_elf.c:13:
/home/phill/linux-2.4.28/include/linux/byteorder/swab.h:160: warning:
type qualifiers ignored on function return type
/home/phill/linux-2.4.28/include/linux/byteorder/swab.h:173: warning:
type qualifiers ignored on function return type
/home/phill/linux-2.4.28/include/linux/byteorder/swab.h:186: warning:
type qualifiers ignored on function return type
/home/phill/linux-2.4.28/include/linux/byteorder/swab.h:200: warning:
type qualifiers ignored on function return type
binfmt_elf.c: In function ‘load_elf_binary’:
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment
binfmt_elf.c:828: error: invalid lvalue in assignment

so I looked at the preprocessor output and it showed this for the macro
expansion (which looks correct??):

 do { (mode_tt ? (*((unsigned long *) &(((char *)
(((&(regs)->regs)->tt.sc)))[32]))) :
((((&(regs)->regs)->skas.regs)[0]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[40]))) :
((((&(regs)->regs)->skas.regs)[1]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[36]))) :
((((&(regs)->regs)->skas.regs)[2]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[20]))) :
((((&(regs)->regs)->skas.regs)[3]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[16]))) :
((((&(regs)->regs)->skas.regs)[4]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[24]))) :
((((&(regs)->regs)->skas.regs)[5]))) = 0; (mode_tt ? (*((unsigned long
*) &(((char *) (((&(regs)->regs)->tt.sc)))[44]))) :
((((&(regs)->regs)->skas.regs)[6]))) = 0; } while(0);

which I hacked at to produce this (which compiles - don't know if it
works or is equivalent even):

if (mode_tt)
{
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[32]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[40]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[36]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[20]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[16]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[24]))) =
0;
 (*((unsigned long *) &(((char *) (((&(regs)->regs)->tt.sc)))[44]))) =
0;
} else {
 ((((&(regs)->regs)->skas.regs)[0])) = 0;
 ((((&(regs)->regs)->skas.regs)[1])) = 0;
 ((((&(regs)->regs)->skas.regs)[2])) = 0;
 ((((&(regs)->regs)->skas.regs)[3])) = 0;
 ((((&(regs)->regs)->skas.regs)[4])) = 0;
 ((((&(regs)->regs)->skas.regs)[5])) = 0;
 ((((&(regs)->regs)->skas.regs)[6])) = 0;
};

Cheers
Phill.


[-- Attachment #2: Type: text/html, Size: 7081 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-14  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-14  6:06 [uml-devel] Compile UML-2.4.28+bs2 on FC4 with gcc4 - with my hack (yuk) Phill Wombat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox