From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Hellstrom Date: Thu, 13 Oct 2011 10:45:27 +0200 Subject: [U-Boot] sparc and .udiv/.rem/.urem/.umul/etc... link errors In-Reply-To: <201110130133.52490.vapier@gentoo.org> References: <201110130133.52490.vapier@gentoo.org> Message-ID: <4E96A527.9090806@gaisler.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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