This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: gen-params problem during make all install of gcc for powerpc -eabi with Solaris host


Mine is now working fine, thanks to excellent advice from David Korn and
Joao Cadamuro Junior.  Here is my new procedure (I apologize for the
excessive detail):

Do this as root.

1. install a "native" gcc in /export/home/opt/gnu/bin per GNU "Deluxe
Distribution" CD instructions

2. set up directories for source files and executables

#cd /export/home
#mkdir gnu-source xc
#cd /export/home/gnu-source  

3. Copy binutils-2.11.90.0.1, gcc-2.95.2, newlib-1.9.0, and gdb-5.0 from
cdrom to
/export/home/gnu-source, gunzip them, and "untar" them via
 
#tar xvf foo.tar

4. This results in subdirectories binutils-2.11.90.0.1, gcc-2.95.2,
newlib-1.9.0, and gdb-5.0 beneath gnu-source.  Create 4 working directories
from gnu-source

#mkdir build-binutils build-gcc build-newlib build-gdb

5. Define shell and environment variables

#host=sparc-sun-solaris2
#target=powerpc-eabi
#prefix=/export/home/xc
#i=$prefix/bin
#PATH=$i:$prefix:$PATH:/export/home/opt/gnu/bin; export PATH
#CC=/export/home/opt/gnu/bin/gcc; export CC

6. configure and install binutils

#cd build-binutils
#../binutils-2.11.90.0.1/configure --target=$target --prefix=$prefix -v
#make all install

7. Establish symbolic links to allow for C cross compiler build

#cd /export/home/gnu-source/gcc-2.95.2
#ln -s ../newlib-1.9.0/newlib newlib
#ln -s ../newlib-1.9.0/libgloss libgloss

8. Configure and install gcc for C cross compilation only

#cd /export/home/gnu-source/build-gcc
#../gcc-2.95.2/configure --target=$target --prefix=$prefix
--enable-languages=c -v
#make all install

9. Build and install the libraries

#cd /export/home/gnu-source/build-newlib
#../newlib-1.9.0/configure --target=$target --prefix=$prefix -v
#make all install

10. Reconfigure and install gcc for C and C++ and add additional languages

#cd /export/home/gnu-source/build-gcc
#../gcc-2.95.2/configure --target=$target --prefix=$prefix -v
#make all install

11. Build and install the debugger

#cd /export/home/gnu-source/build-gdb
#make all install

Regards, Steve Conyers

-----Original Message-----
From: jimk@scitechsoft.com [mailto:jimk@scitechsoft.com]
Sent: Thursday, April 19, 2001 5:32 PM
To: crossgcc@sourceware.cygnus.com
Subject: RE: gen-params problem during make all install of gcc for
powerpc -eabi with Solaris host


I'm also new to cygwin and building a cross-compiler and I've made 
some progress thanks especially to the email below, but I'm having 
some problems now.  Here's my setup

#host=i686-pc-cygwin32
#target=i486-linux
#prefix=/usr/cross-linux
#PATH=$prefix/bin:$prefix:$PATH
#CC=/usr/native/bin/gcc

Here's what I did
Build native gcc in /usr/native

Build binutils using:
#cd build-binutils-linux
#/binutils-2.11/configure --target=$target --prefix=$prefix -v
#make all install

Appears successful!

Build cross gcc:
#cd build-gcc-linux
#/gcc-2.95.3-2/configure --target=$target --prefix=$prefix --with-
headers=/newlib-1.9.0/newlib/libc/include --with-newlib -v
#make LANGUAGES="c" all install

I kept get a not found error message on errno.h (just like below with 
newlib) until I added both the --with-headers line and the --with-
newlib line.  I also tried it with the soft links first and always got the 
error message.  After I added both of those, and removed the soft 
links, this build appears to have built successfully.

Attempted to build newlib:
#cd build-newlib-linux
#/newlib-1.9.0/newlib/configure --target=$target --prefix=$prefix -v
#make all install

It comes back with the following error:
In file included from /newlib-1.9.0/newlib/libc/../libc/include/time.h:32,
                 from /newlib-
1.9.0/newlib/libc/../libc/include/sys/reent.h:14,
                 from /newlib-1.9.0/newlib/libc/../libc/include/reent.h:48,
                 from /newlib-1.9.0/newlib/libc/stdlib/__adjust.c:6:
../../targ-include/sys/types.h:27: linux/types.h: No such file or 
directory
In file included from /newlib-1.9.0/newlib/libc/../libc/include/errno.h:1,
                 from /newlib-1.9.0/newlib/libc/stdlib/std.h:3,
                 from /newlib-1.9.0/newlib/libc/stdlib/__adjust.c:7:
../../targ-include/sys/errno.h:26: asm/errno.h: No such file or 
directory
make[3]: *** [__adjust.o] Error 1
make[3]: Leaving directory `/build-newlib-linux/i486-
linux/newlib/libc/stdlib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build-newlib-linux/i486-linux/newlib/libc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build-newlib-linux/i486-linux/newlib'
make: *** [all-target-newlib] Error 2

I tried adding the --with-includes and --with-newlib (just winging it) 
and I still get these errors.

Any thought?  Major thanks in advance.
-Jim



On 19 Apr 2001, at 12:51, David Korn wrote:

> >-----Original Message-----
> >From: Conyers, Steve [mailto:steve.conyers@lmco.com]
> >Sent: 18 April 2001 22:26
> 
> >#cd build-binutils
> >#../binutils-2.11.90.0.1/configure --target=$target --prefix=$prefix
> >--with-headers=/export/home/gnu-source/newlib-1.9.0/newlib/libc
> >/include -v
> >#make all install
> 
>   The --with-headers is for the gcc configure, not binutils!!! That's 
why
> it doesn't help and you have to try the next step:
> 
> >4. workaround probable bug in autogenerated scripts of step 5
> >
> >#cd $prefix/powerpc-eabi
> >#ln -s sys-include include
> 
>   Also, the newlib headers are already ANSI compliant, and so 
don't 
> actually need fixing.  I don't think it would matter running fixincs 
over
> them anyway, Kai Ruottu thinks it shouldn't be done unless it is 
> necessary.  If you agree with me you could add that --with-
headers flag
> to the gcc configure line; if you take Kai's view, you should make 
a couple
> of soft links in your gcc *source* directory
> 
> #cd /export/home/gnu-source/gcc-2.95.2
> #ln -s ../newlib-1.9.0/newlib newlib
> #ln -s ../newlib-1.9.0/libgloss libgloss
> 
>   Kai is probably right, in that it's probably more 'proper' to not 
process
> anything that doesn't need processing rather than to process it 
and hope
> the processing turns out to be a correctly null operation...
> 
> >5. configure and (almost) install gcc
> >
> >#cd /export/home/gnu-source/build-gcc
> >#../gcc-2.95.2/configue --target=$target --prefix=$prefix -v
> >#make all install
> 
>   This should actually say
> 
> #cd /export/home/gnu-source/build-gcc
> #../gcc-2.95.2/configue --target=$target --prefix=$prefix -v
> #make LANGUAGES="c" all install
> 
>  because until the library is built, you can't build the C++ part of 
the
> compiler.  So you build the compiler for C only at first.  And if you 
> haven't chosen to use the soft links, it should have the --with-
headers
> flag instead.
> 
> >(more disturbingly) "whether the C compiler works...no
> >configure: error: installation or configuration problem: C 
> >compiler cannot create executables."
> 
>   And this is the symptom.  The compiler certainly can't create 
.exes at
> this point, because you haven't built newlib yet, and so it doesn't 
have
> any startup or c library files to link with.  It will, however, be able
> to do raw compiles using -nostdlib so it doesn't need any of the 
libs or
> crt files; and that's how newlib can be built.
> 
>   After you've built the C-only compiler, you should cd into your 
newlib
> build dir, and configure, build and install it.
> 
>   Finally, it will be possible to return to the Gcc build dir, and repeat
> the "make all install" command, only this time without the 
LANGUAGES=
> setting.  That will build the remaining parts of the compiler, making 
use
> of the fresh newlib.
> 
>    hth,
>      DaveK
> -- 
>  All your base are belong to the Israeli army!  Oh, now they aren't 
again!
> 
> 
> 
**********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please 
notify
> the system manager.
> 
> This footnote also confirms that this email message has been 
swept by
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.com
> **********************************************************************
> 
> ------
> Want more information?  See the CrossGCC FAQ, 
http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-
unsubscribe@sourceware.cygnus.com
> 
> 



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to
crossgcc-unsubscribe@sourceware.cygnus.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]