From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20718 invoked by alias); 16 Feb 2011 19:15:33 -0000 Received: (qmail 20703 invoked by uid 22791); 16 Feb 2011 19:15:32 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,TW_BF,TW_CX,TW_DC,TW_GC,TW_YM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nwd2mail11.analog.com (HELO nwd2mail11.analog.com) (137.71.25.57) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 19:15:24 +0000 Received: from nwd2hubcas1.ad.analog.com ([10.64.73.29]) by nwd2mail11.analog.com with ESMTP; 16 Feb 2011 14:15:23 -0500 Received: from LimkHubCAS1.ad.analog.com (10.32.51.140) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server (TLS) id 8.1.358.0; Wed, 16 Feb 2011 14:15:22 -0500 Received: from LIMKCMBX1.ad.analog.com ([169.254.1.70]) by LimkHubCAS1.ad.analog.com ([10.32.51.140]) with mapi; Wed, 16 Feb 2011 19:15:21 +0000 From: "Henderson, Stuart" To: "gcc-help@gcc.gnu.org" Date: Wed, 16 Feb 2011 20:09:00 -0000 Subject: Problem cross-compiling trunk for bfin Message-ID: <05E9E85E39C35B4D96ED3A3190E35A109CAEF87849@LIMKCMBX1.ad.analog.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2011-02/txt/msg00240.txt.bz2 Hi, I'm relatively new to GCC, so please excuse my ignorance. I've been trying to cross-compile GCC-trunk for Blackfin with uClibc, but i= t's currently failing and doesn't appear to have worked for quite some time= . The most recent release tags are all fine, but I'm keen to get trunk bui= lding again. The first problem I'm seeing is when building unwind-dw2.c (configure line = and error message at the bottom). The problem seems to be caused by a chan= ge in the generation of tm.h in the following check in: r160579 | rsandifo | 2010-06-10 21:23:43 +0100 (Thu, 10 Jun 2010) | 7 lines gcc/ * configure.ac (tm_include_list): Add insn-constants.h. * configure: Regenerate. * Makefile.in (GTM_H): Move insn-constants.h here from... (TM_H): ...here. * mkconfig.sh: Remove special handling for insn-constants.h. The change moves the inclusion of "insn-constants.h" from being conditional= on: #if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET to just: #if defined IN_GCC This causes insn-constants.h to be included here which defines various regi= ster macros that can then clash with the enum (of registers in the gregset_= t array) in uClibc's sys/ucontext.h. Although I've only hit this with bfin, it seems like it could easily hit ot= her architectures. Not having a deep enough understanding of the gcc ecosy= stem nor why the change was made, I was hoping someone could explain the be= st way to resolve this? Thanks for any help, Stu After installing target/uclibc headers for the sysroot, I configure gcc: /home/shender/gnu/toolchain/gcc-4.6/configure --build=3Dx86_64-unknown-linu= x-gnu --host=3Dx86_64-unknown-linux-gnu --target=3Dbfin-uclinux --prefix=3D= /home/shender/gnu/toolchain/bfin-uclinux --disable-libstdcxx-pch --with-sys= root=3D/home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux/runtime --enab= le-threads=3Dposix --enable-languages=3Dc --disable-threads --disable-libmu= dflap --disable-libgomp --disable-shared --enable-clocale=3Dgeneric --disab= le-symvers --disable-libssp --disable-libffi --disable-libgcj --enable-vers= ion-specific-runtime-libs --enable-__cxa_atexit and then make, which fails with: /home/shender/gnu/toolchain/gcc_build-4.6/./gcc/xgcc -B/home/shender/gnu/to= olchain/gcc_build-4.6/./gcc/ -B/home/shender/gnu/toolchain/bfin-uclinux/bfi= n-uclinux/bin/ -B/home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux/lib/= -isystem /home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux/include -is= ystem /home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux/sys-include = -g -O2 -mcpu=3Dbf532-none -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE = -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototy= pes -Wold-style-definition -isystem ./include -fpic -g -DIN_LIBGCC2 -D__= GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../../.././gcc -I/hom= e/shender/gnu/toolchain/gcc-4.6/libgcc -I/home/shender/gnu/toolchain/gcc-4.= 6/libgcc/. -I/home/shender/gnu/toolchain/gcc-4.6/libgcc/../gcc -I/home/shen= der/gnu/toolchain/gcc-4.6/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o = unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c /h= ome/shender/gnu/toolchain/gcc-4.6/libgcc/../gcc/unwind-dw2.c In file included from /home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux= /sys-include/ucontext.h:25:0, from /home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux= /sys-include/signal.h:351, from /home/shender/gnu/toolchain/gcc-4.6/libgcc/../gcc/con= fig/bfin/linux-unwind.h:31, from /home/shender/gnu/toolchain/gcc-4.6/libgcc/../gcc/unw= ind-dw2.c:333: /home/shender/gnu/toolchain/bfin-uclinux/bfin-uclinux/sys-include/sys/ucont= ext.h:39:3: error: expected identifier before numeric constant make[4]: *** [unwind-dw2.o] Error 1 make[4]: Leaving directory `/home/shender/gnu/toolchain/gcc_build-4.6/bfin-= uclinux/bf532-none/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/shender/gnu/toolchain/gcc_build-4.6/bfin-= uclinux/libgcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/shender/gnu/toolchain/gcc_build-4.6/bfin-= uclinux/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/shender/gnu/toolchain/gcc_build-4.6' make: *** [all] Error 2