From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 24 12:40:18 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C80E516A420 for ; Sun, 24 Jul 2005 12:40:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31B3543D46 for ; Sun, 24 Jul 2005 12:40:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6OCeHwE099298 for ; Sun, 24 Jul 2005 12:40:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6OCeHTe099297; Sun, 24 Jul 2005 12:40:17 GMT (envelope-from gnats) Resent-Date: Sun, 24 Jul 2005 12:40:17 GMT Resent-Message-Id: <200507241240.j6OCeHTe099297@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Gabor Kovesdan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87B7416A41F for ; Sun, 24 Jul 2005 12:39:41 +0000 (GMT) (envelope-from root@catv-5062840d.catv.broadband.hu) Received: from catv-5062840d.catv.broadband.hu (catv-5062840d.catv.broadband.hu [80.98.132.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29F6F43D48 for ; Sun, 24 Jul 2005 12:39:41 +0000 (GMT) (envelope-from root@catv-5062840d.catv.broadband.hu) Received: by catv-5062840d.catv.broadband.hu (Postfix, from userid 0) id EFC4DA103E; Sun, 24 Jul 2005 14:39:37 +0200 (CEST) Message-Id: <20050724123937.EFC4DA103E@catv-5062840d.catv.broadband.hu> Date: Sun, 24 Jul 2005 14:39:37 +0200 (CEST) From: Gabor Kovesdan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Gabor Kovesdan Subject: kern/83995: CFLAGS & COPTFLAGS ambiguous behaviour X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gabor Kovesdan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2005 12:40:18 -0000 >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@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: