[ECOS] Re: Problems while making ecosSWtools for linux synthetic target ???

Bart Veer bartv@cygnus.co.uk
Wed Oct 6 06:31:00 GMT 1999


>>>>> "Mohammed" == Mohammed Illyas Mansoor <mansoor@cdotb.ernet.in> writes:

    Mohammed> Date: Fri, 01 Oct 1999 14:51:20 +0530
    Mohammed> From: Mohammed Illyas Mansoor <mansoor@cdotb.ernet.in>
    Mohammed> Organization: C-DOT
    Mohammed> X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.5-15 i586)
                                                                  ^^^^
    Mohammed> To: ecos-discuss@cygnus.com
    Mohammed> Subject: Problems while making ecosSWtools for linux synthetic target ???

    Mohammed> Hello everybody,
    Mohammed>                     I am trying to compile ecosSWtools for the linux
    Mohammed> synthetic target,
    Mohammed> i.e., --target=i686-pc-linux-gnu on a RedHat 6.0 linux on a Pentium m/c.
                             ^^^^
    Mohammed> the error I am getting is as below, please help me with this problem.

    Mohammed> <cut>
    Mohammed> touch stmp-headers
    Mohammed> mv libgcc1.a libgcc1.cross || (echo You must find a way to make
    Mohammed> libgcc1.a; false)
    Mohammed> mv: libgcc1.a: No such file or directory
    Mohammed> You must find a way to make libgcc1.a
    Mohammed> make[1]: *** [libgcc1.cross] Error 1
    Mohammed> make[1]: Leaving directory `/home/ecos/tmp/build/gcc'
    Mohammed> make: *** [all-gcc] Error 2
    Mohammed> make: Leaving directory `/home/ecos/tmp/build'
    Mohammed> </cut>

OK, I think I have figured out what is going on here. The build host
is an i586 machine, the target is an i686 machine, and the gcc
configury has decided that it needs to build a cross-compiler rather
than a native compiler. This is annoying, I think it would make more
sense to build a native compiler which is tuned for i686, but gcc
configury is complicated enough as it is. Unfortunately I guess that
nobody here actually tried to build the synthetic target tools on
anything except an i686.

There are two reasons why the instructions ask people to configure
with --target=i686-pc-linux-gnu. The first is to make sure that they
actually build a set of Linux tools which provides the functionality
required by eCos, as opposed to whatever collection of tools comes
with their Linux distribution. The other is that the toplevel
"targets" file has to specify a command prefix of some sort,
the current make system does not accept an empty string here.

Any of the following approaches will work:

1) build and install a native toolchain, i.e. do not specify a
   --target string when configuring. After the installation you will
   then need to set up some symbolic links, for example:

   cd /home/ecos/ecosSWtools-990319/bin
   ln -s gcc i686-pc-linux-gnu-gcc
   ln -s ar i686-pc-linux-gnu-ar
   ln -s ld i686-pc-linux-gnu-ld
   ln -s objcopy i686-pc-linux-gnu-objcopy
   ln -s gdb i686-pc-linux-gnu-gdb

2) configure and build for i586-pc-linux-gnu rather than
   i686-pc-linux-gnu. After the install you can set up symbolic links
   as per (1), or alternatively you can change the eCos targets file
   and modify the command_prefix for the i386 target

3) build and install a native toolchain, without specifying a
   target. Then it would be necessary to change the eCos targets file
   to specify an empty command_prefix string for the i386 target.
   This will not work without a patch to pkgconf.tcl, which should
   show up in the next anoncvs snapshot, or I can supply it on demand.

Bart Veer // eCos net maintainer


More information about the Ecos-discuss mailing list