Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2001 22:17:09 GMT
From:      "Julian Stacey" <jhs@jhs.muc.de>
To:        hackers@freebsd.org
Subject:   COPTFLAGS without -O in /etc/make.conf breaks kernel make
Message-ID:  <200102192217.f1JMH9C16878@jhs.muc.de>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102192217.f1JMH9C16878>