Re: Can't compile 2.4.3 with agcc

David Woodhouse (dwmw2@infradead.org)
Mon, 23 Apr 2001 16:52:53 +0100


rmk@arm.linux.org.uk said:
> On Mon, Apr 23, 2001 at 04:13:47PM +0300, mythos wrote:
> > init/main.o(.text.init+0x65): undefined reference to `__buggy_fxsr_alignment'

> This is a FAQ! (sorry, but I don't know if it is in a FAQ or not).
> IIRC, you can't use pgcc to compile linux kernels.

Then the kernel should say so, rather than giving a cryptic message like
that, and containing code which isn't actually guaranteed to compile, even
with a compiler which _does_ align the structure as we want it.

Index: include/asm/bugs.h
===================================================================
RCS file: /inst/cvs/linux/include/asm-i386/bugs.h,v
retrieving revision 1.2.2.16
diff -u -r1.2.2.16 bugs.h
--- include/asm/bugs.h 2001/01/18 13:56:53 1.2.2.16
+++ include/asm/bugs.h 2001/04/23 15:45:28
@@ -80,8 +80,10 @@
* Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
*/
if (offsetof(struct task_struct, thread.i387.fxsave) & 15) {
- extern void __buggy_fxsr_alignment(void);
- __buggy_fxsr_alignment();
+ printk(KERN_EMERG "ERROR: FXSAVE data are not 16-byte aligned in task_struct.\n");
+ printk(KERN_EMERG "This is usually caused by a buggy compiler (perhaps pgcc?)\n");
+ printk(KERN_EMERG "Cannot continue.\n");
+ for (;;) ;
}
if (cpu_has_fxsr) {
printk(KERN_INFO "Enabling fast FPU save and restore... ");

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/