
Nishanth Menon said the following on 04/30/2008 09:57 PM:
Commands: make sandbox_defconfig make V=1 C=2
<snip> sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Wp,-MD,common/.hush.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -D__U_BOOT__ -Iinclude -include include/linux/autoconf.h -fno-builtin -ffreestanding -nostdinc -Wall -pipe -fno-strict-aliasing -P -fno-common -Os
^^^^^^
-Dmalloc=u_boot_malloc -Dfree=u_boot_free -Drealloc=u_boot_realloc -Dread=u_boot_read -Dwrite=u_boot_write -Dopen=u_boot_open -Dclose=u_boot_close -Dlseek=u_boot_lseek -Dperror=u_boot_perror -Derrno=u_boot_errno -Dgetc=u_boot_getc -Dputc=u_boot_putc -Dfgetc=u_boot_fgetc -Dfputc=u_boot_fputc -Dfgets=u_boot_fgets -Dfputs=u_boot_fputs -Dsetenv=u_boot_setenv -Dgetenv=u_boot_getenv -Dprintf=u_boot_printf -Dglob=u_boot_glob -Dglobfree=u_boot_globfree -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hush)" -D"KBUILD_MODNAME=KBUILD_STR(hush)" common/hush.c ; include/stdio.h:4:11: error: unable to open 'stdarg.h' make[1]: *** [common/hush.o] Error 1 make: *** [common] Error 2
Just an update: two -nostdinc and one additional -isystem was removed from the command line as marked above: sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wp,-MD,common/.hush.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -D__U_BOOT__ -Iinclude -include include/linux/autoconf.h -fno-builtin -ffreestanding -Wall -pipe -fno-strict-aliasing -P -fno-common -Os -Dmalloc=u_boot_malloc -Dfree=u_boot_free -Drealloc=u_boot_realloc -Dread=u_boot_read -Dwrite=u_boot_write -Dopen=u_boot_open -Dclose=u_boot_close -Dlseek=u_boot_lseek -Dperror=u_boot_perror -Derrno=u_boot_errno -Dgetc=u_boot_getc -Dputc=u_boot_putc -Dfgetc=u_boot_fgetc -Dfputc=u_boot_fputc -Dfgets=u_boot_fgets -Dfputs=u_boot_fputs -Dsetenv=u_boot_setenv -Dgetenv=u_boot_getenv -Dprintf=u_boot_printf -Dglob=u_boot_glob -Dglobfree=u_boot_globfree -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hush)" -D"KBUILD_MODNAME=KBUILD_STR(hush)" common/hush.c ;
include/elf.h:374:5: warning: undefined preprocessor identifier 'ELF_CLASS' include/glob.h:172:5: warning: undefined preprocessor identifier '_FILE_OFFSET_BITS' include/glob.h:185:5: warning: undefined preprocessor identifier '_FILE_OFFSET_BITS' common/hush.c:350:6: warning: symbol 'simple_itoa' was not declared. Should it be static? common/hush.c:898:13: warning: Using plain integer as NULL pointer common/hush.c:898:27: warning: Using plain integer as NULL pointer common/hush.c:1604:1: warning: symbol '__u_boot_cmd_sh' was not declared. Should it be static? common/hush.c:1634:1: warning: symbol '__u_boot_cmd_source' was not declared. Should it be static?
Compiles fine. removing two nostdinc definition does not make sense other than thinking as a gcc/sparse issue.. does anyone have some more information on this? Regards, Nishanth Menon