From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 6 07:11:40 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBAB137B401 for ; Fri, 6 Jun 2003 07:11:40 -0700 (PDT) Received: from mtiwmhc13.worldnet.att.net (mtiwmhc13.worldnet.att.net [204.127.131.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECA0043F85 for ; Fri, 6 Jun 2003 07:11:39 -0700 (PDT) (envelope-from cmascott@att.net) Received: from callisto.local (150.cambridge-02rh15rt.ma.dial-access.att.net[12.91.18.150]) by mtiwmhc13.worldnet.att.net (mtiwmhc13) with ESMTP id <20030606141138113001drf0e>; Fri, 6 Jun 2003 14:11:38 +0000 Received: from callisto.local (localhost.local [127.0.0.1]) by callisto.local (8.12.8p1/8.12.8) with ESMTP id h56EBZwl001382 for ; Fri, 6 Jun 2003 10:11:35 -0400 (EDT) (envelope-from cmascott@callisto.local) Received: (from cmascott@localhost) by callisto.local (8.12.8p1/8.12.8/Submit) id h56EBZEa001381 for freebsd-hackers@freebsd.org; Fri, 6 Jun 2003 10:11:35 -0400 (EDT) Date: Fri, 6 Jun 2003 10:11:35 -0400 (EDT) From: Carl Mascott Message-Id: <200306061411.h56EBZEa001381@callisto.local> To: freebsd-hackers@freebsd.org Subject: Incompatibility between FreeBSD make.conf and imake 4.3.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2003 14:11:41 -0000 I just discovered an incompatibility between the handling of CFLAGS in FreeBSD 4.8-R (and other versions, I'm sure) and in imake 4.3.0. Let me give you the symptom first. When building both normal and shared libraries, using an Imakefile that uses the automatic object rule generation provided by Library.tmpl (ex: ports/x11-toolkits/Xaw3d), the normal library is compiled without ANY optimization (i.e., CFLAGS is ignored). The cause: FreeBSD goes out of its way (in FreeBSD.cf) to ensure that CDEBUGFLAGS will be empty, with the expectation that compiler optimization will be gotten from CFLAGS as set in make.conf. However, the imake object rule for normal libraries that is used WHEN BUILDING BOTH NORMAL AND SHARED LIBRARIES (Imake.rules, LibObjCompile) does not use CFLAGS, expecting compiler optimization to come from CDEBUGFLAGS. I don't know why LibObjCompile doesn't use CFLAGS. Is it intentional? Is it an oversight? Would something else break if LibObjCompile were changed to use CFLAGS? Imake config files are so complex that it's hard to answer these questions correctly. Note that this is not an imake config bug. This problem is triggered by what's done in FreeBSD.cf, which is not "in harmony" with the expectations of the imake config files regarding CDEBUGFLAGS. A less-than-satisfactory workaround is to put CDEBUGFLAGS = -O into every affected Imakefile AFTER "#include