|
发表于 2003-7-15 09:49:16
|
显示全部楼层
this is two discussion on arm linux mailing list. i will keep tracing.
--------------------------------------------------
Re: cross compiler gcc3.3 kernel compilation error
From:
Nicolas Pitre <[email protected]>
To:
John K Luebs <[email protected]>
CC:
mingz <[email protected]>, <[email protected]>
Date:
Today 21:21:11
On Mon, 14 Jul 2003, John K Luebs wrote:
> On Fri, Jul 11, 2003 at 10:56:52PM -0400, mingz wrote:
> > Hi, recently I tried to build out a gcc3.3 cross-compile toolchain.
> > When I use it to compile 2.4.19-rmk7-ds2 It reports error:
> >
> > blkpg.c: In function `blk_ioctl':
> > blkpg.c:252: error: asm-specifier for variable `__r1' conflicts with asm
> > clobber list
> > blkpg.c:252: confused by earlier errors, bailing out
> > make[3]: *** [blkpg.o] Error 1
> > make[3]: Leaving directory `/tmp/cross/linux-2.4.19/drivers/block'
> > make[2]: *** [first_rule] Error 2
> > make[2]: Leaving directory `/tmp/cross/linux-2.4.19/drivers/block'
> > make[1]: *** [_subdir_block] Error 2
> > make[1]: Leaving directory `/tmp/cross/linux-2.4.19/drivers'
> > make: *** [_dir_drivers] Error 2
>
> I think this is probably because of some buggy inline asm that gcc
> is now simply being anal about. It is nonsensical to put a register
> in both an input or output and the clobber list for a block of
> inline asm.
> I bet there is an explicit r1 reg variable that is then
> being used in the output of some inline assembly. r1 is in the clobbers
> list as well.
>
> If this is the case, you need to remove "r1" listed after the third colon
> (the clobbers list) in the inline assembly block at the line referenced
> in the error. You should not have to touch the assembly code itself.
... and then watch your kernel corrupt your filesystem, exhibit strange
behavior, crash in strange ways, or eat your pizza and drink your cofee. In
other words, don't just remove r1 from the clobber list without
understanding _why_ it was there in the first place. And no, you can't go
away without actually modifying the assembly to fix this problem.
Hint: http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1540/1
(this is for 2.5 but the same thing must be done to 2.4)
Nicolas
---------------------------------
On Sat, 12 Jul 2003, Griego, David A wrote:
> Unless you have a need for gcc3.3 I would build gcc-3.2.3. I had the
> same problem as you and decised just to use 3.2.3
Note that gcc-3.2.3 is known to miscompile kernels and probably other ARM
stuff. The only gcc version >= 3 that seems to be OK for ARM out of the box
so far is gcc 3.3.
Nicolas
-----------------------------------
so i think u had better use that 2.95.3 still. after i try the patch for 3.3. i will report the results here. |
|