[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-bugs
Subject:    toolchain/22643: conditional assignment botch re: HAVE_GCC3
From:       Stephen Degler <stephen () degler ! net>
Date:       2003-08-30 14:44:46
[Download RAW message or body]


> Number:         22643
> Category:       toolchain
> Synopsis:       logic error precludes HAVE_GCC3 from ever being "yes" in bsd.own.mk
> Confidential:   no
> Severity:       serious
> Priority:       medium
> Responsible:    toolchain-manager
> State:          open
> Class:          sw-bug
> Submitter-Id:   net
> Arrival-Date:   Sat Aug 30 14:45:00 UTC 2003
> Closed-Date:
> Last-Modified:
> Originator:     Stephen Degler
> Release:        NetBSD 1.6X
> Organization:
	
> Environment:
	
	
System: NetBSD kashmir.degler.net 1.6X NetBSD 1.6X (KASHMIR) #60: Sat Aug 30 00:28:26 \
                EDT 2003 sdegler@kashmir.degler.net:/vol1/NetBSD/kernels/KASHMIR i386
Architecture: i386
Machine: i386
> Description:
	People who have already switched to gcc3 cannot built -current because
	HAVE_GCC3 is getting set to "no".   The problem occurs because the
	assignments in bsd.own.mk are of the form ?= which means that once set
	they will not be assigned again. 

HAVE_GCC3?=    no
# these are ready to switch
.if ${MACHINE_ARCH} == "alpha" || \
    ${MACHINE_ARCH} == "i386" || \
    ${MACHINE_ARCH} == "sparc" || \
    ${MACHINE_ARCH} == "sparc64"
HAVE_GCC3?=     yes
.else
HAVE_GCC3?=     no
.endif

	The second and third assignments of HAVE_GCC3 will never happen!

	
> How-To-Repeat:
	Try to build -current on a system that already has gcc3.  It will
	fail.

	
> Fix:
	

This patch should preserve the ability to override HAVE_GCC3 but set the values
if they have not been previoulsy set.

% cvs diff -u share/mk/bsd.own.mk
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.355
diff -u -r1.355 bsd.own.mk
--- share/mk/bsd.own.mk 2003/08/29 10:51:21     1.355
+++ share/mk/bsd.own.mk 2003/08/30 14:43:54
@@ -45,7 +45,6 @@
 #    ${MACHINE_ARCH} == "mipseb" ||
 #    ${MACHINE_ARCH} == "mipsel" ||

-HAVE_GCC3?=    no
 # these are ready to switch
 .if ${MACHINE_ARCH} == "alpha" || \
     ${MACHINE_ARCH} == "i386" || \
> Release-Note:
> Audit-Trail:
> Unformatted:
 	
 	


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic