[patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95
From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 07/29/04
- Previous message: Pavel Machek: "Re: [Patch] Per kthread freezer flags"
- In reply to: Jan-Benedict Glaw: "Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Next in thread: Adrian Bunk: "Re: [patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Maybe reply: Adrian Bunk: "Re: [patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jul 2004 22:42:50 +0200 To: Andrew Morton <akpm@osdl.org>, aia21@cantab.net, linux-kernel@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net
On Thu, Jul 29, 2004 at 05:54:11PM +0200, Jan-Benedict Glaw wrote:
> >
> > This causes the following compile error when using gcc 2.95:
> >
> > <-- snip -->
> >
> > ...
> > LD .tmp_vmlinux1
> > fs/built-in.o(.text+0x14425f): In function `ntfs_find_vcn':
> > : undefined reference to `__cmpdi2'
> > fs/built-in.o(.text+0x144272): In function `ntfs_find_vcn':
> > : undefined reference to `__cmpdi2'
> > make: *** [.tmp_vmlinux1] Error 1
> >
> > <-- snip -->
>
> GCC wanted to make a compare on a 8byte integer (so probably long long),
> but decided there isn't an appropriate insn on that hardware platform.
> So instead of emitting assembler, it generated a function call that
> would have resulted in a call to libgcc. However, the Linux kernel asks
> to *not* link that lib (eg. think about a gcc compiled for i686 (so is
> libgcc) while compiling for i386).
>...
We had the same problem somewhere else recently.
This problem occurs only with gcc 2.95 and case statements.
> MfG, JBG
What about the following patch to fix NTFS compilation with gcc 2.95?
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.8-rc2-mm1-full/fs/ntfs/attrib.c.old 2004-07-29 22:34:21.000000000 +0200
+++ linux-2.6.8-rc2-mm1-full/fs/ntfs/attrib.c 2004-07-29 22:36:15.000000000 +0200
@@ -1113,15 +1113,11 @@
}
rl++;
}
- switch (rl->lcn) {
- case (LCN)LCN_RL_NOT_MAPPED:
- break;
- case (LCN)LCN_ENOENT:
- err = -ENOENT;
- break;
- default:
- err = -EIO;
- break;
+ if (rl->lcn != (LCN)LCN_RL_NOT_MAPPED) {
+ if (rl->lcn == (LCN)LCN_ENOENT)
+ err = -ENOENT;
+ else
+ err = -EIO;
}
}
if (!need_write)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Pavel Machek: "Re: [Patch] Per kthread freezer flags"
- In reply to: Jan-Benedict Glaw: "Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Next in thread: Adrian Bunk: "Re: [patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Maybe reply: Adrian Bunk: "Re: [patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|