From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8772 invoked by alias); 23 Jun 2003 02:49:56 -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 3579 invoked from network); 23 Jun 2003 02:48:05 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sources.redhat.com with SMTP; 23 Jun 2003 02:48:05 -0000 Received: by baradas.org (Postfix, from userid 500) id 6D3E998DFD; Sun, 22 Jun 2003 22:48:05 -0400 (EDT) From: Peter Barada To: drow@mvista.com Cc: zack@codesourcery.com, dank@kegel.com, pinskia@physics.uc.edu, wilson@tuliptree.org, gcc@gcc.gnu.org In-reply-to: <20030622194204.GA7163@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 22 Jun 2003 15:42:04 -0400) Subject: Re: cross-compilation documentation References: <02F74B2F-A4D6-11D7-AD8C-000393A6D2F2@physics.uc.edu> <878yruf1pl.fsf@egil.codesourcery.com> <3EF5FACA.9020400@kegel.com> <87znkadj94.fsf@egil.codesourcery.com> <20030622193607.98A4D98DFD@baradas.org> <20030622194204.GA7163@nevyn.them.org> Message-Id: <20030623024805.6D3E998DFD@baradas.org> Date: Mon, 23 Jun 2003 09:10:00 -0000 X-SW-Source: 2003-06/txt/msg01899.txt.bz2 >> What am I missing here? > >Unless the code ends up _included_ in glibc. > >Or in any of the dozens of little applications built at the same time >as glibc, for instance. what 'dozens of little applications' are built by glibc, and are they installed and used by glibc? I've had ssucess building a toolchain vor ppc-linux by building *two* bootstrap compilers and *two* glibcs: 1) first bootstrap compiler that has *no* libgcc which is used for the: 2) first glibc configurd/built only to install-headers 3) second bootstrap compiler can now be built(and build ligbcc) since the headers are in place 4) second glibc that is fully built using the second bootstrap compiler 5) full gcc with c++ using the second bootstrap compiler. Is there a more efficient method that *doesn't* require building two bootstrap compilers or effectively building glibc twice? BTW, the patch suggested by Andrew Pinkski: > 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 > fails to build a bootstrap compiler when configure for --target=ppc-linux with: ${GCC_SOURCE_PATH}/configure --target=${TARGET} \ --prefix=${INSTALL_DIR} \ --with-local-prefix=${INSTALL_DIR}/${TARGET} \ --without-headers \ --disable-shared --enable-languages=c \ --disable-threads It barfs with: /home/peter/work/cvs-local/xgcc/obj/ppc-linux/ppc-linux-bootstrap2/gcc/xgcc -B/home/peter/work/cvs-local/xgcc/obj/ppc-linux/ppc-linux-bootstrap2/gcc/ -B/home/mylocal/xcomp/target/ppc-linux/bin/ -B/home/mylocal/xcomp/target/ppc-linux/lib/ -isystem /home/mylocal/xcomp/target/ppc-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/peter/work/cvs-local/xgcc/gcc-3.3/gcc -I/home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/. -I/home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/config -I/home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/../include -fPIC -mstrict-align -fexceptions -c /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c:26: /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-pe.h: In function `size_of_encoded_value': /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-pe.h:76: warning: implicit declaration of function `abort' /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c: In function `extract_cie_info': /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c:247: warning: implicit declaration of function `strlen' /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c: In function `uw_frame_state_for': /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c:928: warning: implicit declaration of function `memset' /home/peter/work/cvs-local/xgcc/gcc-3.3/gcc/unwind-dw2.c:939: error: `SIGNAL_FRAMESIZE' undeclared (first use in this function) ... So not including the headers won't cut it. The code that refers to any defintions(such as the size of the SIGNALE_FRAMESIZE) has to be disabled under #if !defined(inhibit_libc), and that doesn't sound like a very elegant solution... Any other suggestions? -- Peter Barada peter@baradas.org