From fb80c8cd2d0001ecc1118829bbb0f436909659f8 Mon Sep 17 00:00:00 2001 From: gmcgarry Date: Sat, 12 Jul 2008 11:50:07 +0000 Subject: [PATCH] Disable INCLUDE_CONFIG_FILE if compiling with PCC, since PCC cannot handle 80KB string literals. Documented as hack. --- doc/HACKS | 14 +++++++++++++- sys/conf/param.c | 9 +++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/HACKS b/doc/HACKS index a2a330166188..de06b295426b 100644 --- a/doc/HACKS +++ b/doc/HACKS @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.103 2008/05/16 13:16:25 tsutsui Exp $ +# $NetBSD: HACKS,v 1.104 2008/07/12 11:50:07 gmcgarry Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -409,6 +409,18 @@ port vax PR#32907. kcah + hack pcc 0.9.9 large string literals + cdat 8 July 2008 + who gmcgarry + file sys/conf/param.c : 1.58 + descr + Workaround for pcc 0.9.9 not handling large string literals + which causes kernels with 'options INCLUDE_CONFIG_FILE' to + fail compilation. + There is a proposal on the pcc mailing list to stuff config + file in ELF section. + kcah + port arm hack gcc-unsigned-compare diff --git a/sys/conf/param.c b/sys/conf/param.c index 56cb64a89356..5fe9d142e420 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,4 +1,4 @@ -/* $NetBSD: param.c,v 1.57 2008/07/02 17:28:57 ad Exp $ */ +/* $NetBSD: param.c,v 1.58 2008/07/12 11:50:07 gmcgarry Exp $ */ /* * Copyright (c) 1980, 1986, 1989 Regents of the University of California. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.57 2008/07/02 17:28:57 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.58 2008/07/12 11:50:07 gmcgarry Exp $"); #include "opt_hz.h" #include "opt_rtc_offset.h" @@ -69,8 +69,13 @@ __KERNEL_RCSID(0, "$NetBSD: param.c,v 1.57 2008/07/02 17:28:57 ad Exp $"); #include #endif +/* + * PCC cannot handle the 80KB string literal. + */ +#if !defined(__PCC__) #define CONFIG_FILE #include "config_file.h" +#endif /* * System parameter formulae.