linux-um archives
 help / color / mirror / Atom feed
From: Phill Wombat <uml@webwombat.com>
To: UML Devel List <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] Compile UML-2.4.28+bs2 on FC4 with gcc4 - with my hack (yuk)
Date: Sun, 14 Aug 2005 16:06:06 +1000	[thread overview]
Message-ID: <1123999566.17043.9.camel@localhost.localdomain> (raw)

[-- 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 --]

                 reply	other threads:[~2005-08-14  6:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1123999566.17043.9.camel@localhost.localdomain \
    --to=uml@webwombat.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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