简体   繁体   中英

Need to build libxml2 for arm with VFP support

I have ANSI C project where I use libxml2. But I can't build project because of the following error: "main_project" uses VFP register arguments "libxml2" does not. So now I want to build libxml2 with VFP support. How can I do it? I tried:

sudo ./configure CC=arm-linux-gnueabi-gcc --build=i686-linux --host=arm-linux --without-iconv --without-zlib --without-python --prefix=/usr/lib/libxml2-arm/ CFLAGS="-fno-stack-protector -mfloat-abi=hard -mfpu=neon"  LDFLAGS="-fno-stack-protector"
make & make install

But flags "-mfloat-abi=hard -mfpu=neon" didn't seem to work out - the error still remains. What can be the problem? (target platform - Sitara AM335x, linux kernel 4.14.40, gcc version arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0).

I've found what was the problem. I used the wrong compiler which does not support VFP ( CC=arm-linux-gnueabi-gcc , no hf suffix). Instead I used CC=arm-buildroot-linuxuclibcgnueabihf-gcc this time, that compiler has hf suffix, so it supports VFP. Now the library is successfully built with VFP registers support. Checked it with the following command:

readelf -A /usr/lib/libxml2-arm/lib/libxml2.a | grep Tag_ABI_VFP_args

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM