Messages in this thread Patch in this message | | | From | (Bob_Tracy) | Subject | Re: 2.1.114 fails build on i386 | Date | Mon, 3 Aug 1998 21:26:22 -0500 (CDT) |
| |
David S. Miller wrote: > > This fixes it.
Not for me :-). See below...
> 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.
Doesn't seem to matter where the empty "{ }" element appears in the task structure initializer: gcc-2.7.2.3 took a signal 11 error with no accompanying error message when compiling linux/arch/i386/kernel/init_task.c for the non-SMP case with INIT_LOCKS defined to be SPIN_LOCK_UNLOCKED (which is the effect of your patch). That's why I sent a followup to my own message advising that that wouldn't work :-).
> --- 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;
-- Bob Tracy | "They couldn't hit an elephant at this dist- " Firewall Security Corp. | - Last words of Union General John Sedgwick, rct@frus.com | Battle of Spotsylvania Court House, U.S. Civil War
- 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
| |