Re: 2.1.114 fails build on i386

David S. Miller (davem@dm.cobaltmicro.com)
Mon, 3 Aug 1998 17:31:39 -0700


This fixes it. The GCC bug case only applies when the top level
structure has a final element which is an empty "{ }" element, which
is no longer the case.

--- include/linux/sched.h.~2~ Mon Aug 3 14:53:23 1998
+++ include/linux/sched.h Mon Aug 3 16:26:00 1998
@@ -322,16 +322,6 @@

#define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */

-/* Note: This is very ugly I admit. But some versions of gcc will
- * dump core when an empty structure constant is parsed at
- * the end of a large top level structure initialization. -DaveM
- */
-#ifdef __SMP__
-#define INIT_LOCKS SPIN_LOCK_UNLOCKED
-#else
-#define INIT_LOCKS
-#endif
-
/*
* INIT_TASK is used to set up the first task table, touch at
* your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -367,8 +357,13 @@
/* fs */ &init_fs, \
/* files */ &init_files, \
/* mm */ &init_mm, \
-/* signals */ INIT_LOCKS, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
+/* signals */ SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
}
+/* Note: Do not allow a SPIN_LOCK_UNLOCKED to be at the end of the
+ * task structure, some versions of gcc will dump core when an
+ * empty structure constant is parsed at the end of a large top-
+ * level structure initialization. -DaveM
+ */

union task_union {
struct task_struct task;

-
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