From owner-freebsd-stable Sun Feb 28 10:22:46 1999 Delivered-To: freebsd-stable@freebsd.org Received: from geo.geocast.net (geo.geocast.net [128.177.240.120]) by hub.freebsd.org (Postfix) with ESMTP id 067A6152A5 for ; Sun, 28 Feb 1999 10:22:39 -0800 (PST) (envelope-from castor@geocast.net) Received: from localhost (castor@localhost) by geo.geocast.net (8.8.8/8.8.8) with ESMTP id KAA18386; Sun, 28 Feb 1999 10:22:23 -0800 (PST) Date: Sun, 28 Feb 1999 10:22:19 -0800 (PST) From: Castor Fu To: John Polstra Cc: stable@freebsd.org Subject: Re: bus_dmamap_load & compiler glitch In-Reply-To: <199902281744.JAA12017@vashon.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 28 Feb 1999, John Polstra wrote: > In article , > Castor Fu wrote: > > I'm trying to use the bus_dma interface with 3.1-RELEASE and > > the bus_dmamap_load routine appears to compile incorrectly with > > the default C compiler and default flags. > > [. . . ] > > > > Putting in a few printfs seems to get the compiler to do the right thing. > > What optimization level are you using? Anything higher than "-O" is > not guaranteed to work. I'm using '-O'. Here's how things are compiled: clf-0# make CC="cc -v" busdma_machdep.o cc -v -c -O -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wuninitialized -Wformat -Wunused -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -DKERNEL -DVM_STACK -include opt_global.h -elf ../../i386/i386/busdma_machdep.c gcc version 2.7.2.1 /usr/libexec/cpp -lang-c89 -nostdinc -v -I- -I. -I../.. -I../../../include -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -trigraphs -$ -D__STRICT_ANSI__ -D__unix__ -D__i386__ -D__FreeBSD__=3 -D__FreeBSD_cc_version=310001 -D__unix -D__i386 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wuninitialized -Wformat -Wunused -D__ELF__ -DKERNEL -DVM_STACK -include opt_global.h ../../i386/i386/busdma_machdep.c /var/tmp/ccJoR362.i GNU CPP version 2.7.2.1 (i386 FreeBSD) #include "..." search starts here: #include <...> search starts here: . ../.. ../../../include End of search list. /usr/libexec/cc1 /var/tmp/ccJoR362.i -quiet -dumpbase busdma_machdep.c -O -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wuninitialized -Wformat -Wunused -ansi -version -fformat-extensions -o /var/tmp/ccJoR362.s GNU C version 2.7.2.1 (i386 FreeBSD) compiled by GNU C version 2.7.2.1. /usr/libexec/elf/as -v -o busdma_machdep.o /var/tmp/ccJoR362.s GNU assembler version 2.9.1 (i386-unknown-freebsdelf), using BFD version 2.9.1 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message