Current-Users archive

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

Build failure



Hmmm.  This is interesting....

Before the recent change to gcc, the recent updates to src/usr.sbin/cpuctl (and associated changes to src/sys/arch/x86/include/cacheinfo.h) would compile just fine.

However, it now fails.

cacheinfo.h has

#ifdef _KERNEL
#define __CI_TBL(a,b,c,d,e,f) { a, b, c, d, e }
#else
#define __CI_TBL(a,b,c,d,e,f) { a, b, c, d, e, f }
#endif

followed shortly by

#define INTEL_CACHE_INFO { \
__CI_TBL(CAI_ITLB,     0x01,    4, 32,        4 * 1024, NULL), \
__CI_TBL(CAI_ITLB,     0xb0,    4,128,        4 * 1024, NULL), \
__CI_TBL(CAI_ITLB2,    0x02, 0xff,  2, 4 * 1024 * 1024, NULL), \
...
}

The mainline code invokes the INTEL_CACHE_INFO macro. But expansion of the __CI_TBL() macro does not occur!

Asking gcc to stop after macro processing (ie, using gcc -E) we get
(line wraps man ually inserted here)

static const struct x86_cache_info intel_cpuid_cache_info[] = {
__CI_TBL(0, 0x01, 4, 32, 4 * 1024, (void *)0), __CI_TBL(0, 0xb0, 4,128,
4 * 1024, (void *)0), __CI_TBL(1, 0x02, 0xff, 2, 4 * 1024 * 1024, (void
*)0), __CI_TBL(2, 0x03, 4, 64, ...


Did the recent change to gcc break this? Or am I missing something much more obvious?


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index