cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
230 Views
Registered: ‎07-23-2019

How to cross compile with ARM R5

Jump to solution

I'm trying to cross compile an xml parser libxml2 version 2.9.9 to use as a library in RPU baremetal app.

The compiler for ARM R5 is armr5-none-eabi-gcc.

I write the following command for configuration:

./configure --host=arm-none-eabi --build=none --target=arm-none-eabi --prefix=/home/ubuntu/Documents/libxml2/libxml2_arm CC=armr5-none-eabi-gcc --with-mcpu=cortex-r5

and I get the following error in terminal- configure: error: C compiler cannot create executables 

and from config.log:

configure:3611: /tools/Xilinx/SDK/2018.3/gnu/armr5/lin/gcc-arm-none-eabi/bin/armr5-none-eabi-gcc -V >&5
armr5-none-eabi-gcc: error: unrecognized command line option '-V'
armr5-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3622: $? = 1
configure:3611: /tools/Xilinx/SDK/2018.3/gnu/armr5/lin/gcc-arm-none-eabi/bin/armr5-none-eabi-gcc -qversion >&5
armr5-none-eabi-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
armr5-none-eabi-gcc: fatal error: no input files
compilation terminated.
configure:3622: $? = 1
configure:3642: checking whether the C compiler works
configure:3664: /tools/Xilinx/SDK/2018.3/gnu/armr5/lin/gcc-arm-none-eabi/bin/armr5-none-eabi-gcc conftest.c >&5
/tools/Xilinx/SDK/2018.3/gnu/armr5/lin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2: error: ld returned 1 exit status

I am missing something? Is there another way to cross-compile with gcc for arm r5?

0 Kudos
1 Solution

Accepted Solutions
yzhang
Moderator
Moderator
86 Views
Registered: ‎05-11-2010

Some options in the configure file of your libxml2 are not valid for this compiler. Please make sure this library is compatible with arm R5. You can run "armr5-none-eabi-gcc --help" to see valid options for this compiler, and try to replace the options with valid ones.

View solution in original post

2 Replies
yzhang
Moderator
Moderator
87 Views
Registered: ‎05-11-2010

Some options in the configure file of your libxml2 are not valid for this compiler. Please make sure this library is compatible with arm R5. You can run "armr5-none-eabi-gcc --help" to see valid options for this compiler, and try to replace the options with valid ones.

View solution in original post

32 Views
Registered: ‎07-23-2019

Hey,

Didn't help...

I gave up and used in the project source an header files for a simple xml parser. The easiest way...

0 Kudos