Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2004 20:06:04 -0500 (EST)
From:      "James E. Housley" <jeh@thehousleys.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/61757: FreeBSD 4.9 barfs on an empty _CPUCFLAGS with WITHOUT_CPUC_CFLAGS
Message-ID:  <200401230106.i0N164Ii003266@cat.int.thehousleys.net>
Resent-Message-ID: <200401230110.i0N1AHUv067595@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61757
>Category:       ports
>Synopsis:       FreeBSD 4.9 barfs on an empty _CPUCFLAGS with WITHOUT_CPUC_CFLAGS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 22 17:10:16 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     James E. Housley
>Release:        FreeBSD 4.9-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD cat.int.thehousleys.net 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #0: Fri Nov 28 16:19:53 EST 2003 root@cat.int.thehousleys.net:/usr/obj/usr/src/sys/SERVERKERNEL i386


	
>Description:
	: It seems your recent commit to devel/i386-rtems-g77 breaks INDEX:
	: 
	: lemur# make -V CFLAGS
	: RE substitution error: empty (sub)expression
	: Variable CFLAGS is recursive.
	: 
	: Can you look into this?
	: 
	: CHeers,
	: -erwin
	: 

That is fixed.  Are you good with makefiles?  The problem, at least on 4.9, seems to be if _CPUCFLAGS is empty or not defined this error happens.  I have tried all the possible ways I can think of to test for _CPUCFLAGS being empty to prevent the subsitution from happening and none worked.

.if defined(WITHOUT_CPU_CFLAGS) && ${_CPUCFLAGS} != ""

.if defined(WITHOUT_CPU_CFLAGS) && defined(_CPUCFLAGS)

.if defined(WITHOUT_CPU_CFLAGS) && "${_CPUCFLAGS}x" != "x"

.if defined(WITHOUT_CPU_CFLAGS) && !empty(_CPUCFLAGS)

Unless this can be fixed this will have to be removed or converted to a messier:

CFLAGS:=        ${CFLAGS:C/-mcpu=[^ ]*//:C/-march=[^ ]*//:C/-mtune=[^ ]*//}
CXXFLAGS:=      ${CXXFLAGS:C/-mcpu=[^ ]*//:C/-march=[^ ]*//:C/-mtune=[^ ]*//}


>How-To-Repeat:
	Create a simple port Makefile that sets WITHOUT_CPU_CFLAGS=YES
	and on a 4.9 machine without and _CPUCFLAGS defined.  I believe
	this worked fine on 5.1
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:



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