2

我正在使用 x64 cpu 并尝试构建交叉编译器,当在下面执行此命令时会出现一些错误:

export PATH=/home/me/lab1/crossgcc2/bin:$PATH
/home/me/lab1/gcc-5.1.0/configure \
--prefix=/home/me/lab1/crossgcc2 \
--target=arm-unknown-linux-gnueabihf \
--enable-languages=c \
--with-sysroot=/home/eric/lab1/sysroot \
--with-tune=cortex-a9 --with-float=hard
make

错误信息:

In file included from /home/fly/lab1/gcc-5.1.0/libgcc/../gcc/tsystem.h:101:0,
                 from /home/fly/lab1/gcc-5.1.0/libgcc/libgcc2.c:27:
/home/fly/lab1/sysroot/usr/include/stdlib.h:510:35: error: expected ‘,’ or ‘;’ before ‘__attribute_alloc_size__’
  __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
                               ^
In file included from /home/fly/lab1/gcc-5.1.0/libgcc/../gcc/tsystem.h:108:0,
                 from /home/fly/lab1/gcc-5.1.0/libgcc/libgcc2.c:27:
    /home/fly/lab1/sysroot/usr/include/time.h:123:5: error: unknown type name ‘__syscall_slong_t’
         __syscall_slong_t tv_nsec; /* Nanoseconds.  */

谁能告诉我怎么了?谢谢

4

0 回答 0