kern/118121: RELENG_7 kernel compile fails with -Os

Heikki Suonsivu hsu at
Mon Nov 19 03:50:03 PST 2007

>Number:         118121
>Category:       kern
>Synopsis:       RELENG_7 kernel compile fails with -Os
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 19 11:50:02 UTC 2007
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 7.0-BETA3 i386
System: FreeBSD 7.0-BETA3 FreeBSD 7.0-BETA3 #3: Sun Nov 18 02:20:02 EET 2007 hsu at i386

	Anything with RELENG_7, if compiling GENERIC with -Os


	When compiling kernel with -Os, gcc apparently finds some new
	possible warnings (possible uninitialized variables, etc).  This exits
	kernel compile.  -O2 does not trigger these.

	scsi_sa and scsi_ses were among the offending files, but there
	may be more.


	build kernel with COPTFLAGS set to -Os -g -pipe


	The offending code may need further checks.  RELENG_6 did not
	have these warnings, so they apparently are related to new
	code in 7.x.

	Workaround is to use -O2 or -O


More information about the freebsd-bugs mailing list