I am using CrossTool NG and Buildroot to create a rootfs. I am trying to add SDL2\_ttf to that rootfs.

I export the following environment variables
CC=arm-linux-gcc

CPPFLAGS=-I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include -I/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/staging/usr/include -I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include/freetype2

CFLAGS=--sysroot=/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/

LDFLAGS=-L/home/peter/igep2015/94SDLttf/pmtstaging/usr/lib/

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* output \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
ld.bfd: skipping incompatible /usr/lib/i386-linux-gnu/libpthread.so when searching for -lpthread

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/5.1.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: skipping incompatible /usr/lib/i386-linux-gnu/libpthread.a when searching for -lpthread

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/5.1.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: cannot find /lib/libpthread.so.0

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/5.1.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: cannot find /usr/lib/libpthread\_nonshared.a

collect2: error: ld returned 1 exit status

When I add -L/Buildroot library or -L/arm-linux library in order to find libpthread, the ./configure fails. Copying libpthread ...pmtstaging/usr/lib has no effect. I have already successfully added libfreetype and libpng12 to pmtstaging. Plus I copied libSDL2 and libz from Buildroot to pmtstaging. 

Has anyone successfully cross compiled SDL2\_ttf to arm-linux? Can it be done?