public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@wippies.com>
To: gcc-help@gcc.gnu.org
Subject: Re: mip64 cross gcc build problem
Date: Mon, 07 Feb 2011 23:04:00 -0000	[thread overview]
Message-ID: <4D503ECC.8080500@wippies.com> (raw)
In-Reply-To: <AANLkTikwTQ6ctMYJxj=E3ktOUsXYF8dDEHgr7dFWw9io@mail.gmail.com>

7.2.2011 19:57, Jacky Cao kirjoitti:

> I want build cross gcc (version 4.4.5) with binutils 2.21, glibc
> 2.12.1, and prepared lib32 for n32 abi, lib for o32 and lib64 for n64.
> I configured second pass gcc with:../../gcc-4.4.5/configure
> --prefix=/usr/home/Jacky/xtools/xlp-toolchain
> --target=mipsisa64r2-linux-gnu --with-mips-plt
> --with-headers=/usr/home/Jacky/xtools/xlp-toolchain/mipsisa64r2-linux-gnu/usr/include

Using a 1-to-1 sysroot for the glibcs would be easier I think...

--with-sysroot=/usr/home/Jacky/xtools/xlp-toolchain/sysroot

and putting :

   lib
   lib32
   lib64
   usr/include
   usr/lib
   usr/lib32
   usr/lib64

there in the (final) native scheme for easy copying (Of course you are
going to copy these to the native MIPS target platform later?)

> I took the suggestion from CLFS powerpc64 cross building book, removed
> "-B$(build_tooldir)/lib/", then cross ld can't find crti.o; In my
> situation, the crti.o was in the same directory with libc.so,
> libc.so.6 and so on.

Using the "traditional" $prefix/$target install scheme for binutils and
target C library ties one to use only one 'lib' there, for the default
libs, '64'?, and using subdirs '32' and 'n32' ? in it for the multilibs.

> I've looked at configure and Makefile.in, and can manually adjust it
> to choose the right lib but I believe there has been a simple solution
> already, or is there anything I did wrong?

As was told, using a sysroot for the target C libraries installed there
in their native scheme ('lib*', 'usr/lib*', usr/include'), is the
standard nowadays... Using the traditional scheme is not recommended
and maybe not even supported :o(


      reply	other threads:[~2011-02-07 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 18:17 Jacky Cao
2011-02-07 23:04 ` Kai Ruottu [this message]

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=4D503ECC.8080500@wippies.com \
    --to=kai.ruottu@wippies.com \
    --cc=gcc-help@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).