Getting error while cross compiling

i used the following command to cross compile for arm cortex m4 board

clang++ --target=arm-arm-none-eabi -mfloat-abi=hard -DCPU_LPC54628J512ET180=1 -DCPU_LPC54628J512ET180_cm4 -DCPU_LPC54628 -D__USE_CMSIS -DSERIAL_PORT_TYPE_UART=1 -DSDK_DEBUGCONSOLE=0 -DCR_I1 -Wall -mcpu=cortex-m4 -mlittle-endian -mthumb -mfpu=fpv4-sp-d16 -DLPX17xx -Os -c OMTensor.c -o main2.o

and i got the following error while cross compiling for m4 board

clang: warning: treating ‘c’ input as ‘c++’ when in C++ mode, this behavior is deprecated [-Wdeprecated]
In file included from OMTensor.c:12:
In file included from ./OMTensor.inc:13:
In file included from ./cassert:34:
In file included from ./config.h:430:
In file included from ./defines.h:30:
./features.h:396:10: fatal error: ‘gnu/stubs.h’ file not found
#include <gnu/stubs.h>

so i request to solve this error

OMTensor.c is c file while you are invoking clang++ which is use for c++ program compiling.

Seems You are missing the developers glibc package which provides this header file.
Try installing it by-

sudo apt-get install libc6-dev on Ubuntu