From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3507 invoked by alias); 16 Feb 2008 20:06:28 -0000 Received: (qmail 3495 invoked by uid 22791); 16 Feb 2008 20:06:24 -0000 X-Spam-Check-By: sourceware.org Received: from smtpauth01.csee.onr.siteprotect.com (HELO smtpauth01.csee.onr.siteprotect.com) (64.26.60.145) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 16 Feb 2008 20:06:03 +0000 Received: from [192.168.1.120] (unknown [67.162.139.200]) (Authenticated sender: fwmiller@cornfed.com) by smtpauth01.csee.onr.siteprotect.com (Postfix) with ESMTP id E661B1C8029 for ; Sat, 16 Feb 2008 13:18:03 -0600 (CST) Subject: Re: Building cross compiler for x86_64 From: "Frank W. Miller" To: gcc-help In-Reply-To: <1203100254.14109.5.camel@localhost.localdomain> References: <47AF31F9.2060209@iee.org> <47B08AB2.3080508@avtrex.com> <47B0C58C.7080801@iee.org> <47B0CE17.6080408@avtrex.com> <47B1C41E.4070408@iee.org> <47B5D8ED.8050609@iee.org> <1203100254.14109.5.camel@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Date: Sat, 16 Feb 2008 20:06:00 -0000 Message-Id: <1203192353.5977.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 (2.12.1-3.fc8) Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg00194.txt.bz2 I tried recompiling both binutils and gcc using x86_64 as the target as follows: binutils: configure --target=x86_64-pc-linux make make install This works fine. Then gcc: configure --prefix=/usr/local --target=x86_64-pc-linux --enable-languages="c" make all-gcc This fails. I get the following error: /home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc/xgcc -B/home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc/ -B/usr/local/x86_64-pc-linux/bin/ -B/usr/local/x86_64-pc-linux/lib/ -isystem /usr/local/x86_64-pc-linux/include -isystem /usr/local/x86_64-pc-linux/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -DNATIVE_CROSS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../libdecnumber -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from ./gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: ../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory ../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory In file included from ./gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: ../.././gcc/gthr-posix.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_key_t’ ../.././gcc/gthr-posix.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_once_t’ ../.././gcc/gthr-posix.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_mutex_t’ ../.././gcc/gthr-posix.h:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gthread_recursive_mutex_t’ ../.././gcc/gthr-posix.h:92: error: ‘pthread_once’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:92: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_once’ ../.././gcc/gthr-posix.h:93: error: ‘pthread_getspecific’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:93: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_getspecific’ ../.././gcc/gthr-posix.h:94: error: ‘pthread_setspecific’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:94: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_setspecific’ ../.././gcc/gthr-posix.h:95: error: ‘pthread_create’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:95: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_create’ ../.././gcc/gthr-posix.h:96: error: ‘pthread_cancel’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:96: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_cancel’ ../.././gcc/gthr-posix.h:97: error: ‘pthread_mutex_lock’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:97: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_lock’ ../.././gcc/gthr-posix.h:98: error: ‘pthread_mutex_trylock’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:98: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_trylock’ ../.././gcc/gthr-posix.h:99: error: ‘pthread_mutex_unlock’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:99: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_unlock’ ../.././gcc/gthr-posix.h:100: error: ‘pthread_mutex_init’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:100: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutex_init’ ../.././gcc/gthr-posix.h:103: error: ‘pthread_key_create’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:103: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_key_create’ ../.././gcc/gthr-posix.h:104: error: ‘pthread_key_delete’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:104: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_key_delete’ ../.././gcc/gthr-posix.h:105: error: ‘pthread_mutexattr_init’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:105: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_init’ ../.././gcc/gthr-posix.h:106: error: ‘pthread_mutexattr_settype’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:106: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_settype’ ../.././gcc/gthr-posix.h:107: error: ‘pthread_mutexattr_destroy’ undeclared here (not in a function) ../.././gcc/gthr-posix.h:107: warning: type defaults to ‘int’ in declaration of ‘__gthrw_pthread_mutexattr_destroy’ ../.././gcc/gthr-posix.h:572: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:581: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:587: error: expected ‘)’ before ‘key’ ../.././gcc/gthr-posix.h:593: error: expected ‘)’ before ‘key’ ../.././gcc/gthr-posix.h:599: error: expected ‘)’ before ‘key’ ../.././gcc/gthr-posix.h:605: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:614: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:623: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:633: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:654: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:660: error: expected ‘)’ before ‘*’ token ../.././gcc/gthr-posix.h:666: error: expected ‘)’ before ‘*’ token ../.././gcc/unwind-dw2.c: In function ‘uw_init_context_1’: ../.././gcc/unwind-dw2.c:1417: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘once_regsizes’ ../.././gcc/unwind-dw2.c:1417: error: ‘once_regsizes’ undeclared (first use in this function) ../.././gcc/unwind-dw2.c:1417: error: (Each undeclared identifier is reported only once ../.././gcc/unwind-dw2.c:1417: error: for each function it appears in.) ../.././gcc/unwind-dw2.c:1417: error: ‘PTHREAD_ONCE_INIT’ undeclared (first use in this function) ../.././gcc/unwind-dw2.c:1418: warning: implicit declaration of function ‘__gthread_once’ make[2]: *** [libgcc/./unwind-dw2.o] Error 1 make[2]: Leaving directory `/home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc' make[1]: *** [stmp-multilib] Error 2 make[1]: Leaving directory `/home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/gcc' make: *** [all-gcc] Error 2 Thoughts? FM On Fri, 2008-02-15 at 11:30 -0700, Frank W. Miller wrote: > OK, so I'm off trying to build the x86_64 cross toolchain. My host is > FC8 on a PC. > > binutils-2.18 builds fine. > > configure --target=x86_64-elf > make > make install > > This gets me a nice set of tools in /usr/local/x86_64-elf/bin > > I then try to build gcc-4.2.3 > > I tried: > > configure --prefix=/usr/local --target=x86_64-elf > make all-gcc > > This gets me an error saying x86_64-elf is not a supported target. I > think tried substituting make all-gcc with make -k (after deleting the > source tree and starting over). I get this error somewhere down the > line: > > source='../.././libdecnumber/decimal128.c' object='decimal128.o' > libtool=no gcc -I../.././libdecnumber -I. -g -O2 -W -Wall > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic > -Wno-long-long -I../.././libdecnumber -I. > -c ../.././libdecnumber/decimal128.c > rm -f libdecnumber.a > ar cru libdecnumber.a decNumber.o decContext.o decUtility.o decimal32.o > decimal64.o decimal128.o > ranlib libdecnumber.a > make[2]: Leaving directory > `/home/fwmiller/Desktop/gcc-4.2.3/host-i686-pc-linux-gnu/libdecnumber' > make[1]: Target `all-host' not remade because of errors. > make[1]: Target `all-target' not remade because of errors. > make[1]: Leaving directory `/home/fwmiller/Desktop/gcc-4.2.3' > make: *** [all] Error 2 > > > Can anyone comment? > > Thanks, > FM > > >