From owner-freebsd-current@FreeBSD.ORG Mon Aug 2 01:16:56 2004 Return-Path: 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 6143E16A4CE; Mon, 2 Aug 2004 01:16:56 +0000 (GMT) Received: from lakermmtao09.cox.net (lakermmtao09.cox.net [68.230.240.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id D548F43D5D; Mon, 2 Aug 2004 01:16:55 +0000 (GMT) (envelope-from conrads@cox.net) Received: from dolphin.local.net ([68.11.71.51]) by lakermmtao09.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP <20040802011650.JJEL21435.lakermmtao09.cox.net@dolphin.local.net>; Sun, 1 Aug 2004 21:16:50 -0400 Received: from dolphin.local.net (localhost.local.net [127.0.0.1]) by dolphin.local.net (8.12.11/8.12.11) with ESMTP id i721GpeS071951; Sun, 1 Aug 2004 20:16:51 -0500 (CDT) (envelope-from conrads@dolphin.local.net) Received: (from conrads@localhost) by dolphin.local.net (8.12.11/8.12.11/Submit) id i721GpDQ071950; Sun, 1 Aug 2004 20:16:51 -0500 (CDT) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.5.5 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200408012231.i71MVeRd020305@grimreaper.grondar.org> Date: Sun, 01 Aug 2004 20:16:50 -0500 (CDT) Organization: A Rag-Tag Band of Drug-Crazed Hippies From: "Conrad J. Sabatier" To: Mark Murray cc: freebsd-current@FreeBSD.ORG Subject: Re: includes in sys/amd64/amd64/mem.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: conrads@cox.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2004 01:16:56 -0000 On 01-Aug-2004 Mark Murray wrote: > "Conrad J. Sabatier" writes: >> Curious. I compared the includes in mem.c for each architecture and >> found that amd64 is the only one that doesn't include . >> Is this an oversight? > > Could be. Could you try adding that and see if it fixes things? I > don't have access to a working AMD64 right now. > >> Still waiting for the kernel build breakage on amd64 to be fixed. >> I'm at a loss, myself. > > Erm, could you post the errors you see? Sorry. They were posted in another thread, but I'll provide them again. Adding "#include " *almost* fixes things, but there are still some missing defines (from sys/amd64/include/vmparam.h, which is not being included either). In /etc/make.conf: COPTFLAGS= -O2 -pipe -march=athlon64 -m64 cc -c -O2 -pipe -march=athlon64 -m64 -fno-strict-aliasing -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm -D_KERNEL -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror /usr/src/sys/amd64/amd64/mem.c /usr/src/sys/amd64/amd64/mem.c: In function `memrw': /usr/src/sys/amd64/amd64/mem.c:97: warning: implicit declaration of function `PHYS_TO_DMAP' /usr/src/sys/amd64/amd64/mem.c:97: warning: nested extern declaration of `PHYS_TO_DMAP' /usr/src/sys/amd64/amd64/mem.c:97: warning: cast to pointer from integer of different size /usr/src/sys/amd64/amd64/mem.c:103: error: `DMAP_MIN_ADDRESS' undeclared (first use in this function) /usr/src/sys/amd64/amd64/mem.c:103: error: (Each undeclared identifier is reported only once /usr/src/sys/amd64/amd64/mem.c:103: error: for each function it appears in.) /usr/src/sys/amd64/amd64/mem.c:103: error: `DMAP_MAX_ADDRESS' undeclared (first use in this function) /usr/src/sys/amd64/amd64/mem.c:104: warning: implicit declaration of function `DMAP_TO_PHYS' /usr/src/sys/amd64/amd64/mem.c:104: warning: nested extern declaration of `DMAP_TO_PHYS' /usr/src/sys/amd64/amd64/mem.c:118: error: `KERNBASE' undeclared (first use in this function) *** Error code 1 Stop in /usr/obj/usr/src/sys/CUSTOM. Adding '#include "/usr/src/sys/amd64/include/vmparam.h"' to mem.c (I know this is a hack) produces this: linking kernel.debug amd64_mem.o(.text+0xa7a): In function `amd64_mrinit': /usr/src/sys/amd64/amd64/amd64_mem.c:562: undefined reference to `M_MEMDESC' mem.o(.text+0x30c): In function `memioctl': /usr/src/sys/amd64/amd64/mem.c:185: undefined reference to `M_MEMDESC' mem.o(.text+0x332):/usr/src/sys/amd64/amd64/mem.c:192: undefined reference to `M_MEMDESC' mem.o(.text+0x35a):/usr/src/sys/amd64/amd64/mem.c:200: undefined reference to `M_MEMDESC' mem.o(.text+0x38a):/usr/src/sys/amd64/amd64/mem.c:207: undefined reference to `M_MEMDESC' *** Error code 1 Stop in /usr/obj/usr/src/sys/CUSTOM. -- Conrad J. Sabatier -- "In Unix veritas"