2.1.121 i386 FPU emulator patch

Bill Metzenthen (billm@melbpc.org.au)
Sat, 12 Sep 1998 14:33:37 +1000 (EST)


The definition of the desc_struct structure got shifted in
linux-2.1.121. The i386 FPU emulator uses this structure. The
following patch lets the emulator find the needed new header file.
pre-patch-2.1.122-2 doesn't appear to contain a fix. I have chosen an
approach which allows the emulator to be in any directory, but of
course depends upon desc.h remaining where it is.

---------------------- Patch for linux-2.1.121 ----------------------------
diff -u linux/arch/i386/math-emu-old/Makefile linux/arch/i386/math-emu/Makefile
--- linux/arch/i386/math-emu-old/Makefile Wed Dec 10 12:57:09 1997
+++ linux/arch/i386/math-emu/Makefile Sat Sep 12 11:46:40 1998
@@ -7,7 +7,8 @@
#DEBUG = -DDEBUGGING
DEBUG =
PARANOID = -DPARANOID
-CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
+CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) \
+ -DDESCFILE=\"$(TOPDIR)/arch/i386/kernel/desc.h\"

.S.o:
$(CC) -D__ASSEMBLY__ $(PARANOID) -c $<
diff -u linux/arch/i386/math-emu-old/fpu_entry.c linux/arch/i386/math-emu/fpu_entry.c
--- linux/arch/i386/math-emu-old/fpu_entry.c Fri Jul 24 00:07:15 1998
+++ linux/arch/i386/math-emu/fpu_entry.c Sat Sep 12 11:44:03 1998
@@ -28,6 +28,9 @@

#include <asm/uaccess.h>

+/* Get the definition of desc_struct */
+#include DESCFILE
+
#include "fpu_system.h"
#include "fpu_emu.h"
#include "exception.h"
diff -u linux/arch/i386/math-emu-old/get_address.c linux/arch/i386/math-emu/get_address.c
--- linux/arch/i386/math-emu-old/get_address.c Thu Sep 10 23:48:38 1998
+++ linux/arch/i386/math-emu/get_address.c Sat Sep 12 11:44:35 1998
@@ -22,6 +22,9 @@

#include <asm/uaccess.h>

+/* Get the definition of desc_struct */
+#include DESCFILE
+
#include "fpu_system.h"
#include "exception.h"
#include "fpu_emu.h"
-------------------------- End of patch -----------------------------------

-- 
-----------------------------------------------------------------------------
Bill Metzenthen        | See http://www.suburbia.net/~billm/ for information
billm@melbpc.org.au    | on an 80x87 FPU emulator, using floating point
billm@suburbia.net     | (particularly on Linux), and code for manipulating
Melbourne, Australia   | the floating point environment on 80x86 Linux.
-----------------------------------------------------------------------------

- 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.tux.org/lkml/faq.html