From: Momchil Velikov <velco@fadata.bg>
To: wung_y@263.net
Cc: Dan Malek <dan@netx4.com>, Andreas Tobler <a.tobler@schweiz.ch>,
linux-ce-devel <linuxce-devel@linuxce.org>,
linux-ppc <linuxppc-dev@lists.linuxppc.org>,
linuxppc embedded mail list
<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: help, build Cross GCC
Date: Fri, 29 Oct 1999 16:03:35 +0300 [thread overview]
Message-ID: <38199B27.492FE947@fadata.bg> (raw)
In-Reply-To: 381912CE.9DB75640@263.net
Wang Yong wrote:
>
> hi, Dan:
> i am now building a gcc for powerpc on i686. i have downloaded
> binutils-2.9.5.0.16 and gcc-2.95.2. i need the latest version of gcc
> for i want to build program for powerpc403 and powerpc401.
> and then, i first built binutils by these step:
> 1. decompress the binutils-2.9.5.0.16.tar to a temp directory.
> 2. chdir to that directory and run "./configure
> --target=powerpc-linux-gnu"
> 3. run "make" and "make install"
>
> after all these done, i build binutils to /usr/local/bin.
> next i begin to build gcc:
> 1. decompress the gcc-2.95.2 to another temp directory.
> 2. chdir to that directory and run "./configure
> --target=powerpc-linux-gnu"
> 3. run "make" and "make install"
>
> but this time, i failed. make told me it failed to find stdlib.h and
> uinstd.h
> when build libgcc2.a. then i tried to modify the Makefile and this line:
> CFLAGS = -g -O2 -Dinhibit_libc
>
> after run make, another error came out :-(
> --------------------
> checking for sys/time.h... yes
> checking for sys/resource.h... yes
> checking for sys/wait.h that is POSIX.1 compatible... no
> checking whether the C compiler (/root/gcc-2.95.2/gcc/xgcc
> -B/root/gcc-2.95.2/gcc/ -B/usr/local/powerpc-linux-gnu/bin/ -g -O2
> -Dinho
> configure: error: installation or configuration problem: C compiler
> cannot create executables.
> make[1]: Entering directory `/root/gcc-2.95.2/powerpc-linux-gnu/libio'
> test x"no" != xyes ||\
> /root/gcc-2.95.2/gcc/xgcc -B/root/gcc-2.95.2/gcc/
> -B/usr/local/powerpc-linux-gnu/bin/ -c -g -O2 -Dinhibit_libc -I. -I.
> -D_IO_MTSAo
> /root/gcc-2.95.2/gcc/xgcc -B/root/gcc-2.95.2/gcc/
> -B/usr/local/powerpc-linux-gnu/bin/ -c -g -O2 -Dinhibit_libc -I. -I.
> -D_IO_MTSAFEc
> In file included from iogetline.c:26:
> libioP.h:30: errno.h: No such file or directory
> In file included from iolibio.h:1,
> from libioP.h:47,
> from iogetline.c:26:
> libio.h:30: _G_config.h: No such file or directory
> iogetline.c:27: string.h: No such file or directory
> make[1]: *** [iogetline.o] Error 1
> make[1]: Leaving directory `/root/gcc-2.95.2/powerpc-linux-gnu/libio'
> make: *** [all-target-libio] Error 2
> --------------------
> somebody told me i must install lib and include file for the ppc first.
> but where to download them.
> do you think i still miss something. would you please show me the right
> step to build?
I built a cross-dev environment sometime ago. Here's what I did:
0. got glibc-?.tar.gz from the usual places
get binutils-?.tar.gz
get egcs-?.tar.gz
1. Built and installed binutils
2. Began with the egcs
configure --prefix=/usr/local \
--build=i686-pc-linux-gnu \
--host=i686-pc-linux-gnu \
--target=powerpc-unknown-linux-gnu
make LANGUAGES=c
make -k
/* make fails, trying to build libgcc.a */
make -k LANGUAGES=c install
/* now we have a compiler, which compiles. We can't link yet, so
* we can't create shared libs or executables, but we _can_ create
* static glibc
*/
3. Began with glibc
configure --prefix=/usr/local \
--build=i686-pc-linux-gnu \
--host=powerpc-unknown-linux-gnu \
--enable-add-ons=crypt,linuxthreads \
--disable-profile
make -k
/* build fails when trying to link some execitables
* and some shared libs
*/
make -k install install_root=whatever
/* now we have enough headers and static librararies to complete
* the build of gcc
*/
4. Back to egcs
make
make install
/* no errors at this point, now we have complete gcc */
5. Back to glibc
make
make install install_root=whatever
/* no errors anymore */
That's all. Don't rely on the exact parameters to configure,
I got them from memory.
Regards,
-velco
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-10-29 13:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-28 13:00 help, build Cross GCC Wang Yong
1999-10-28 13:21 ` Andreas Tobler
1999-10-28 16:25 ` Dan Malek
1999-10-29 3:21 ` Wang Yong
1999-10-29 13:03 ` Momchil Velikov [this message]
1999-10-30 1:48 ` Wang Yong
1999-10-28 15:15 ` Grant Erickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38199B27.492FE947@fadata.bg \
--to=velco@fadata.bg \
--cc=a.tobler@schweiz.ch \
--cc=dan@netx4.com \
--cc=linuxce-devel@linuxce.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=wung_y@263.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).