Failed to crosscompile rtems.

haithem rahmani haithem.rahmani at gmail.com
Thu Jun 2 10:00:46 UTC 2016


$ dnf info gcc-arm-linux-gnu
Last metadata expiration check performed 2 days, 0:00:26 ago on Tue May 31
10:49:03 2016.
Installed Packages
Name        : gcc-arm-linux-gnu
Arch        : x86_64
Epoch       : 0
Version     : 5.3.1
Release     : 2.fc23
Size        : 39 M
Repo        : @System
>From repo   : updates
Summary     : Cross-build binary utilities for arm-linux-gnu
URL         : http://gcc.gnu.org
License     : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
and LGPLv2+ and BSD
Description : Cross-build GNU C compiler.
            :
            : Only building kernels is currently supported.  Support for
cross-building
            : user space programs is not currently provided as that would
massively multiply
            : the number of packages.


On Thu, Jun 2, 2016 at 11:00 AM, haithem rahmani <haithem.rahmani at gmail.com>
wrote:

> Got the reason!
>
> On Thu, Jun 2, 2016 at 10:54 AM, haithem rahmani <
> haithem.rahmani at gmail.com> wrote:
>
>> 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"*
>>
>
>
>
> --
> *Never say that's "impossible", the word itself says "I'm Possible"*
>



-- 
*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/210c7796/attachment.html>


More information about the users mailing list