Failed to crosscompile rtems.

haithem rahmani haithem.rahmani at gmail.com
Thu Jun 2 09:54:45 UTC 2016


Hi,

I'm trying to crosscompile the rtems on Fedora 23 using the ARM GNU
toolchain, but I failed to.

the first problem I met was the following:

configure: error: in
`/home/rahmanih/work/git_repos/misc/rtems/__build__/arm-linux-gnu/tools/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: error: /bin/sh '../../../../tools/build/configure' failed for
tools/build


since the 'tools' are supposed to be host binaries, I've forced the CC and
the CXX to use the host compilers as below.


diff --git a/tools/build/configure.ac b/tools/build/configure.ac
index d1e22da..0a0bff8 100644
--- a/tools/build/configure.ac
+++ b/tools/build/configure.ac
@@ -2,6 +2,8 @@ AC_PREREQ([2.69])
 AC_INIT([rtems-tools-build],[_RTEMS_VERSION],[
https://devel.rtems.org/newticket])
 AC_CONFIG_SRCDIR([install-if-change.in])
 RTEMS_TOP(../..)
+CC=gcc
+CXX=g++

 AC_CANONICAL_HOST


the configure step was o.k, but got errors when building, below are more
details:

make[3]: Entering directory
'/home/rahmanih/work/git_repos/misc/rtems/__build__/arm-linux-gnu/c/stm32f4'
gmake[3]: Leaving directory
'/home/rahmanih/work/git_repos/misc/rtems/__build__/arm-linux-gnu/c/stm32f4'
checking for RTEMS_CPU_MODEL...
checking for RTEMS_BSP_FAMILY... stm32f4
checking for CPU_CFLAGS... (cached) -march=armv7-m -mthumb
checking for CFLAGS_OPTIMIZE_V... (cached) -O2 -g -ffunction-sections
-fdata-sections
checking for style of include used by gmake... GNU
checking for arm-linux-gnu-gcc... arm-linux-gnu-gcc
checking for arm-linux-gnu-gcc... (cached) arm-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in
`/home/rahmanih/work/git_repos/misc/rtems/__build__/arm-linux-gnu/c/stm32f4':
configure: error: C compiler cannot create executables


the config.log contains:

configure:3523: checking whether the C compiler works
configure:3545: arm-linux-gnu-gcc -march=armv7-m -mthumb -O2 -g
-ffunction-sections -fdata-sections   conftest.c  >&5
/usr/bin/arm-linux-gnu-ld: cannot find crt1.o: No such file or directory
/usr/bin/arm-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/arm-linux-gnu-ld: cannot find -lc
/usr/bin/arm-linux-gnu-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3549: $? = 1

the command I used to configure the rtems is:
$> ../configure --host=arm-linux-gnu --enable-rtemsbsp=stm32f4
--enable-networking --enable-posix --enable-cxx


any idea about the issue?

regards
Haithem.

-- 
*Never say that's "impossible", the word itself says "I'm Possible"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160602/3a26aa87/attachment.html>


More information about the users mailing list