kern/83995: CFLAGS & COPTFLAGS ambiguous behaviour

Gabor Kovesdan gabor.kovesdan at t-hosting.hu
Sun Jul 24 12:40:18 GMT 2005


>Number:         83995
>Category:       kern
>Synopsis:       CFLAGS & COPTFLAGS ambiguous behaviour
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 24 12:40:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Gabor Kovesdan
>Release:        FreeBSD 6.0-BETA1 amd64
>Organization:
>Environment:
System: FreeBSD dream 6.0-BETA1 FreeBSD 6.0-BETA1 #0: Sun Jul 24 13:54:28 CEST 2005 root at dream:/usr/src/sys/amd64/compile/DREAM amd64

>Description:

CFLAGS is used for some parts of the kernel when compiling. COPTFLAGS is
supposed to be used for the compiling the critical parts of the kernel,
however. Even if one leave COPTFLAGS unset, CFLAGS can cause kernel
compiling failures, and it is an unwanted behaviour. Many people use
userland optimizations with the CFLAGS macro in make.conf.

I have made two typescripts. In the first case I commented out COPTFLAGS
and only used CFLAGS. It failed. In the second case I commented out CFLAGS too,
and the compilation was successful.

http://tux.t-hosting.hu/with-cflags
http://tux.t-hosting.hu/without-cflags

You might also want to seen my kernel config file:

http://tux.t-hosting.hu/DREAM

>How-To-Repeat:

Try to compile a GENERIC kernel with CFLAGS=-O3 -march=athlon64.

>Fix:

Kernel Makefiles should be updated to get around this issue.
For a workaround, CFLAGS might be commented out for kernel compiling,
but one tend to think that CFLAGS don't have so much influence on
kernel compiling. CFLAGS did't cause kernel compiling failures on
older releases for me, thus it was difficult to realize this
problem.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list