From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Veer To: mansoor@cdotb.ernet.in Cc: ecos-discuss@sourceware.cygnus.com Subject: [ECOS] Re: Problems while making ecosSWtools for linux synthetic target ??? Date: Wed, 06 Oct 1999 06:31:00 -0000 Message-id: <199910061330.OAA00662@sheesh.cygnus.co.uk> References: <37F5E422.1B9F3CB2@cdotb.ernet.in> X-SW-Source: 1999-10/msg00029.html >>>>> "Mohammed" == Mohammed Illyas Mansoor writes: Mohammed> Date: Fri, 01 Oct 1999 14:51:20 +0530 Mohammed> From: Mohammed Illyas Mansoor 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> 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> 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