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] |
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |