linux_dsm_epyc7002/arch/sh
Paul Mundt 8a2fd5f3ab sh: Fix FPU tuning on toolchains with mismatched multilib targets.
Presently there is very little standing in the way of using an SH-4
toolchain for building an SH-2 kernel, and vice versa. Binutils itself
has no limitations whatsoever and supports explicit ISA hinting, which
we already use with varying degrees of success today.

This leaves GCC as the odd one out, due to a rather dubious policy
decision by the GCC folks to not include all of the CPU family variants
in the default list of multilib targets in GCC4. Despite best efforts to
the contrary, libgcc itself already contains awareness of the various CPU
types and remains generally usable, allowing it to safely be referenced
even on a mismatched target (and indeed, explicit ISA tuning by binutils
keeps us honest in terms of ensuring that we do not link incompatible
objects in).

In order to support this, a couple of changes had to be made. Firstly,
the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak
extern reference for libgcc resident routines when finer-grained
-m<cpu-family> based tuning is not supported by the toolchain. This
fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing
with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we
are unable to find a suitable match for CPU family tuning but still
have a toolchain that defaults to FP instruction generation, a suitable
nofpu target must be selected. This is accomplished by selecting the
first nofpu multilib target supported by the toolchain, which is
also necessary for selecting the proper libgcc to link against.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 17:19:35 +09:00
..
boards sh: mach-highlander: Handle SCIF pinmuxing on R7785RP. 2008-10-23 12:35:43 +09:00
boot sh: ftrace support. 2008-09-21 16:43:45 +09:00
cchips sh: Kill off more dead symbols. 2008-02-14 14:22:12 +09:00
configs sh: update defconfigs. 2008-10-22 20:05:11 +09:00
drivers sh: Migrate common board headers to mach-common/. 2008-10-20 13:02:48 +09:00
include sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON(). 2008-10-23 12:37:20 +09:00
kernel sh: Fix FPU tuning on toolchains with mismatched multilib targets. 2008-10-28 17:19:35 +09:00
lib sh: Fix up the __raw_read/writeX() definitions. 2008-10-01 15:12:27 +09:00
lib64 sh: migrate to arch/sh/include/ 2008-07-29 08:09:44 +09:00
math-emu sh: Fix up the math-emu build. 2007-06-11 15:57:42 +09:00
mm sh: Kill off duplicate remove_memory() definition. 2008-10-21 12:51:51 +09:00
oprofile sh: Add -Werror for clean directories. 2007-11-07 11:13:55 +09:00
tools sh: Add EDOSK7760 mach type. 2008-09-08 12:01:55 +09:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2008-10-20 09:13:34 -07:00
Kconfig.cpu sh: Disable big endian for SH-5. 2008-02-14 14:22:10 +09:00
Kconfig.debug sh: Disable 4kB stacks when using PAGE_SIZE_64KB. 2008-09-20 20:16:35 +09:00
Makefile sh: Fix FPU tuning on toolchains with mismatched multilib targets. 2008-10-28 17:19:35 +09:00