public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@luukku.com>
To: Tom Wilson <tomw@snsys.com>
Cc: crossgcc@sources.redhat.com
Subject: Re: Help building a mipsel-r3000-elfl compiler
Date: Fri, 06 Oct 2000 09:40:00 -0000	[thread overview]
Message-ID: <39DE0112.67ED05A1@luukku.com> (raw)
In-Reply-To: <4.3.2.7.0.20001006133149.00b04a18@mail.snsys.com>

Tom Wilson wrote:

> 2)built i586-pc-linux-gnu host to mips-r3000-elfl binutils with
> --prefix=/usr/local/mips-r3000-elfl
> 3)configured  gcc 2.96.2... thus:
> 
> --target=mipsel-r3000-elfl
> --prefix=/usr/local/mipsel-r3000-elfl
> 
> (as recommended by faq)

 Cannot believe... Did the FAQ really say that you are allowed or
recommended to use different names for the install root, '--prefix=...' ?
Or was this just a typo?

> That went ok...
> 
> I try to build using make all but get various problems along the way, 95%
> of which are just sym link problems.

 The rule which the FAQ should have told is that the installation of the
target stuff happens under the $prefix/$target, so if you use a different
values for the '--prefix=...'es, the binutils stuff will be installed into
a place where GCC cannot find it... I remember you having problems with the
'xgcc' not finding the target 'as', because you used the default prefix
(/usr/local) for binutils and something else for GCC...

> I acn get as far as the test stage of the build then get an error message
> about the newly built compiler not producing execututables.

 Please explain which kind of system you think the 'mipsel-r3000-elfl' to
be ?  Ok, a R3000-compatible CPU and little-endian ELF object format but
what is the opsys or the I/O-structure in your board ?  Where does your
'Hello World' write the message? And what is the memory layout for your
executables?

  When you have these things clear, you perhaps will find the glue libraries
for the supported MIPS-boards, select someone of them for the extra one for
linking, besides only the 'libc.a', then select the linker script for the
same board and get the memory layout from it. When everything is set for
a known target, then the compiler can produce executables for it. The default
settings are in the 'specs' file ('.../gcc/specs' during the build) and the
essential specs are the '*link:' and the '*lib:'. To the first you add the
linker script name and to the second the glue library name. Something like:

----------------------------- clip ----------------------------------------
*link:
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{bestGnum} %{shared}
%{non_shared} %(linker_endian_spec) -T idt.ld%s

*lib:
-lc -lidt -lc

*libgcc:
----------------------------- clip ----------------------------------------

 Although the link-spec is wrapped here, it should be on a single line! No
extra lines between the specs, just one empty line... The IDT-board stuff
was used here, the 'libidt.a' and 'idt.ld' come with (the built) newlib.
The link- and lib-specs will appear on the same 'ld' command line, so you
could put the linker script name on the lib-spec too... The '-lc' appears
twice because it can be possible that the 'libidt.a' needs still something
from 'libc.a'. The GNU ld cannot step backwards and take something from an
already scanned library...

 After the build has succeded, you can remove the default target settings,
or replace them with your own ones.

> The aim of this is to build libstdc++v3 for the mips target.

 Just tell what happens... I remember the 'mipstx39-elf' (probably also the
'mipstx39el-elf') working with C++, but not 'mips-elf' (or 'mipsel-elf') if
built from the gcc-2.95.2 sources... Your mystic 2.96.2 can work or not...


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

  reply	other threads:[~2000-10-06  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-06  6:08 Tom Wilson
2000-10-06  9:40 ` Kai Ruottu [this message]
2000-10-06 10:04   ` Tom Wilson
2000-10-07 16:13     ` Kai Ruottu

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=39DE0112.67ED05A1@luukku.com \
    --to=kai.ruottu@luukku.com \
    --cc=crossgcc@sources.redhat.com \
    --cc=tomw@snsys.com \
    /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).