diff -aurpN -X /home/fletch/.diff.exclude 320-kcg/include/linux/mcount.h 321-kcg_gcc_detect/include/linux/mcount.h --- 320-kcg/include/linux/mcount.h Wed Feb 11 10:14:55 2004 +++ 321-kcg_gcc_detect/include/linux/mcount.h Wed Feb 11 10:14:58 2004 @@ -18,6 +18,16 @@ #include #include +/* + * All versions of gcc older than 2.96 have a broken -pg option. + * Symptoms are an early panic in free_pages_bulk. + * We will refuse to build for these compilers. + */ +#if (__GNUC__ == 2) +#error Your compiler is broken for -pg. +#error See 'http://oss.sgi.com/projects/kernprof/faq.html#Q9' for more information. +#endif + #define DFL_PC_RES 4 /* default PC resolution for this platform */ #define CG_MAX_ARCS (1 << (8 * sizeof(short))) #define FUNCTIONPC(func) (*(unsigned long *)&(func))