Subject: toolchain/24936: MACHINE_GNU_PLATFORM uses --, MACHINE_GNU_ARCH for mips is odd
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@broadcom.com>
List: netbsd-bugs
Date: 03/27/2004 06:56:41
>Number:         24936
>Category:       toolchain
>Synopsis:       MACHINE_GNU_PLATFORM uses --, MACHINE_GNU_ARCH for mips is odd
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 27 06:57:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Chris G. Demetriou
>Release:        NetBSD-current as of 2004-03-26
>Organization:
>Environment:
NetBSD/sbmips cross-built from sources as described above.

>Description:

(1) MACHINE_GNU_PLATFORM comes out like "arch--netbsd" or "arch--netbsdelf"
    This is totally alien.  If people really want two dashes, the convention
    should be "arch-unknown-netbsd."  But, more normally, people just
    the gnu tools fofr "arch-netbsd" or "arch-netbsdelf" or similar.

(2) MACHINE_GNU_ARCH for BE mips is 'mipseb'.  This is odd.  it happens
    to work right now because the gnu tools allow it (in config.sub),
    and match check for "mips*-...".  However, the normal name for BE
    MIPS targets in the GNU tools is mips-foo.

>How-To-Repeat:

Examine our toolchain configuration bits, with an understanding of what's
usually done w/ GNU tools.

>Fix:

See diff below.  Also, some of the import or bsd-makefile/config creation
scripts should probably be re-run.

Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.413
diff -u -p -r1.413 bsd.own.mk
--- share/mk/bsd.own.mk	8 Mar 2004 06:30:33 -0000	1.413
+++ share/mk/bsd.own.mk	27 Mar 2004 06:49:46 -0000
@@ -443,6 +443,7 @@ SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_ve
 # GNU sources and packages sometimes see architecture names differently.
 #
 GNU_ARCH.m68000=m68010
+GNU_ARCH.mipseb=mips
 GNU_ARCH.sh3eb=sh
 GNU_ARCH.sh3el=shle
 GNU_ARCH.sh5eb=sh5
@@ -464,9 +465,9 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_AR
      ${MACHINE_GNU_ARCH} == "shle" || \
      ${MACHINE_ARCH} == "sparc" || \
      ${MACHINE_ARCH} == "vax")
-MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
+MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}-netbsdelf
 .else
-MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
+MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}-netbsd
 .endif
 
 TARGETS+=	all clean cleandir depend dependall includes \
>Release-Note:
>Audit-Trail:
>Unformatted: