Bartlomiej Sieka wrote:
Haavard Skinnemoen wrote:
On Wed, 26 Mar 2008 15:16:44 +0100
Wolfgang Denk <[EMAIL PROTECTED]> wrote:

Can we agree on this?
Can we please un-break the existing tree first?

gcc -g -Wall -idirafter /home/hskinnemoen/git/u-boot/upstream/include 
-idirafter /home/hskinnemoen/git/u-boot/upstream/include2 -idirafter 
/home/hskinnemoen/git/u-boot/upstream/include -DTEXT_BASE=0x00000000 
-DUSE_HOSTCC -O -c -o fdt.o fdt.c
In file included from fdt_host.h:24,
                 from fdt.c:57:
../include/fdt.h:7: error: expected specifier-qualifier-list before ‘uint32_t’
[...]
er named ‘totalsize’
fdt.c:158: error: ‘const struct fdt_header’ has no member named ‘totalsize’
make[1]: *** [fdt.o] Error 1
make[1]: Leaving directory `/home/hskinnemoen/git/u-boot/upstream/tools'
make: *** [tools] Error 2

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr 
--disable-libmudflap --enable-targets=all --enable-checking=release 
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-2)

Haavard,

What were the make invocations that let the above errors? I'll try to
reproduce this and have a look.

Regards,
Bartlomiej

Hi Bartlomiej,

I also am running debian and am getting the error. Apparently our /usr/include/linux/types.h files are different from yours, or we have something set up differently/wrongly.

Adding -isystem ../include (to override the host's include files) to FIT_FLAGS "fixes" the problem.

--------------------------------------------------------------------
diff --git a/tools/Makefile b/tools/Makefile
index 8784a6d..9b2f6fa 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -124,7 +124,7 @@ CPPFLAGS   = -idirafter $(SRCTREE)/include \
 CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O

 # No -pedantic switch to avoid libfdt compilation warnings
-FIT_CFLAGS = -Wall $(CPPFLAGS) -O
+FIT_CFLAGS = -Wall -isystem ../include $(CPPFLAGS) -O

 AFLAGS    = -D__ASSEMBLY__ $(CPPFLAGS)
 CC        = $(HOSTCC)
--------------------------------------------------------------------

I've also attached the diff between /usr/include/linux/types.h and u-boot's include/linux/types.h in case it is helpful. Nothing jumps out at me. :-/

Best regards,
gvb
--- /usr/include/linux/types.h	2008-02-10 19:23:00.000000000 -0500
+++ include/linux/types.h	2008-03-26 20:31:40.000000000 -0400
@@ -1,14 +1,15 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#ifdef	__KERNEL__
+#include <linux/config.h>
+#endif
 
 #include <linux/posix_types.h>
 #include <asm/types.h>
 
 #ifndef __KERNEL_STRICT_NAMES
 
-typedef __u32 __kernel_dev_t;
-
 typedef __kernel_fd_set		fd_set;
 typedef __kernel_dev_t		dev_t;
 typedef __kernel_ino_t		ino_t;
@@ -19,12 +20,26 @@
 typedef __kernel_daddr_t	daddr_t;
 typedef __kernel_key_t		key_t;
 typedef __kernel_suseconds_t	suseconds_t;
-typedef __kernel_timer_t	timer_t;
-typedef __kernel_clockid_t	clockid_t;
-typedef __kernel_mqd_t		mqd_t;
 
+#ifdef __KERNEL__
+typedef __kernel_uid32_t	uid_t;
+typedef __kernel_gid32_t	gid_t;
+typedef __kernel_uid16_t        uid16_t;
+typedef __kernel_gid16_t        gid16_t;
+
+#ifdef CONFIG_UID16
+/* This is defined by include/asm-{arch}/posix_types.h */
+typedef __kernel_old_uid_t	old_uid_t;
+typedef __kernel_old_gid_t	old_gid_t;
+#endif /* CONFIG_UID16 */
+
+/* libc5 includes this file to define uid_t, thus uid_t can never change
+ * when it is included by non-kernel code
+ */
+#else
 typedef __kernel_uid_t		uid_t;
 typedef __kernel_gid_t		gid_t;
+#endif /* __KERNEL__ */
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 typedef __kernel_loff_t		loff_t;
@@ -98,40 +113,6 @@
 typedef		__s64		int64_t;
 #endif
 
-/* this is a special 64bit data type that is 8-byte aligned */
-#define aligned_u64 unsigned long long __attribute__((aligned(8)))
-#define aligned_be64 __be64 __attribute__((aligned(8)))
-#define aligned_le64 __le64 __attribute__((aligned(8)))
-
-/**
- * The type used for indexing onto a disc or disc partition.
- *
- * Linux always considers sectors to be 512 bytes long independently
- * of the devices real block size.
- */
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#else
-typedef unsigned long sector_t;
-#endif
-
-/*
- * The type of the inode's block count.
- */
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#else
-typedef unsigned long blkcnt_t;
-#endif
-
-/*
- * The type of an index into the pagecache.  Use a #define so asm/types.h
- * can override it.
- */
-#ifndef pgoff_t
-#define pgoff_t unsigned long
-#endif
-
 #endif /* __KERNEL_STRICT_NAMES */
 
 /*
@@ -139,29 +120,6 @@
  * any application/library that wants linux/types.h.
  */
 
-#ifdef __CHECKER__
-#define __bitwise__ __attribute__((bitwise))
-#else
-#define __bitwise__
-#endif
-#ifdef __CHECK_ENDIAN__
-#define __bitwise __bitwise__
-#else
-#define __bitwise
-#endif
-
-typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
-typedef __u32 __bitwise __le32;
-typedef __u32 __bitwise __be32;
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
-#endif
-typedef __u16 __bitwise __sum16;
-typedef __u32 __bitwise __wsum;
-
-
 struct ustat {
 	__kernel_daddr_t	f_tfree;
 	__kernel_ino_t		f_tinode;
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to