From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2688 invoked by alias); 17 Jun 2002 16:31:15 -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 2642 invoked from network); 17 Jun 2002 16:31:09 -0000 Received: from unknown (HELO motgate4.mot.com) (144.189.100.102) by sources.redhat.com with SMTP; 17 Jun 2002 16:31:09 -0000 Received: [from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate4.mot.com (motgate4 2.1) with ESMTP id JAA16968; Mon, 17 Jun 2002 09:31:07 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id JAA25432; Mon, 17 Jun 2002 09:31:06 -0700 (MST)] Received: from hyper.wm.sps.mot.com (hyper.wm.sps.mot.com [199.10.246.43]) by mail.wm.sps.mot.com (8.9.3/8.9.3) with ESMTP id MAA03067; Mon, 17 Jun 2002 12:31:01 -0400 Received: by hyper.wm.sps.mot.com (8.11.2) id g5HGV5F27734; Mon, 17 Jun 2002 12:31:05 -0400 Date: Mon, 17 Jun 2002 09:31:00 -0000 Message-Id: <200206171631.g5HGV5F27734@hyper.wm.sps.mot.com> From: Peter Barada To: M_J_BUTCHER@compuserve.com CC: gcc-help@gcc.gnu.org, gcc@gcc.gnu.org In-reply-to: <200206161840_MC3-1-294-7AE@compuserve.com> (message from Mark Butcher on Sun, 16 Jun 2002 18:40:42 -0400) Subject: Re: Tutorial 3 References: <200206161840_MC3-1-294-7AE@compuserve.com> X-SW-Source: 2002-06/txt/msg00144.txt.bz2 >Here an update of my weary journey from innocent and gullable PC user to >hardened, grey-haired GCC cross-compiler guru. Actually the journey >probably has not yet reached further than the end of the garden path and I >must still be making some kind of beginners errors - but its hope that >drives me on. You've obviously persisted long enough to get close to your goal! To help you get there I've just built up a gcc-3.0.4 version configured for mcore-elf(can't run it, don't have hardware), and I found that I had to modify gcc/config/mcore/mcore.h: Index: mcore.h =================================================================== RCS file: /usr/local/wavemark/cvs/archives/cross-linux-tools/gcc-304/gcc/config/mcore/mcore.h,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 mcore.h *** mcore.h 2002/03/04 18:05:08 1.1.1.1 --- mcore.h 2002/06/17 16:16:55 *************** *** 185,191 **** /* The MCore ABI says that bitfields are unsigned by default. */ /* The EPOC C++ environment does not support exceptions. */ ! #define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}" /* What options are we going to default to specific settings when -O* happens; the user can subsequently override these settings. --- 185,191 ---- /* The MCore ABI says that bitfields are unsigned by default. */ /* The EPOC C++ environment does not support exceptions. */ ! #define CC1_SPEC "-funsigned-bitfields" /* What options are we going to default to specific settings when -O* happens; the user can subsequently override these settings. Which drops the -fno-rtti and -fno-exceptions from the command line(needed to configure libcstd++v3). To build it, I used binutils-2.12(20020222), gcc-3.0.4, newlib-1.9.0, gdb-5.1, and a slightly tweaked crossgcc.sh script that Bill Gatliff wrote. Here's the following config.status results in the order of the construction: binutils: #!/bin/sh # This file was generated automatically by configure. Do not edit. # This directory was configured as follows: /home/pbarada/work/cvs-wavemark/cross-linux-tools/binutils-2/configure --host=i686-pc-linux-gnu --target=mcore-elf --prefix=/tmp/crap --norecursion # gcc-bootstrap: #!/bin/sh # This file was generated automatically by configure. Do not edit. # This directory was configured as follows: /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/configure --with-gcc-version-trigger=/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/version.c --host=i686-pc-linux-gnu --target=mcore-elf --prefix=/tmp/crap --enable-languages=c --with-local-prefix=/tmp/crap/mcore-elf --without-headers --with-newlib --disable-shared --verbose --norecursion # newlib: #!/bin/sh # This file was generated automatically by configure. Do not edit. # This directory was configured as follows: /home/pbarada/work/cvs-wavemark/cross-linux-tools/newlib-1.9.0/configure --host=i686-pc-linux-gnu --target=mcore-elf --prefix=/tmp/crap --norecursion # gcc: #!/bin/sh # This file was generated automatically by configure. Do not edit. # This directory was configured as follows: /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/configure --with-gcc-version-trigger=/home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/version.c --host=i686-pc-linux-gnu --target=mcore-elf --prefix=/tmp/crap --enable-languages=c,c++ --with-local-prefix=/tmp/crap/mcore-elf --with-newlib --norecursion # gdb: #!/bin/sh # This file was generated automatically by configure. Do not edit. # This directory was configured as follows: /home/pbarada/work/cvs-wavemark/cross-linux-tools/gdb-5/configure --host=i686-pc-linux-gnu --target=mcore-elf --prefix=/tmp/crap --norecursion # Notice the gcc compiler is built twice, the first time as just a c compiler, and the second as a full-up c++ compiler. You should check Bill Gatliff's website www.billgatliff.com for more information on cross compilation. The end result is: [pbarada: ~/work/cvs-wavemark/cross-linux-tools/obj/crap-mcore/mcore-elf/gcc] > /tmp/crap/bin/mcore-elf-g++ -v Reading specs from /tmp/crap/lib/gcc-lib/mcore-elf/3.0.4/specs Configured with: /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/configure --target=mcore-elf --prefix=/tmp/crap --enable-languages=c,c++ --with-local-prefix=/tmp/crap/mcore-elf --with-newlib Thread model: single gcc version 3.0.4 Hope this helps you get where you want to go.... -- Peter Barada Peter.Barada@motorola.com Wizard 781-852-2768 (direct) WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)