[U-Boot] eNET build fails with "invalid application of 'sizeof' to incomplete type 'struct global_data'"

Loïc Minier lool at dooz.org
Mon Dec 20 12:13:58 CET 2010


        Hey

 There is now a u-boot package in Debian and Ubuntu and it fails to
 build the i386 eNET board with:
gcc -DDO_DEPS_ONLY \
                -g  -Os   -ffunction-sections  -fvisibility=hidden -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x06000000 -I/build/buildd-u-boot_2010.12~rc3-1-i386-qoDl82/u-boot-2010.12~rc3/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.4.5/include -pipe  -fno-strict-aliasing -Wstrict-prototypes -mregparm=3 -fomit-frame-pointer  -ffreestanding  -fno-toplevel-reorder  -fno-stack-protector  -mpreferred-stack-boundary=2 -DCONFIG_I386 -D__I386__ -march=i386 -Werror -fno-dwarf2-cfi-asm -Wall -Wstrict-prototypes -fno-stack-protector   \
                -o lib/asm-offsets.s lib/asm-offsets.c -c -S
lib/asm-offsets.c: In function 'main':
lib/asm-offsets.c:25: error: invalid application of 'sizeof' to incomplete type 'struct global_data' 

 The build proceeds much further if I replace sizeof(struct global_data)
 with sizeof(gd_t) in lib/asm-offsets.c.


 I'm not sure which way this should be fixed:
 * add struct global_data to arches which only have gd_t
 * use sizeof(gd_t) in lib/asm-offsets.c instead of sizeof(struct
   global_data)

-- 
Loïc Minier


More information about the U-Boot mailing list