bin/152871: [patch] Request for exp-run and comment

Eitan Adler lists at eitanadler.com
Mon Dec 6 20:40:09 UTC 2010


>Number:         152871
>Category:       bin
>Synopsis:       [patch] Request for exp-run and comment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 06 20:40:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eitan Adler
>Release:        FreeBSD
>Organization:
>Environment:
	This is a request for an exp run and comments about this patch.

>Description:
I noticed a line in bsd.port.mk "Kludge for pre-3.0 systems"

# Kludge for pre-3.0 ystems
MACHINE_ARCH?=       i386

According to cvs blame asami@ added both lines in revision 1.306 in 1999

Furthermore in bsd.port.mk it says ports should test against ARCH and
not MACHINE_ARCH
but bsd.port.subdir.mk uses MACHINE_ARCH on line 209.

bsd.gnustep.mk has a similar test for MACHINE_ARCH instead of ARCH on
line 136 (r1.1 by dinoex)

1) Should the initial line be removed
2) Should bsd.port.subdir.mk be changed to use ARCH instead?
3) Should bsd.gnustep.mk be changed to use ARCH instead?

Overall I've been finding lots of inconsistent old hacks in bsd.*.mk
and its difficult to tell which ones are still needed and which ones
are not :-(

>How-To-Repeat:
>Fix:

--- remove-machine-arch.patch begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.660
diff -u -r1.660 bsd.port.mk
--- bsd.port.mk	4 Dec 2010 07:30:13 -0000	1.660
+++ bsd.port.mk	6 Dec 2010 02:49:24 -0000
@@ -38,9 +38,7 @@
 # different actions for different values.
 #
 # ARCH			- The architecture of the target machine, such as would be
-#				  returned by "uname -p".  (Note: Ports should test against
-#				  ARCH, and not the host machine's architecture which is
-#				  MACHINE_ARCH, to enable ports to be cross-built.)
+#				  returned by "uname -p".
 # OPSYS			- Portability clause.  This is the operating system the
 #				  makefile is being used on.  Automatically set to
 #				  "FreeBSD," "NetBSD," or "OpenBSD" as appropriate.
@@ -1208,9 +1206,6 @@
 ARCH!=	${UNAME} -p
 .endif
 
-# Kludge for pre-3.0 systems
-MACHINE_ARCH?=	i386
-
 # Get the operating system type
 .if !defined(OPSYS)
 OPSYS!=	${UNAME} -s
Index: bsd.gnustep.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.gnustep.mk,v
retrieving revision 1.63
diff -u -r1.63 bsd.gnustep.mk
--- bsd.gnustep.mk	11 Jun 2010 09:12:37 -0000	1.63
+++ bsd.gnustep.mk	6 Dec 2010 02:49:24 -0000
@@ -133,10 +133,10 @@
 GNUSTEP_ART_PORT?=	x11-toolkits/gnustep-art
 GNUSTEP_CAIRO_PORT?=	x11-toolkits/gnustep-cairo
 
-.if ${MACHINE_ARCH} == "i386"
+.if ${ARCH} == "i386"
 GNU_ARCH=	ix86
 .else
-GNU_ARCH=	${MACHINE_ARCH}
+GNU_ARCH=	${ARCH}
 .endif
 
 .if !defined(USE_MAKEFILE)
Index: bsd.port.subdir.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.subdir.mk,v
retrieving revision 1.76
diff -u -r1.76 bsd.port.subdir.mk
--- bsd.port.subdir.mk	25 May 2010 15:18:06 -0000	1.76
+++ bsd.port.subdir.mk	6 Dec 2010 02:49:24 -0000
@@ -206,8 +206,8 @@
 			${ECHO_MSG} "===> ${DIRPRFX}$$sub skipped"; \
 		fi; \
 	done; \
-	if test -d ${.CURDIR}/$${sub}.${MACHINE_ARCH}; then \
-		edir=$${sub}.${MACHINE_ARCH}; \
+	if test -d ${.CURDIR}/$${sub}.${ARCH}; then \
+		edir=$${sub}.${ARCH}; \
 	elif test -d ${.CURDIR}/$${sub}; then \
 		edir=$${sub}; \
 	else \
--- remove-machine-arch.patch ends here ---

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


More information about the freebsd-bugs mailing list