dtc: compile error
printk
opentkernel at 163.com
Thu Apr 28 05:30:58 UTC 2016
Hi, I use this cflags to compile rtems/cpukit/dtc/*,
I get error message below:
- - - - - - - - - - - - - - - - - - - -
make -f ./scripts/Makefile.build obj=cpukit/dtc/libfdt
arm-rtems-gcc -Wp,-MD,cpukit/dtc/libfdt/.fdt_addresses.o.d -Ic/src/lib/libbsp/shared/include -Ic/src/lib/libcpu/arm/s3c24xx/include -Ic/src/lib/libcpu/arm/in
clude -Ic/src/lib/libcpu/arm/shared/include -Icpukit -Icpukit/score/include -Icpukit/include -Icpukit/score/cpu/arm -DHAVE_CONFIG_H -DCPU_S3C2410 -D__rtems__ -I
include -mlittle-endian -Ic/src/lib/libcpu/arm/s3c24xx/include -fno-dwarf2-cfi-asm -mno-unaligned-access -fno-ipa-sra -marm -D__LINUX_ARM_ARCH__=5 -march=armv5t
e -mtune=arm9tdmi -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -fno-stack-protector -Wno-unused-but-set-variable -fom
it-frame-pointer -fno-var-tracking-assignments -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=da
te-time -Icpukit/dtc/libfdt -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(fdt_addresses)" -D"KBUILD_MODNAME=KBUILD_STR(fdt_addresses)" -c -o cpukit/dtc
/libfdt/fdt_addresses.o cpukit/dtc/libfdt/fdt_addresses.c
In file included from cpukit/dtc/libfdt/fdt_addresses.c:54:0:
cpukit/dtc/libfdt/libfdt.h: In function 'fdt_set_magic':
cpukit/dtc/libfdt/libfdt.h:192:7: error: dereferencing pointer to incomplete type 'struct fdt_header'
fdth->name = cpu_to_fdt32(val); \
^
cpukit/dtc/libfdt/libfdt.h:194:1: note: in expansion of macro '__fdt_set_hdr'
__fdt_set_hdr(magic);
^~~~~~~~~~~~~
cpukit/dtc/libfdt/libfdt.h: In function 'fdt_set_totalsize':
cpukit/dtc/libfdt/libfdt.h:192:7: error: dereferencing pointer to incomplete type 'struct fdt_header'
fdth->name = cpu_to_fdt32(val); \
^
cpukit/dtc/libfdt/libfdt.h:195:1: note: in expansion of macro '__fdt_set_hdr'
__fdt_set_hdr(totalsize);
^~~~~~~~~~~~~
cpukit/dtc/libfdt/libfdt.h: In function 'fdt_set_off_dt_struct':
cpukit/dtc/libfdt/libfdt.h:192:7: error: dereferencing pointer to incomplete type 'struct fdt_header'
- - - - - - - - - - - - - - - - - - - -
the original cc flags is:
- - - - - - - - - - - - - - - - - - - -
arm-rtems4.12-gcc --pipe -DHAVE_CONFIG_H -I../.. -I../../../cpukit/../../../smdk2410/lib/include -I../../../../../../../rtems/c/src/../../cpukit/dtc/libfdt -mcpu=arm920t -DCPU_S3C2410 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT libfdt_a-fdt_addresses.o -MD -MP -MF .deps/libfdt_a-fdt_addresses.Tpo -c -o libfdt_a-fdt_addresses.o `test -f 'fdt_addresses.c
- - - - - - - - - - - - - - - - - - - -
here is my gcc version:
- - - - - - - - - - - - - - - - - - - -
rtems at book:~/rtems-kbuild$ arm-rtems-gcc -v
Using built-in specs.
COLLECT_GCC=arm-rtems-gcc
COLLECT_LTO_WRAPPER=/home/opt/gcc-arm-rtems/libexec/gcc/arm-rtems/6.0.1/lto-wrapper
Target: arm-rtems
Configured with: ../gcc-6.0.1-RC-20160415/configure --prefix=/home/opt/gcc-arm-rtems --bindir=/home/opt/gcc-arm-rtems/bin --exec_prefix=/home/opt/gcc-arm-rtems --includedir=/home/opt/gcc-arm-rtems/include --libdir=/home/opt/gcc-arm-rtems/lib --libexecdir=/home/opt/gcc-arm-rtems/libexec --mandir=/home/opt/gcc-arm-rtems/share/man --infodir=/home/opt/gcc-arm-rtems/share/info --datadir=/home/opt/gcc-arm-rtems/share --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-rtems --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --verbose --with-newlib --with-system-zlib --disable-nls --without-included-gettext --disable-win32-registry --enable-version-specific-runtime-libs --disable-lto --enable-newlib-io-c99-formats --enable-newlib-iconv --enable-newlib-iconv-encodings=big5,cp775,cp850,cp852,cp855,cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,win_1253,win_1254,win_1255,win_1256,win_1257,win_1258 --enable-threads --disable-plugin --enable-libgomp --enable-languages=c,c++
Thread model: rtems
gcc version 6.0.1 20160415 (RTEMS 4.12, RSB 8bcc58b249fbf1f6e7bbd4151d9cf9b04c94b87e-modified, Newlib 2.4.0, little-endian) (GCC)
- - - - - - - - - - - - - - - - - - - -
what is wrong?
thanks!!
...
duhuanpeng.
u74147@gmail.com
More information about the devel
mailing list