Kernel miscompile with -march=c3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to track down a problem with linux kernels which hang
silently (within 5 minutes or a few hours of boot) if compiled with
-march=c3. If I use -march=586mmx or 586 the kernels are stable for
days.

As there is nothing in the logs or on a serial console, it is difficult
to know where to look for the root of the problem. I would be grateful
for some suggestions to start to track this down. I imagine it is a
compiler bug or a kernel bug exposed by the march setting.

cat /proc/cpuinfo
processor	: 0
vendor_id	: CentaurHauls
cpu family	: 6
model		: 7
model name	: VIA Ezra
stepping	: 10
cpu MHz		: 399.000
cache size	: 64 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips	: 800.58
clflush size	: 32

.. so -march-c3 should be correct, if I understand correctly.

An example of the complete command line the compile is using:

gcc -m32 -Wp,-MD,drivers/net/.3c59x.o.d  -nostdinc -isystem
/usr/lib/gcc/i486-linux-gnu/4.1.3/include -D__KERNEL__ -Iinclude
-include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Os -pipe -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2  -march=c3
-falign-functions=0  -falign-jumps=0  -falign-loops=0 -mtune=generic
-ffreestanding -maccumulate-outgoing-args
-Iinclude/asm-i386/mach-default -fomit-frame-pointer
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(3c59x)"
-D"KBUILD_MODNAME=KBUILD_STR(3c59x)" -c -o drivers/net/.tmp_3c59x.o
drivers/net/3c59x.c

I am out of my depth with lots of these, so I would be grateful for
advice on whether they are sane!


I am using:

gcc (GCC) 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GNU ld (GNU Binutils for Debian) 2.17.90.20070812
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Thanks for the help,

Mark

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux