2

I am using a x64 cpu and trying to build a cross compiler, when making this command below some error comes:

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

error message:

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.  */

can anybody tell me what's wrong please? Thanks

link5566
  • 21
  • 1

0 Answers0