NetBSD Problem Report #24936

Received: (qmail 12788 invoked by uid 605); 27 Mar 2004 06:56:43 -0000
Message-Id: <20040327065641.12765.qmail@mail.netbsd.org>
Date: 27 Mar 2004 06:56:41 -0000
From: cgd@broadcom.com
Sender: gnats-bugs-owner@NetBSD.org
Reply-To:
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: MACHINE_GNU_PLATFORM uses --, MACHINE_GNU_ARCH for mips is odd
X-Send-Pr-Version: 3.112
X-GNATS-Notify:

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 27 06:57:00 +0000 2004
>Closed-Date:    Sun Jun 03 09:57:00 +0000 2018
>Last-Modified:  Sun Jun 03 09:57:00 +0000 2018
>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:

From: matthew green <mrg@eterna.com.au>
To: cgd@broadcom.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: re: toolchain/24936: MACHINE_GNU_PLATFORM uses --, MACHINE_GNU_ARCH for mips is odd 
Date: Sat, 27 Mar 2004 19:22:27 +1100


    -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


 i support this change but i have this feeling that *something in
 our tree* depends on it?

From: cgd@broadcom.com
To: "matthew green" <mrg@eterna.com.au>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: toolchain/24936: MACHINE_GNU_PLATFORM uses --,
 MACHINE_GNU_ARCH for mips is odd
Date: 27 Mar 2004 13:21:28 -0800

 At Sat, 27 Mar 2004 19:22:27 +1100, matthew green wrote:
 >    -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
 > 
 > i support this change but i have this feeling that *something in
 > our tree* depends on it?

 the pre-import scripts used on gnu toolchain components tend to encode
 this information in their result files.

 but AFAICT they don't depend on it.

 I've been running with the -- -> - and mipseb -> mips change for a
 little bit now on one of my mips systems, and it seems to work fine...


 cgd

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 09:57:00 +0000
State-Changed-Why:
Closing as won'tfix. this is a cosmetic change with a chance of breaking hundreds of configure scripts. If someone wants to insist on it, show an unmodified bulkbuild of pkgsrc and whether it is affected.
I disagree on mipseb -> mips. linux uses "mips" for both little and big, and it's actually a problem because e.g. the pkgsrc configure script can't tell them apart and wants to kn ow endianness.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.