Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: guo guo <sunnyboyguo@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: problem about the tool chain for R3000
Date: Wed, 29 Aug 2007 16:51:17 -0700	[thread overview]
Message-ID: <46D60675.2070709@avtrex.com> (raw)
In-Reply-To: <50f30abd0708291609i72e4aa57oce757d79a7e87fd6@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 956 bytes --]

guo guo wrote:
> Dear All,
> 
> I'm trying to build tool chain with gcc4.2, binutils2.17 and glibc2.5
> for mips r3000 chip.
> During configure gcc I add ¨Cmabi=32 ¨Cmarch=r3000 ¨Cmtune=r3000. and
> during building glibc, I add CFLAGS= -O2 ¨Cmabi=32 ¨Cmarch=r3000
> ¨Cmtune=r3000,
> Then I dissembled the libc-2.5.90.so to check the instructions. I
> found it has two instructions rdhwr(0x7c03e83b) and sync(0x0000000f)
> that don't belongs to mips r3000.

The rdhwr and sync are used by the NPTL pthread library and must be
emulated by the linux kernel.  Probably you will see ll and sc in there
as well.  If you use glibc2.3.x with Linux threads then the rdhwr will
not be generated.

 Probably if you did not use libpthread you would not need any of the
thread synchronization primitives that cause ll,sc, and sync to be
generated.

But if you want libpthread and your CPU does not support the
instructions, you will have to emulate them.


David Daney

  reply	other threads:[~2007-08-29 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 23:09 problem about the tool chain for R3000 guo guo
2007-08-29 23:51 ` David Daney [this message]
2007-08-30  1:08   ` guo guo
2007-08-30 16:06     ` David Daney

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=46D60675.2070709@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=linux-mips@linux-mips.org \
    --cc=sunnyboyguo@gmail.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