From: Daniel Hellstrom <daniel@gaisler.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sparc and .udiv/.rem/.urem/.umul/etc... link errors
Date: Thu, 13 Oct 2011 10:45:27 +0200 [thread overview]
Message-ID: <4E96A527.9090806@gaisler.com> (raw)
In-Reply-To: <201110130133.52490.vapier@gentoo.org>
On 10/13/2011 07:33 AM, Mike Frysinger wrote:
> it seems that these symbols are usually implemented in the C library on sparc
> systems, but under u-boot, we don't have that luxury. Linux itself simply
> imports the relevant asm files from glibc into their lib subdir. without
> these, building u-boot for sparc targets with sparc linux compilers fail. any
> desire to make this work ? or just continue to force everyone to install a
> dedicated sparc-elf compiler ?
> -mike
The .udiv/.rem ... functions are implemented by libgcc, an suggested implementation is given in the SPARCv8 Appendix E. The functions are needed when compiling for SPARCv7 CPUs which doesn't have a
hardware multiplier/divider instead they are implemented in software, SPARCv8 CPUs have multiplier/divider in hardware so .mul/.rem etc is not needed. One can switch between V7 or V8 compatible code
by adding -mv8 (GCC 3.4.4 or earlier) or -mcpu=v8 (in newer GCC). Sparc-linux toolchains will generate ELF binaries for Linux, that is not what we want?
Daniel
next prev parent reply other threads:[~2011-10-13 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 5:33 [U-Boot] sparc and .udiv/.rem/.urem/.umul/etc... link errors Mike Frysinger
2011-10-13 8:45 ` Daniel Hellstrom [this message]
2011-10-13 15:44 ` Mike Frysinger
2011-10-19 9:05 ` Daniel Hellstrom
2011-10-19 14:20 ` Mike Frysinger
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=4E96A527.9090806@gaisler.com \
--to=daniel@gaisler.com \
--cc=u-boot@lists.denx.de \
/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