A simpler approach is to use gcc's "-msoft-float" flag. This causes
all (almost, see the gcc info pages) floating-point operations to be
emitted as calls to external library routines. Since neither gcc
nor the linux kernel supply these by default, code using f.p. will
trigger linker errors. I've tried this on the i386 and it catches
f.p. use both in the resident part of the kernel and in modules.
This patch won't catch explicit f.p. insns in assembly code, but it
should catch all cases of "accidental" f.p. use.
If gcc's "-msoft-float" feature is spelled the same on all targets
then this should probably be moved to the main Makefile.
/Mikael
--- linux-2.1.110/arch/i386/Makefile.orig Wed Jul 22 01:29:08 1998
+++ linux-2.1.110/arch/i386/Makefile Wed Jul 22 01:30:04 1998
@@ -23,6 +23,8 @@
CFLAGS_NSR := -fno-strength-reduce
CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) $(CFLAGS_NSR)
+CFLAGS := $(CFLAGS) -msoft-float
+
ifdef CONFIG_M386
CFLAGS := $(CFLAGS) -m386 -DCPU=386
endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html