public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Barada <pbarada@mail.wm.sps.mot.com>
To: M_J_BUTCHER@compuserve.com
Cc: gcc-help@gcc.gnu.org, gcc@gcc.gnu.org
Subject: Re: Tutorial 3
Date: Mon, 17 Jun 2002 09:31:00 -0000	[thread overview]
Message-ID: <200206171631.g5HGV5F27734@hyper.wm.sps.mot.com> (raw)
In-Reply-To: <200206161840_MC3-1-294-7AE@compuserve.com> (message from Mark Butcher on Sun, 16 Jun 2002 18:40:42 -0400)


>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)

  parent reply	other threads:[~2002-06-17 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-16 15:42 Mark Butcher
2002-06-17  1:57 ` Andrew Haley
2002-06-17  9:31 ` Peter Barada [this message]
2002-06-17 13:25 ` Phil Edwards
2002-06-18 14:41 Mark Butcher
2002-06-18 14:41 Mark Butcher
2002-06-18 16:56 ` Hans-Peter Nilsson
2002-06-19 14:01 ` Peter Barada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200206171631.g5HGV5F27734@hyper.wm.sps.mot.com \
    --to=pbarada@mail.wm.sps.mot.com \
    --cc=M_J_BUTCHER@compuserve.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).