linux/arch/sh/kernel
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
..
cpu sh: sh7785 pinmux support 2008-10-23 11:59:37 +09:00
timers sh: fix the TMU code to allow a fully running NO_HZ system 2008-09-08 10:35:05 +09:00
vsyscall sh: Terminate .eh_frame in VDSO with a 4-byte 0. 2007-11-02 12:29:37 +09:00
.gitignore sh: Add an arch/sh/kernel/.gitignore 2008-07-29 08:29:32 +09:00
asm-offsets.c sh: use kbuild.h instead of defining macros in asm-offsets.c 2008-04-29 08:06:30 -07:00
cf-enabler.c sh: Move out the solution engine headers to arch/sh/include/mach-se/ 2008-07-29 21:41:37 +09:00
cpufreq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2007-10-13 09:49:04 -07:00
crash_dump.c kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE 2008-10-20 08:52:39 -07:00
debugtraps.S sh: Use a jump call table for debug trap handlers. 2007-02-13 10:54:43 +09:00
early_printk.c sh: reset hardware from early printk 2008-05-08 19:51:54 +09:00
entry-common.S sh: ftrace support. 2008-09-21 16:43:45 +09:00
gpio.c sh: improve pinmux support for single direction pins 2008-10-22 18:34:16 +09:00
head_32.S sh: disable initrd defaults in .empty_zero_page. 2008-05-16 14:55:07 +09:00
head_64.S sh: migrate to arch/sh/include/ 2008-07-29 08:09:44 +09:00
init_task.c [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
io_generic.c sh: More I/O routine overhauling. 2008-10-04 05:25:52 +09:00
io_trapped.c sh: Fix up section mismatches. 2008-03-06 12:43:38 +09:00
io.c sh: More I/O routine overhauling. 2008-10-04 05:25:52 +09:00
irq.c sh: migrate to arch/sh/include/ 2008-07-29 08:09:44 +09:00
kgdb_jmp.S
kgdb_stub.c sh: use the common ascii hex helpers 2008-05-16 15:09:08 +09:00
kprobes.c sh: kprobes: kretprobe_trampoline needs to be global. 2008-09-09 08:13:28 +09:00
machine_kexec.c sh: fix kexec entry point for crash kernels 2008-08-28 14:53:03 +09:00
machvec.c sh: More I/O routine overhauling. 2008-10-04 05:25:52 +09:00
Makefile sh: Have 32-bit use arch/sh/kernel/Makefile_32. 2008-01-28 13:18:41 +09:00
Makefile_32 sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected. 2008-10-20 13:04:06 +09:00
Makefile_64 sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected. 2008-10-20 13:04:06 +09:00
module.c sh: module_alloc() should be using vmalloc_exec(). 2008-08-04 13:34:29 +09:00
pm.c sh: APM/PM support. 2006-09-27 16:20:22 +09:00
process_32.c sh: Add FPU registers to regset interface. 2008-09-21 19:04:55 +09:00
process_64.c sh: Trivial trace_mark() instrumentation for core events. 2008-09-21 13:56:39 +09:00
ptrace_32.c sh: Add FPU registers to regset interface. 2008-09-21 19:04:55 +09:00
ptrace_64.c sh: fixup many sparse errors. 2008-09-08 10:35:04 +09:00
relocate_kernel.S sh: Fixup various PAGE_SIZE == 4096 assumptions. 2006-12-06 10:45:39 +09:00
setup.c sh: add dynamic crash base address support 2008-10-20 11:38:40 +09:00
sh_bios.c sh: Many symbol exports for nommu allmodconfig. 2007-07-20 16:59:49 +09:00
sh_ksyms_32.c sh: Fix FPU tuning on toolchains with mismatched multilib targets. 2008-10-28 17:19:35 +09:00
sh_ksyms_64.c sh64: Some symbol exports to make the allmodconfig happier. 2008-05-08 19:51:41 +09:00
signal_32.c sh: Force pending restarted system calls to return -EINTR. 2008-09-24 14:37:35 +09:00
signal_64.c sh: Fix up signal_64 cast warnings. 2008-09-29 19:44:40 +09:00
smp.c sh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting(). 2008-10-21 12:51:51 +09:00
stacktrace.c sh: latencytop support. 2008-09-13 01:44:03 +09:00
sys_sh32.c sh: fixup many sparse errors. 2008-09-08 10:35:04 +09:00
sys_sh64.c unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
sys_sh.c sh: Trivial trace_mark() instrumentation for core events. 2008-09-21 13:56:39 +09:00
syscalls_32.S sh: Wire up new syscalls. 2008-07-28 18:34:45 +09:00
syscalls_64.S sh: Wire up new syscalls. 2008-07-28 18:34:45 +09:00
time_32.c sh: fixup many sparse errors. 2008-09-08 10:35:04 +09:00
time_64.c sh: SH-5 clk fwk support. 2008-09-29 20:09:17 +09:00
topology.c sh: replace remaining __FUNCTION__ occurrences 2008-03-06 11:18:22 +09:00
traps_32.c sh: Wire up oops reporting in the die notifier chain. 2008-10-21 18:33:36 +09:00
traps_64.c sh64: add missing #include <asm/fpu.h>'s 2008-04-16 02:00:09 +09:00
traps.c sh: Make is_valid_bugaddr() more intelligent on nommu. 2008-05-19 19:32:07 +09:00
vmlinux_32.lds.S move BUG_TABLE into RODATA 2008-05-25 07:06:08 +02:00
vmlinux_64.lds.S move BUG_TABLE into RODATA 2008-05-25 07:06:08 +02:00
vmlinux.lds.S sh: Split out linker script to _32 and _64 variants. 2008-01-28 13:18:45 +09:00