From: Kevin Corry <corryk@us.ibm.com>
To: "James Lamanna" <james.lamanna@appliedminds.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.5.60 Compile error
Date: Mon, 10 Feb 2003 15:38:40 -0600 [thread overview]
Message-ID: <03021015384004.02639@boiler> (raw)
In-Reply-To: <021d01c2d148$3de259d0$39140b0a@amthinking.net>
On Monday 10 February 2003 15:06, James Lamanna wrote:
> Another compiler error that's been around for a little while:
> Looks like some weird gcc problem.
> gcc version: 2.95.4 20011002 (Debian prerelease)
>
> make -f scripts/Makefile.build obj=scripts
> make -f scripts/Makefile.build obj=drivers/md drivers/md/linear.o
> gcc -Wp,-MD,drivers/md/.linear.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=i686
> -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=linear -DKBUILD_MODNAME=linear -c -o
> drivers/md/linear.o drivers/md/linear.c
> drivers/md/linear.c: In function `linear_run':
> drivers/md/linear.c:159: Internal compiler error:
> drivers/md/linear.c:159: internal error--unrecognizable insn:
> (insn 316 315 673 (parallel[
> (set (reg:SI 0 %eax)
> (asm_operands ("") ("=a") 0[
> (reg:DI 1 %edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("drivers/md/linear.c") 115))
> (set (reg:SI 1 %edx)
> (asm_operands ("") ("=d") 1[
> (reg:DI 1 %edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("drivers/md/linear.c") 115))
> ] ) -1 (insn_list 313 (nil))
> (nil))
> make[1]: *** [drivers/md/linear.o] Error 1
> make: *** [drivers/md/linear.o] Error 2
I have been getting this same error for several kernel versions
now. I have fixed it with the following patch.
==========
--- linux-2.5.59a/drivers/md/linear.c Thu Jan 16 20:22:04 2003
+++ linux-2.5.59b/drivers/md/linear.c Fri Jan 31 15:00:48 2003
@@ -111,6 +111,9 @@
}
{
+#if __GNUC__ < 3
+ volatile
+#endif
sector_t sz = md_size[mdidx(mddev)];
unsigned round = sector_div(sz, conf->smallest->size);
nb_zone = conf->nr_zones = sz + (round ? 1 : 0);
==========
I believe I found it in the lkml archives, but...I have no idea if this
is the correct fix. I also get a very similar error in fs/readdir.c:
==========
make -f scripts/Makefile.build obj=fs
gcc -Wp,-MD,fs/.readdir.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -Iinclude/asm-i386/mach-default -g -nostdinc -iwithprefix include -DKBUILD_BASENAME=readdir -DKBUILD_MODNAME=readdir -c -o fs/readdir.o fs/readdir.c
fs/readdir.c: In function `filldir64':
fs/readdir.c:242: internal error--unrecognizable insn:
(insn 184 183 657 (set (reg/v:SI 4 %esi)
(asm_operands/v ("1: movl %%eax,0(%2)
2: movl %%edx,4(%2)
3:
.section .fixup,"ax"
4: movl %3,%0
jmp 3b
.previous
.section __ex_table,"a"
.align 4
.long 1b,4b
.long 2b,4b
.previous") ("=r") 0[
(reg:DI 1 %edx)
(reg:SI 0 %eax)
(const_int -14 [0xfffffff2])
(reg/v:SI 4 %esi)
]
[
(asm_input:DI ("A"))
(asm_input:SI ("r"))
(asm_input:SI ("i"))
(asm_input:SI ("0"))
] ("fs/readdir.c") 226)) -1 (insn_list 181 (insn_list 183 (nil)))
(nil))
make[1]: *** [fs/readdir.o] Error 1
make: *** [fs] Error 2
\x10==========
which I've managed to fix with this patch:
==========
--- linux-2.5.59a/fs/readdir.c Thu Jan 16 20:22:08 2003
+++ linux-2.5.59b/fs/readdir.c Fri Jan 31 15:00:25 2003
@@ -216,14 +216,14 @@
return -EINVAL;
dirent = buf->previous;
if (dirent) {
- if (__put_user(offset, &dirent->d_off))
+ if (put_user(offset, &dirent->d_off))
goto efault;
}
dirent = buf->current_dir;
buf->previous = dirent;
- if (__put_user(ino, &dirent->d_ino))
+ if (put_user(ino, &dirent->d_ino))
goto efault;
- if (__put_user(0, &dirent->d_off))
+ if (put_user(0, &dirent->d_off))
goto efault;
if (__put_user(reclen, &dirent->d_reclen))
goto efault;
@@ -268,9 +268,12 @@
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
+#if __GNUC__ < 3
+ volatile
+#endif
struct linux_dirent64 d;
d.d_off = file->f_pos;
- __put_user(d.d_off, &lastdirent->d_off);
+ put_user(d.d_off, &lastdirent->d_off);
error = count - buf.count;
}
==========
I'm using gcc 2.95.2. It looks to me like there is a problem with
gcc handling certain 64-bit data fields.
Anyone else seeing these errors? Any comments on the validity of
the above patches?
Thanks,
--
Kevin Corry
corryk@us.ibm.com
http://evms.sourceforge.net/
next prev parent reply other threads:[~2003-02-10 21:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-10 19:08 Linux 2.5.60 Linus Torvalds
2003-02-10 20:41 ` Maciej Soltysiak
2003-02-10 21:06 ` Linux 2.5.60 Compile error James Lamanna
2003-02-10 21:38 ` Kevin Corry [this message]
2003-02-10 22:50 ` Muli Ben-Yehuda
2003-02-10 21:52 ` Dave Jones
2003-02-11 0:12 ` Another " Vlad@geekizoid.com
2003-02-11 5:21 ` Anthony J. Breeds-Taurima
2003-02-10 21:11 ` Linux 2.5.60 Stephen Hemminger
2003-02-10 21:25 ` James Lamanna
2003-02-10 22:54 ` Linus Torvalds
2003-02-10 20:46 ` 2.5.60: JFS no longer compiles with gcc 2.95 Adrian Bunk
2003-02-10 21:43 ` James Lamanna
2003-02-11 7:27 ` Adrian Bunk
2003-02-12 14:52 ` [PATCH - 2.5.60] " Dave Kleikamp
2003-02-12 15:04 ` Adrian Bunk
2003-02-12 15:42 ` Dave Kleikamp
2003-02-12 16:22 ` Andreas Schwab
2003-02-10 22:21 ` Linux 2.5.60 John Cherry
2003-02-11 7:08 ` Oleg Drokin
2003-02-11 7:38 ` Linus Torvalds
2003-02-12 8:11 ` Eric W. Biederman
2003-02-12 11:49 ` Jeff Dike
2003-02-13 23:25 ` Werner Almesberger
2003-02-11 15:16 ` Zephaniah E. Hull
2003-02-11 22:47 ` Andrew Morton
2003-02-11 22:54 ` Andrew Morton
2003-02-14 16:56 ` Zephaniah E. Hull
2003-02-11 16:23 ` Russell King
2003-02-11 17:06 ` Linus Torvalds
2003-02-12 2:47 ` David S. Miller
2003-02-11 16:44 ` 2.5.60: arlan.c no longer compiles Adrian Bunk
2003-02-11 23:08 ` Andrew Morton
2003-02-11 18:16 ` 2.5.60: sim710.c doesn't compile Adrian Bunk
2003-02-11 18:21 ` James Bottomley
2003-02-11 22:00 ` Linux 2.5.60 Rudmer van Dijk
2003-02-12 10:05 ` Ingo Oeser
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=03021015384004.02639@boiler \
--to=corryk@us.ibm.com \
--cc=james.lamanna@appliedminds.com \
--cc=linux-kernel@vger.kernel.org \
/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