From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23833 invoked by alias); 22 Jun 2003 17:21:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 23824 invoked from network); 22 Jun 2003 17:21:54 -0000 Received: from unknown (HELO dellpi.pinski.fam) (216.196.139.243) by sources.redhat.com with SMTP; 22 Jun 2003 17:21:54 -0000 Received: from physics.uc.edu (IDENT:pinskia@localhost.pinski.fam [127.0.0.1]) by dellpi.pinski.fam (8.12.2/8.12.1) with ESMTP id h5MHLpMJ000685; Sun, 22 Jun 2003 13:21:51 -0400 (EDT) Date: Sun, 22 Jun 2003 17:50:00 -0000 Subject: Re: cross-compilation documentation Content-Type: multipart/mixed; boundary=Apple-Mail-12-685899751 Mime-Version: 1.0 (Apple Message framework v552) Cc: Andrew Pinski , dank@kegel.com, wilson@tuliptree.org, gcc@gcc.gnu.org To: Peter Barada From: Andrew Pinski In-Reply-To: <20030622170936.2846398E00@baradas.org> Message-Id: <02F74B2F-A4D6-11D7-AD8C-000393A6D2F2@physics.uc.edu> X-SW-Source: 2003-06/txt/msg01877.txt.bz2 --Apple-Mail-12-685899751 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 1425 On Sunday, Jun 22, 2003, at 13:09 US/Eastern, Peter Barada wrote: > >> No you do not have install the headers because you can pass to gcc >> --without-headers and that will make sure that you do not compile >> the sources that require glibc's headers. >> >> So total process is: >> cd gccobjdir >> .../gcc-sources/configure --without-headers --target=???-linux-gnu >> --prefix=??? --enable-languages=c > > That doesn't work (at least for ppc-linux) since > gcc-3.3/config/rs6000/linux.h #includes when building > libgcc2, which causes it to fail since there are no headers(yet). > > The *real* solution is to suppress building libgcc as part of the > cross compilation bootstrap so the circular dependency of > compiler-headers-compiler is broken. > I have succeeded in building a ppc-linux target by tweaking the > obj/gcc-bootstrap/gcc/Makefile to suppress the definitions of LIBGCC > and INSTALL_LIBGCC(the following fragment from my master build > Makefile): > > fix-bootstrap1-makefile: > cd ${BOOTSTRAP1_BUILDDIR}/gcc ; \ > sed -e '1,$$s/^LIBGCC =/# LIBGCC =/;1,$$s/^INSTALL_LIBGCC =/# > INSTALL_LIBGCC =/' < Makefile > Makefile.new ; \ > mv Makefile.new Makefile > > I'm working(slowly) on adding a --without-libgcc to gcc/configure to > do this... That is a bug in the config of rs6000 of gcc which should be fixed, I have a patch for it and there is no need for --without-libgcc: try this patch: --Apple-Mail-12-685899751 Content-Disposition: attachment; filename=temp.linux.diff Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="temp.linux.diff" Content-length: 585 Index: linux.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux.h,v retrieving revision 1.41 diff -u -r1.41 linux.h --- linux.h 17 Jun 2003 15:53:33 -0000 1.41 +++ linux.h 22 Jun 2003 17:17:41 -0000 @@ -91,7 +91,7 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ -#ifdef IN_LIBGCC2 +#if defined (IN_LIBGCC2) && !defined (inhibit_libc) #include /* During the 2.5 kernel series the kernel ucontext was changed, but --Apple-Mail-12-685899751 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 64 I will submit it if it works for you. Thanks, Andrew Pinski --Apple-Mail-12-685899751--