lkml.org 
[lkml]   [2004]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Re: 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95
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/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.094 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site