> > Thanks Andrew,
> > I'll look at mtd distribution, see if it includes ?yvind's patch, and figure
> > out what to do next based on what I find there. In the mean time,
> > experimental evidence suggests that the 'defined(__ARM_ARCH_4__)' should be
> > 'defined(__ARM_ARCH_4T_)' in fs-ecos.c. At least on my system, which
> > compiles fs-ecos.c with the following command:
> >
> > arm-elf-gcc -c -I/home/wpd/ess/redboot/dbw-redboot-ram/install/include
> > -I/home/wpd/eCos/ecos-20060228/packages/fs/jffs2/current
> > -I/home/wpd/eCos/ecos-20060228/packages/fs/jffs2/current/src
> > -I/home/wpd/eCos/ecos-20060228/packages/fs/jffs2/current/tests -I.
> > -I/home/wpd/eCos/ecos-20060228/packages/fs/jffs2/current/src/
> > -finline-limit=7000 -mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes
> > -Winline -Wundef -g -O2 -ffunction-sections -fdata-sections
> > -fno-exceptions -D__ECOS -nostdinc -iwithprefix include
> > -Wp,-MD,src/fs-ecos.tmp -o src/fs_jffs2_fs-ecos.o
> > /home/wpd/eCos/ecos-20060228/packages/fs/jffs2/current/src/fs-ecos.c
>
> Strange, it works for me. I wounder if its becasue you are using arm9?
>
> Please could you give the output when you call gcc with -v. I think
> that will show all the defines which are passed to CPP.
Bin googling abit.
It seems that different arm architectures define different
__ARM_ARCH_XXX__ macros. That explains why your arm9 compile does not
give a CPP error.
I think the generic solution is to change to __arm__ which should be
defined for all architectures.
Please could you test this patch.
Thanks
Andrew
? fs/jffs2/current/a.out
? fs/jffs2/current/foobar.c
Index: fs/jffs2/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/ChangeLog,v
retrieving revision 1.50
diff -u -r1.50 ChangeLog
--- fs/jffs2/current/ChangeLog 3 Aug 2005 20:39:51 -0000 1.50
+++ fs/jffs2/current/ChangeLog 9 Mar 2006 21:14:03 -0000
@@ -1,3 +1,8 @@
+2006-03-09 Andrew Lunn <[EMAIL PROTECTED]>
+
+ * src/fs-ecos.c: Generalise the check for broken ARM compilers
+ and add the MIPS compiler as also being broken.
+
2005-08-03 Andrew Lunn <[EMAIL PROTECTED]>
* tests/jffs2_1.c: Include <stdio.h> to stop compiler warning.
Index: fs/jffs2/current/src/fs-ecos.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/src/fs-ecos.c,v
retrieving revision 1.38
diff -u -r1.38 fs-ecos.c
--- fs/jffs2/current/src/fs-ecos.c 30 Jul 2005 15:30:42 -0000 1.38
+++ fs/jffs2/current/src/fs-ecos.c 9 Mar 2006 21:14:05 -0000
@@ -21,9 +21,10 @@
#include <string.h>
#include <cyg/io/config_keys.h>
-#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2) && defined (__ARM_ARCH_4__)
+#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2) && \
+ (defined (__arm__) || defined (_mips))
#error This compiler is known to be broken. Please see:
-#error http://ecos.sourceware.org/ml/ecos-patches/2003-08/msg00006.html
+#error "http://ecos.sourceware.org/ml/ecos-patches/2003-08/msg00006.html"
#endif
//==========================================================================