From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32261 invoked by alias); 21 Jul 2005 16:56:30 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 32242 invoked by uid 22791); 21 Jul 2005 16:56:25 -0000 Received: from yosemite.airs.com (HELO yosemite.airs.com) (205.217.158.180) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Thu, 21 Jul 2005 16:56:25 +0000 Received: (qmail 8860 invoked by uid 10); 21 Jul 2005 16:56:23 -0000 Received: (qmail 32542 invoked by uid 500); 21 Jul 2005 16:56:16 -0000 Mail-Followup-To: gcc-help@gcc.gnu.org, andrew.mccall@gmail.com To: Andrew McCall Cc: gcc-help@gcc.gnu.org Subject: Re: Problems building a cross compiler... References: <42DF9E96.7050405@gmail.com> From: Ian Lance Taylor Date: Thu, 21 Jul 2005 16:56:00 -0000 In-Reply-To: <42DF9E96.7050405@gmail.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-07/txt/msg00225.txt.bz2 Andrew McCall writes: > However, when I run make, I eventually get the following error: > > ../../gcc/libgcc2.c:41: stdlib.h: No such file or directory > ../../gcc/libgcc2.c:42: unistd.h: No such file or directory > make[3]: *** [libgcc2.a] Error 1 > make[3]: Leaving directory > `/home/mccall/haiku/src/gcc-2.95.3-haiku/gcc-obj/gcc' > make[2]: *** [stmp-multilib-sub] Error 2 > make[2]: Leaving directory > `/home/mccall/haiku/src/gcc-2.95.3-haiku/gcc-obj/gcc' > make[1]: *** [stmp-multilib] Error 1 > make[1]: Leaving directory > `/home/mccall/haiku/src/gcc-2.95.3-haiku/gcc-obj/gcc' > make: *** [all-gcc] Error 2 > > The full output can be seen here: > > http://www.h2o.demon.co.uk/haiku/haiku_gcc_make.txt > > I thought that it might have been my patches, so I tried the same > thing, but with the --target=powerpc-apple-beos, and this produces the > exact same error. > > Can anyone suggest what the problem is? Is it something to do with me > needing headers from BeOS/Haiku to build a cross compiler? Yes, that is exactly what it is. The simplest approach is to copy all the header files and libraries onto the cross-host, using the same directory layout under some directory DIR, and then configure --with-sysroot=DIR. Ian