From owner-freebsd-hackers Mon Feb 19 14:21:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from slarti.muc.de (slarti.muc.de [193.149.48.10]) by hub.freebsd.org (Postfix) with SMTP id EA59337B401 for ; Mon, 19 Feb 2001 14:21:32 -0800 (PST) Received: (qmail 15521 invoked from network); 19 Feb 2001 22:21:31 -0000 Received: from jhs.muc.de (193.149.49.84) by slarti.muc.de with SMTP; 19 Feb 2001 22:21:31 -0000 Received: (from jhs@localhost) by jhs.muc.de (8.11.0/8.11.0) id f1JMH9C16878; Mon, 19 Feb 2001 22:17:09 GMT (envelope-from jhs) Date: Mon, 19 Feb 2001 22:17:09 GMT Message-Id: <200102192217.f1JMH9C16878@jhs.muc.de> To: hackers@freebsd.org Subject: COPTFLAGS without -O in /etc/make.conf breaks kernel make From: "Julian Stacey" Organization: Vector Systems Ltd - Munich Unix & Internet consultancy X-Web: http://www.jhs.muc.de http://bim.bsn.com/~jhs/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here's a weirdness in 4.2-RELEASE kernel generation: - Compiling a GENERIC kernel _Without -O optimiser causes a broken make ! - Compiling a GENERIC kernel _With_ -O optimiser compiles OK. Seems weird - perhaps indicative of a problem elsewhere in FreeBSD ? (Optimisers occasionaly break things, but don't normaly _fix_ things !) Can anyone confirm the observation / comment / explain please ? If you wonder why you haven't seen this so far: - Default 4.2 systems compile kernel with -O - I noticed it while experimentaly adding "-pipe" to make variables. How to test: Breaks: echo "COPTFLAGS= -DHalloFromMakeDotConf" >> /etc/make.conf Breaks: echo "COPTFLAGS=" >> /etc/make.conf OK: echo "COPTFLAGS= -DHalloFromMakeDotConf -O" >> /etc/make.conf OK: echo "COPTFLAGS=-O" >> /etc/make.conf OK: grep -v COPTFLAGS /etc/make.conf > /tmp/co;cp /tmp/co /etc/make.conf Followed By: cd /sys/i386/conf;config -r GENERIC cd /sys/compile/GENERIC;make depend;make atomic.o # atomic.o for faster test Breakage: cc -c -DHalloFromMakeDotConf -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -I/usr/include -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 -fomit-frame-pointer ../../i386/i386/atomic.c In file included from ../../i386/i386/atomic.c:47: machine/atomic.h: In function `atomic_set_char': machine/atomic.h:106: inconsistent operand constraints in an `asm' machine/atomic.h: In function `atomic_clear_char': machine/atomic.h:107: inconsistent operand constraints in an `asm' - Julian Stacey Unix Consultant - Munich Germany http://bim.bsn.com/~jhs/ Like Linux ? Then also look at FreeBSD with its 4200 packages ! Ihr Rauchen => mein allergischer Kopfschmerz ! Kau/Schnupftabak probieren ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message