From owner-freebsd-current@FreeBSD.ORG Fri Jun 30 01:26:49 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA41816A529 for ; Fri, 30 Jun 2006 01:26:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6551844760 for ; Fri, 30 Jun 2006 01:00:19 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id k5U100Q7067080; Thu, 29 Jun 2006 21:00:00 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org Date: Thu, 29 Jun 2006 20:59:45 -0400 User-Agent: KMail/1.6.2 References: <20060629233003.0188145043@ptavv.es.net> In-Reply-To: <20060629233003.0188145043@ptavv.es.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200606292059.47722.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88/1577/Thu Jun 29 16:18:18 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Subject: Re: Unable to build acpi_asus module on current today X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 01:26:49 -0000 On Thursday 29 June 2006 07:30 pm, Kevin Oberman wrote: > Today I tried rebuilding my laptop running current. Building the > kernel module acpi_asus, the build bombed with the error: > ===> acpi_asus (all) > cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE > -nostdinc -I- > -I/usr/src/sys/modules/acpi/acpi_asus/../../../contrib/dev/acpica > -I. -I@ -I@/contrib/altq -finline-limit=8000 --param > inline-unit-growth=100 --param large-function-growth=1000 > -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 > -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding > -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -fformat-extensions -c /usr/src/sys/modules > /acpi/acpi_asus/../../../dev/acpi_support/acpi_asus.c > /usr/src/sys/modules/acpi/acpi_asus/../../../dev/acpi_support/acpi_ >asus.c: In function `acpi_asus_attach': > /usr/src/sys/modules/acpi/acpi_asus/../../../dev/acpi_support/acpi_ >asus.c:584: error: 'for' loop initial declaration used outside C99 > mode > > But this module has not been touched since April and I have built > all of it many times since then. Several other modules seem to have > the same problem of declaring a variable in a for statement. > > I moved the declaration to its own statement before the "for" and > it compiles fine. > > Did some compiler default recently change? I have no compile > options on my make.conf. Yes: http://docs.freebsd.org/cgi/mid.cgi?200606292115.k5TLFQch022605 A quick fix: Index: sys/conf/kmod.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kmod.mk,v retrieving revision 1.208 diff -u -r1.208 kmod.mk --- sys/conf/kmod.mk 27 May 2006 16:32:05 -0000 1.208 +++ sys/conf/kmod.mk 30 Jun 2006 00:57:37 -0000 @@ -85,8 +85,10 @@ .if ${CC} == "icc" NOSTDINC= -X .else +C_DIALECT= -std=c99 NOSTDINC= -nostdinc .endif +CFLAGS+= ${C_DIALECT} CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} -I- ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR) CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h Jung-uk Kim