NetBSD Problem Report #48193

From ryo_on@yk.rim.or.jp  Sun Sep  8 09:53:14 2013
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 574D6710C1
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  8 Sep 2013 09:53:14 +0000 (UTC)
Message-Id: <20130908095309.9E39B20270048@mail.SiriusCloud.jp>
Date: Sun,  8 Sep 2013 18:53:09 +0900 (JST)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
X-Send-Pr-Version: 3.95

>Number:         48193
>Category:       port-arm
>Synopsis:       On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf is expected in /usr/share/mk/bsd.own.mk .
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-arm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 08 09:55:01 +0000 2013
>Closed-Date:    Sun Oct 06 08:33:59 +0000 2013
>Last-Modified:  Sun Oct 06 08:34:17 +0000 2013
>Originator:     Ryo ONODERA
>Release:        NetBSD 6.99.23
>Organization:

>Environment:


System: NetBSD silver.elements.tetera.org 6.99.23 NetBSD 6.99.23 (RPINODEBUG) #1: Sun Sep  8 09:04:07 UTC 2013  ryo_on@deuterium.ryoon.net:/usr/obj/evbearmv6hf-el/sys/arch/evbarm/compile/RPINODEBUG evbarm
Architecture: x86_64
Machine: amd64
$ uname -p
earm
$ uname -m
evbarm
>Description:
On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH is "earm".

$ cd /usr/pkgsrc
$ $ make -V MACHINE_ARCH
earm

But in base's /usr/share/mk/bsd.own.mk, there is the following code.

#
# Default mips64 to softfloat now.
# arm is always softfloat unless it isn't
# emips is always softfloat.
# coldfire is always softfloat
#
.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \
    (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
    ${MACHINE_ARCH} == "coldfire" || \
    ${MACHINE} == "emips"
MKSOFTFLOAT?=   yes
.endif

Then softfloat is enabled on evbearmv6hf-el (hardfloat) system.

This inconsistency causes build failure of pkgsrc/sysutils/checkperms,
very essential program for pkgsrc developers (and many programs, I believe).
Error message is the following.

#   compile  checkperms-1.11/checkperms.o
gcc -O2 -msoft-float -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wno-traditional  -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror     -c    checkperms.c
#      link  checkperms-1.11/checkperms
gcc   -Wl,-R/usr/pkg/lib     -o checkperms  checkperms.o  -Wl,-rpath-link,/lib  -L=/lib
ld: error: checkperms uses VFP register arguments, checkperms.o does not
ld: failed to merge target specific data of file checkperms.o
*** Error code 1


Please fix softfloat/hardfloat detection mechanism on earm.

>How-To-Repeat:
See above.

>Fix:

I have no idea.

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Tue, 10 Sep 2013 23:28:42 +0900

 <arm/param.h> doesn't have proper *hf defines for sysctl.hw.machine_arch.
 http://nxr.netbsd.org/xref/src/sys/arch/arm/include/param.h?r=1.18#5

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 09:23:55 +0900 (JST)

 Hi,

 From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, Date: Tue, 10 Sep 2013 14:30:01 +0000 (UTC)

 > The following reply was made to PR port-arm/48193; it has been noted by GNATS.
 > 
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
 > 	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
 > Date: Tue, 10 Sep 2013 23:28:42 +0900
 > 
 >  <arm/param.h> doesn't have proper *hf defines for sysctl.hw.machine_arch.
 >  http://nxr.netbsd.org/xref/src/sys/arch/arm/include/param.h?r=1.18#5

 Thank you.

 make -V MACHINE_ARCH returns earmhf for evbearmv6hf-el
 Raspberry Pi with the following patch.

 pkgsrc/sysutils/checkpems is built successfully.

 Index: param.h
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/arm/include/param.h,v
 retrieving revision 1.18
 diff -u -r1.18 param.h
 --- param.h	22 Apr 2013 07:53:29 -0000	1.18
 +++ param.h	14 Sep 2013 00:02:22 -0000
 @@ -55,16 +55,26 @@
  # ifndef MACHINE_ARCH			/* XXX For now */
  #  ifndef __ARMEB__
  #   ifdef __ARM_EABI__
 -#    define	_MACHINE_ARCH	earm
 -#    define	MACHINE_ARCH	"earm"
 +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 +#     define	_MACHINE_ARCH	earmhf
 +#     define	MACHINE_ARCH	"earmhf"
 +#    else /* softfloat */
 +#     define	_MACHINE_ARCH	earm
 +#     define	MACHINE_ARCH	"earm"
 +#    endif
  #   else
  #    define	_MACHINE_ARCH	arm
  #    define	MACHINE_ARCH	"arm"
  #   endif
  #  else
  #   ifdef __ARM_EABI__
 -#    define	_MACHINE_ARCH	earmeb
 -#    define	MACHINE_ARCH	"earmeb"
 +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 +#     define	_MACHINE_ARCH	earmhfeb
 +#     define	MACHINE_ARCH	"earmhfeb"
 +#    else /* softfloat */
 +#     define	_MACHINE_ARCH	earmeb
 +#     define	MACHINE_ARCH	"earmeb"
 +#    endif
  #   else
  #    define	_MACHINE_ARCH	armeb
  #    define	MACHINE_ARCH	"armeb"
 @@ -80,16 +90,26 @@
  # define	MACHINE		"arm"
  # ifndef __ARMEB__
  #  ifdef __ARM_EABI__
 -#   define	_MACHINE_ARCH	earm
 -#   define	MACHINE_ARCH	"earm"
 +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 +#    define	_MACHINE_ARCH	earmhf
 +#    define	MACHINE_ARCH	"earmhf"
 +#   else /* softfloat */
 +#    define	_MACHINE_ARCH	earm
 +#    define	MACHINE_ARCH	"earm"
 +#   endif
  #  else
  #   define	_MACHINE_ARCH	arm
  #   define	MACHINE_ARCH	"arm"
  #  endif
  # else
  #  ifdef __ARM_EABI__
 -#   define	_MACHINE_ARCH	earmeb
 -#   define	MACHINE_ARCH	"earmeb"
 +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 +#    define	_MACHINE_ARCH	earmhfeb
 +#    define	MACHINE_ARCH	"earmhfeb"
 +#   else /* softfloat */
 +#    define	_MACHINE_ARCH	earmeb
 +#    define	MACHINE_ARCH	"earmeb"
 +#   endif
  #  else
  #   define	_MACHINE_ARCH	armeb
  #   define	MACHINE_ARCH	"armeb"

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Matt Thomas <matt@3am-software.com>
To: gnats-bugs@NetBSD.org
Cc: port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 ryoon@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Fri, 13 Sep 2013 17:39:17 -0700

 On Sep 13, 2013, at 5:25 PM, Ryo ONODERA <ryo_on@yk.rim.or.jp> wrote:

 > The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >=20
 > From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc:=20
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi,
 > MACHINE_ARCH returns earm, but *hf* is expected in
 > /usr/share/mk/bsd.own.mk .
 > Date: Sat, 14 Sep 2013 09:23:55 +0900 (JST)
 >=20
 > Hi,
 >=20
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, Date: Tue, 10 Sep 2013 =
 14:30:01 +0000 (UTC)
 >=20
 >> The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >>=20
 >> From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 >> To: gnats-bugs@NetBSD.org
 >> Cc: tsutsui@ceres.dti.ne.jp
 >> Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi, MACHINE_ARCH
 >> 	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk =
 .
 >> Date: Tue, 10 Sep 2013 23:28:42 +0900
 >>=20
 >> <arm/param.h> doesn't have proper *hf defines for =
 sysctl.hw.machine_arch.
 >> http://nxr.netbsd.org/xref/src/sys/arch/arm/include/param.h?r=3D1.18#5
 >=20
 > Thank you.
 >=20
 > make -V MACHINE_ARCH returns earmhf for evbearmv6hf-el
 > Raspberry Pi with the following patch.
 >=20
 > pkgsrc/sysutils/checkpems is built successfully.
 >=20
 > Index: param.h
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/src/sys/arch/arm/include/param.h,v
 > retrieving revision 1.18
 > diff -u -r1.18 param.h
 > --- param.h	22 Apr 2013 07:53:29 -0000	1.18
 > +++ param.h	14 Sep 2013 00:02:22 -0000
 > @@ -55,16 +55,26 @@
 >  # ifndef MACHINE_ARCH			/* XXX For now */
 >  #  ifndef __ARMEB__
 >  #   ifdef __ARM_EABI__
 > -#    define	_MACHINE_ARCH	earm
 > -#    define	MACHINE_ARCH	"earm"
 > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 > +#     define	_MACHINE_ARCH	earmhf
 > +#     define	MACHINE_ARCH	"earmhf"
 > +#    else /* softfloat */
 > +#     define	_MACHINE_ARCH	earm
 > +#     define	MACHINE_ARCH	"earm"
 > +#    endif
 >  #   else
 >  #    define	_MACHINE_ARCH	arm
 >  #    define	MACHINE_ARCH	"arm"
 >  #   endif
 >  #  else
 >  #   ifdef __ARM_EABI__
 > -#    define	_MACHINE_ARCH	earmeb
 > -#    define	MACHINE_ARCH	"earmeb"
 > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 > +#     define	_MACHINE_ARCH	earmhfeb
 > +#     define	MACHINE_ARCH	"earmhfeb"
 > +#    else /* softfloat */
 > +#     define	_MACHINE_ARCH	earmeb
 > +#     define	MACHINE_ARCH	"earmeb"
 > +#    endif
 >  #   else
 >  #    define	_MACHINE_ARCH	armeb
 >  #    define	MACHINE_ARCH	"armeb"
 > @@ -80,16 +90,26 @@
 >  # define	MACHINE		"arm"
 >  # ifndef __ARMEB__
 >  #  ifdef __ARM_EABI__
 > -#   define	_MACHINE_ARCH	earm
 > -#   define	MACHINE_ARCH	"earm"
 > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 > +#    define	_MACHINE_ARCH	earmhf
 > +#    define	MACHINE_ARCH	"earmhf"
 > +#   else /* softfloat */
 > +#    define	_MACHINE_ARCH	earm
 > +#    define	MACHINE_ARCH	"earm"
 > +#   endif
 >  #  else
 >  #   define	_MACHINE_ARCH	arm
 >  #   define	MACHINE_ARCH	"arm"
 >  #  endif
 >  # else
 >  #  ifdef __ARM_EABI__
 > -#   define	_MACHINE_ARCH	earmeb
 > -#   define	MACHINE_ARCH	"earmeb"
 > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 > +#    define	_MACHINE_ARCH	earmhfeb
 > +#    define	MACHINE_ARCH	"earmhfeb"
 > +#   else /* softfloat */
 > +#    define	_MACHINE_ARCH	earmeb
 > +#    define	MACHINE_ARCH	"earmeb"
 > +#   endif
 >  #  else
 >  #   define	_MACHINE_ARCH	armeb
 >  #   define	MACHINE_ARCH	"armeb"

 That doesn't really work since the kernel is always softfloat.

 I fixed it differently by embedding the MACHINE_ARCH in a note
 in the executable.  The kernel records the supplied MACHINE_ARCH
 in and returns when a sysctl for hw.machine_arch is done.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 10:17:39 +0900

 > That doesn't really work since the kernel is always softfloat.
 > 
 > I fixed it differently by embedding the MACHINE_ARCH in a note
 > in the executable.  The kernel records the supplied MACHINE_ARCH
 > in and returns when a sysctl for hw.machine_arch is done.

 Why don't you reply PRs (or note a PR number in logs) even after
 you fixed the problems pointed out by them?
 You are a member of Core, so your behaviors are really annoying.

 ---
 Izumi Tsutsui

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, matt@3am-software.com
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 10:40:38 +0900 (JST)

 From: Matt Thomas <matt@3am-software.com>, Date: Sat, 14 Sep 2013 00:40:00 +0000 (UTC)

 > The following reply was made to PR port-arm/48193; it has been noted by GNATS.
 > 
 > From: Matt Thomas <matt@3am-software.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: port-arm-maintainer@netbsd.org,
 >  gnats-admin@netbsd.org,
 >  netbsd-bugs@netbsd.org,
 >  ryoon@NetBSD.org
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
 > Date: Fri, 13 Sep 2013 17:39:17 -0700
 > 
 >  On Sep 13, 2013, at 5:25 PM, Ryo ONODERA <ryo_on@yk.rim.or.jp> wrote:
 >  
 >  > The following reply was made to PR port-arm/48193; it has been noted =
 >  by GNATS.
 >  >=20
 >  > From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 >  > To: gnats-bugs@NetBSD.org
 >  > Cc:=20
 >  > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 >  Pi,
 >  > MACHINE_ARCH returns earm, but *hf* is expected in
 >  > /usr/share/mk/bsd.own.mk .
 >  > Date: Sat, 14 Sep 2013 09:23:55 +0900 (JST)
 >  >=20
 >  > Hi,
 >  >=20
 >  > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>, Date: Tue, 10 Sep 2013 =
 >  14:30:01 +0000 (UTC)
 >  >=20
 >  >> The following reply was made to PR port-arm/48193; it has been noted =
 >  by GNATS.
 >  >>=20
 >  >> From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 >  >> To: gnats-bugs@NetBSD.org
 >  >> Cc: tsutsui@ceres.dti.ne.jp
 >  >> Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 >  Pi, MACHINE_ARCH
 >  >> 	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk =
 >  .
 >  >> Date: Tue, 10 Sep 2013 23:28:42 +0900
 >  >>=20
 >  >> <arm/param.h> doesn't have proper *hf defines for =
 >  sysctl.hw.machine_arch.
 >  >> http://nxr.netbsd.org/xref/src/sys/arch/arm/include/param.h?r=3D1.18#5
 >  >=20
 >  > Thank you.
 >  >=20
 >  > make -V MACHINE_ARCH returns earmhf for evbearmv6hf-el
 >  > Raspberry Pi with the following patch.
 >  >=20
 >  > pkgsrc/sysutils/checkpems is built successfully.
 >  >=20
 >  > Index: param.h
 >  > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >  > RCS file: /cvsroot/src/sys/arch/arm/include/param.h,v
 >  > retrieving revision 1.18
 >  > diff -u -r1.18 param.h
 >  > --- param.h	22 Apr 2013 07:53:29 -0000	1.18
 >  > +++ param.h	14 Sep 2013 00:02:22 -0000
 >  > @@ -55,16 +55,26 @@
 >  >  # ifndef MACHINE_ARCH			/* XXX For now */
 >  >  #  ifndef __ARMEB__
 >  >  #   ifdef __ARM_EABI__
 >  > -#    define	_MACHINE_ARCH	earm
 >  > -#    define	MACHINE_ARCH	"earm"
 >  > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#     define	_MACHINE_ARCH	earmhf
 >  > +#     define	MACHINE_ARCH	"earmhf"
 >  > +#    else /* softfloat */
 >  > +#     define	_MACHINE_ARCH	earm
 >  > +#     define	MACHINE_ARCH	"earm"
 >  > +#    endif
 >  >  #   else
 >  >  #    define	_MACHINE_ARCH	arm
 >  >  #    define	MACHINE_ARCH	"arm"
 >  >  #   endif
 >  >  #  else
 >  >  #   ifdef __ARM_EABI__
 >  > -#    define	_MACHINE_ARCH	earmeb
 >  > -#    define	MACHINE_ARCH	"earmeb"
 >  > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#     define	_MACHINE_ARCH	earmhfeb
 >  > +#     define	MACHINE_ARCH	"earmhfeb"
 >  > +#    else /* softfloat */
 >  > +#     define	_MACHINE_ARCH	earmeb
 >  > +#     define	MACHINE_ARCH	"earmeb"
 >  > +#    endif
 >  >  #   else
 >  >  #    define	_MACHINE_ARCH	armeb
 >  >  #    define	MACHINE_ARCH	"armeb"
 >  > @@ -80,16 +90,26 @@
 >  >  # define	MACHINE		"arm"
 >  >  # ifndef __ARMEB__
 >  >  #  ifdef __ARM_EABI__
 >  > -#   define	_MACHINE_ARCH	earm
 >  > -#   define	MACHINE_ARCH	"earm"
 >  > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#    define	_MACHINE_ARCH	earmhf
 >  > +#    define	MACHINE_ARCH	"earmhf"
 >  > +#   else /* softfloat */
 >  > +#    define	_MACHINE_ARCH	earm
 >  > +#    define	MACHINE_ARCH	"earm"
 >  > +#   endif
 >  >  #  else
 >  >  #   define	_MACHINE_ARCH	arm
 >  >  #   define	MACHINE_ARCH	"arm"
 >  >  #  endif
 >  >  # else
 >  >  #  ifdef __ARM_EABI__
 >  > -#   define	_MACHINE_ARCH	earmeb
 >  > -#   define	MACHINE_ARCH	"earmeb"
 >  > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#    define	_MACHINE_ARCH	earmhfeb
 >  > +#    define	MACHINE_ARCH	"earmhfeb"
 >  > +#   else /* softfloat */
 >  > +#    define	_MACHINE_ARCH	earmeb
 >  > +#    define	MACHINE_ARCH	"earmeb"
 >  > +#   endif
 >  >  #  else
 >  >  #   define	_MACHINE_ARCH	armeb
 >  >  #   define	MACHINE_ARCH	"armeb"
 >  
 >  That doesn't really work since the kernel is always softfloat.
 >  
 >  I fixed it differently by embedding the MACHINE_ARCH in a note
 >  in the executable.  The kernel records the supplied MACHINE_ARCH
 >  in and returns when a sysctl for hw.machine_arch is done.

 Which commit is for this fix?
 Could you show me the diff?
 I want to learn the way.

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 19:21:27 +0900 (JST)

 From: Matt Thomas <matt@3am-software.com>, Date: Fri, 13 Sep 2013 17:39:17 -0700
 > That doesn't really work since the kernel is always softfloat.
 > 
 > I fixed it differently by embedding the MACHINE_ARCH in a note
 > in the executable.  The kernel records the supplied MACHINE_ARCH
 > in and returns when a sysctl for hw.machine_arch is done.

 Original problem (build failure of pkgsrc/checkperms) is fixed.
 Thank you.

 By the way, the following code from /usr/share/mk/bsd.own.mk is
 irrelevant for current situation, because sysctl hw.machine_arch
 returns earmv6, and it has no *hf* string. 
 Please fit to current situation.

 .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \
     (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
     ${MACHINE_ARCH} == "coldfire" || \
     ${MACHINE} == "emips"
 MKSOFTFLOAT?=   yes
 .endif

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 19:23:11 +0900 (JST)

 make -V MACHINE_ARCH in pkgsrc/sysutils/checkperms returns earm,
 in this case it has no *hf* string in it.
 Anyway /usr/share/mk/bsd.own.mk should be improved.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Matt Thomas <matt@3am-software.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 ryoon@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 08:12:22 -0700

 On Sep 14, 2013, at 4:45 AM, Ryo ONODERA <ryo_on@yk.rim.or.jp> wrote:

 > The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >=20
 > From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 > To: gnats-bugs@netbsd.org
 > Cc:=20
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi,
 > MACHINE_ARCH returns earm, but *hf* is expected in
 > /usr/share/mk/bsd.own.mk .
 > Date: Sat, 14 Sep 2013 19:23:11 +0900 (JST)
 >=20
 > make -V MACHINE_ARCH in pkgsrc/sysutils/checkperms returns earm,
 > in this case it has no *hf* string in it.
 > Anyway /usr/share/mk/bsd.own.mk should be improved.

 bsd.own.mk is fine.
 make just never used sysctl to get hw.machine_arch to set MACHINE_ARCH.
 That has been fixed.

 ./make -f /usr/share/mk/bsd.own.mk -V MACHINE_ARCH                =20
 earmv7hf

 ./readelf -n make

 Notes at offset 0x0000012c with length 0x00000018:
   Owner         Data size       Description
   NetBSD        0x00000004      IDENT 699002300 (6.99.23)

 Notes at offset 0x00000144 with length 0x00000014:
   Owner         Data size       Description
   PaX           0x00000004      Unknown note type: (0x00000003)

 Notes at offset 0x00000158 with length 0x00000020:
   Owner         Data size       Description
   NetBSD        0x00000009      MARCH <earmv7hf>

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 01:20:25 +0900

 > bsd.own.mk is fine.
 > make just never used sysctl to get hw.machine_arch to set MACHINE_ARCH.
 > That has been fixed.

 Again, then please note PR numbers in your commit log.
 Your changes often make it harder to track problems later.

 ---
 Izumi Tsutsui

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 08:39:14 +0900 (JST)

 Hi

 >>  That doesn't really work since the kernel is always softfloat.
 >>  
 >>  I fixed it differently by embedding the MACHINE_ARCH in a note
 >>  in the executable.  The kernel records the supplied MACHINE_ARCH
 >>  in and returns when a sysctl for hw.machine_arch is done.
 >
 > Which commit is for this fix?
 > Could you show me the diff?
 > I want to learn the way.

 For the record.

 matt@ tells me the following commits are embedding the MACHINE_ARCH
 in a note in the executable.

 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047399.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 16:24:02 UTC 2013

 Modified Files:
         src/sys/sys: exec_elf.h

 Log Message:
 Add a NetBSD note variant for recording the machine_arch for which the
 executable was built.  (currently only used by earm variants)


 To generate a diff of this commit:
 cvs rdiff -u -r1.128 -r1.129 src/sys/sys/exec_elf.h


 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047400.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 16:35:10 UTC 2013

 Modified Files:
         src/libexec/ld.elf_so: sysident.h
         src/libexec/ld.elf_so/arch/arm: Makefile.inc

 Log Message:
 For earm, emit a MARCH note.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/libexec/ld.elf_so/sysident.h
 cvs rdiff -u -r1.19 -r1.20 src/libexec/ld.elf_so/arch/arm/Makefile.inc

 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047401.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 16:45:33 UTC 2013

 Modified Files:
         src/lib/csu: Makefile
         src/lib/csu/arch/earm: Makefile.inc
         src/lib/csu/common: Makefile.inc sysident.S sysident_assym.cf

 Log Message:
 Add support for a NetBSD MARCH elf note to record the MACHINE_ARCH for
 which a program was compiled.


 To generate a diff of this commit:
 cvs rdiff -u -r1.32 -r1.33 src/lib/csu/Makefile
 cvs rdiff -u -r1.2 -r1.3 src/lib/csu/arch/earm/Makefile.inc
 cvs rdiff -u -r1.16 -r1.17 src/lib/csu/common/Makefile.inc
 cvs rdiff -u -r1.1 -r1.2 src/lib/csu/common/sysident.S \
     src/lib/csu/common/sysident_assym.cf

 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047406.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 17:23:55 UTC 2013

 Modified Files:
         src/lib/csu/common: sysident_assym.cf

 Log Message:
 MARCH note is conditional


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/lib/csu/common/sysident_assym.cf


 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047416.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 21:30:21 UTC 2013

 Modified Files:
         src/sys/arch/arm/arm: cpu_exec.c
         src/sys/arch/arm/arm32: arm32_machdep.c vm_machdep.c
         src/sys/kern: exec_elf.c kern_exec.c kern_proc.c
         src/sys/sys: exec.h

 Log Message:
 Support an optional MARCH ELF tag.
 Store the MACHINE_ARCH of the executable in mdproc and override sysctl
 so that value returned.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm/cpu_exec.c
 cvs rdiff -u -r1.97 -r1.98 src/sys/arch/arm/arm32/arm32_machdep.c
 cvs rdiff -u -r1.67 -r1.68 src/sys/arch/arm/arm32/vm_machdep.c
 cvs rdiff -u -r1.46 -r1.47 src/sys/kern/exec_elf.c
 cvs rdiff -u -r1.361 -r1.362 src/sys/kern/kern_exec.c
 cvs rdiff -u -r1.187 -r1.188 src/sys/kern/kern_proc.c
 cvs rdiff -u -r1.139 -r1.140 src/sys/sys/exec.h

 http://mail-index.netbsd.org/source-changes/2013/09/10/msg047417.html
 Module Name:    src
 Committed By:   matt
 Date:           Tue Sep 10 22:00:01 UTC 2013

 Modified Files:
         src/lib/csu/arch/arm: Makefile.inc

 Log Message:
 Define ELF_NOTE_MARCH_DESC for when running non-eabi in compat_netbsd32


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/lib/csu/arch/arm/Makefile.inc

 http://mail-index.netbsd.org/source-changes/2013/09/11/msg047424.html
 Module Name:    src
 Committed By:   matt
 Date:           Wed Sep 11 04:24:48 UTC 2013

 Modified Files:
         src/sys/arch/arm/include: proc.h

 Log Message:
 Add md_march and PROC0_MD_INITIALIZERS


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/proc.h

 http://mail-index.netbsd.org/source-changes/2013/09/11/msg047439.html
 Module Name:    src
 Committed By:   matt
 Date:           Wed Sep 11 18:53:54 UTC 2013

 Modified Files:
         src/external/gpl3/binutils/dist/binutils: readelf.c
         src/external/gpl3/binutils/dist/include/elf: common.h

 Log Message:
 Teach readelf how to interpet netbsd notes.

 Notes at offset 0x00000128 with length 0x00000018:
   Owner         Data size       Description
   NetBSD        0x00000004      IDENT 699002300 (6.99.23)

 Notes at offset 0x00000154 with length 0x00000020:
   Owner         Data size       Description
   NetBSD        0x00000009      MARCH <earmv7hf>


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/binutils/readelf.c
 cvs rdiff -u -r1.1.1.2 -r1.2 \
     src/external/gpl3/binutils/dist/include/elf/common.h

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 08:41:48 +0900 (JST)

 From: Matt Thomas <matt@3am-software.com>, Date: Sat, 14 Sep 2013 08:12:22 -0700

 > 
 > On Sep 14, 2013, at 4:45 AM, Ryo ONODERA <ryo_on@yk.rim.or.jp> wrote:
 > 
 >> The following reply was made to PR port-arm/48193; it has been noted by GNATS.
 >> 
 >> From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 >> To: gnats-bugs@netbsd.org
 >> Cc: 
 >> Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 >> MACHINE_ARCH returns earm, but *hf* is expected in
 >> /usr/share/mk/bsd.own.mk .
 >> Date: Sat, 14 Sep 2013 19:23:11 +0900 (JST)
 >> 
 >> make -V MACHINE_ARCH in pkgsrc/sysutils/checkperms returns earm,
 >> in this case it has no *hf* string in it.
 >> Anyway /usr/share/mk/bsd.own.mk should be improved.
 > 
 > bsd.own.mk is fine.
 > make just never used sysctl to get hw.machine_arch to set MACHINE_ARCH.
 > That has been fixed.
 > 
 > ./make -f /usr/share/mk/bsd.own.mk -V MACHINE_ARCH                 
 > earmv7hf
 > 
 > ./readelf -n make
 > 
 > Notes at offset 0x0000012c with length 0x00000018:
 >   Owner         Data size       Description
 >   NetBSD        0x00000004      IDENT 699002300 (6.99.23)
 > 
 > Notes at offset 0x00000144 with length 0x00000014:
 >   Owner         Data size       Description
 >   PaX           0x00000004      Unknown note type: (0x00000003)
 > 
 > Notes at offset 0x00000158 with length 0x00000020:
 >   Owner         Data size       Description
 >   NetBSD        0x00000009      MARCH <earmv7hf>
 > 

 I believe that the following commit is the change for make(1).
 I am building evbearmv6hf-el world now.
 I will report the result later.

 http://mail-index.netbsd.org/source-changes/2013/09/14/msg047577.html
 Module Name:	src
 Committed By:	matt
 Date:		Sat Sep 14 15:09:34 UTC 2013

 Modified Files:
 	src/usr.bin/make: main.c

 Log Message:
 If MAKE_NATIVE, use sysctl to get MACHINE_ARCH from hw.machine_arch.


 To generate a diff of this commit:
 cvs rdiff -u -r1.224 -r1.225 src/usr.bin/make/main.c

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 12:36:15 +0900 (JST)

 Hi,

 I have tested newly installed NetBSD/evbearmv6hf-el for Raspberry Pi.
 The kernel and userland are built from make(1)-patched src/.

 I have gotten the following error and I cannot install any packages anymore.

 Sadly I have not been able to find origin of "earm" string.

 Please fix this problem.

 $ pkg_add /usr/pkgbin/All/digest-20121220.tgz
 pkg_add: Warning: package `digest-20121220' was built for a platform:
 pkg_add: NetBSD/earmv6hf 6.99.23 (pkg) vs. NetBSD/earm 6.99.23 (this host)
 pkg_add: 1 package addition failed

 $ make -V MACHINE_ARCH
 earmv6hf

 $ uname -p
 earmv6hf

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Matt Thomas <matt@3am-software.com>
To: gnats-bugs@NetBSD.org
Cc: port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 ryoon@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 20:46:00 -0700

 On Sep 15, 2013, at 8:40 PM, Ryo ONODERA <ryo_on@yk.rim.or.jp> wrote:

 > The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >=20
 > From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
 > To: gnats-bugs@netbsd.org
 > Cc:=20
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi,
 > MACHINE_ARCH returns earm, but *hf* is expected in
 > /usr/share/mk/bsd.own.mk .
 > Date: Mon, 16 Sep 2013 12:36:15 +0900 (JST)
 >=20
 > Hi,
 >=20
 > I have tested newly installed NetBSD/evbearmv6hf-el for Raspberry Pi.
 > The kernel and userland are built from make(1)-patched src/.
 >=20
 > I have gotten the following error and I cannot install any packages =
 anymore.
 >=20
 > Sadly I have not been able to find origin of "earm" string.
 >=20
 > Please fix this problem.
 >=20
 > $ pkg_add /usr/pkgbin/All/digest-20121220.tgz
 > pkg_add: Warning: package `digest-20121220' was built for a platform:
 > pkg_add: NetBSD/earmv6hf 6.99.23 (pkg) vs. NetBSD/earm 6.99.23 (this =
 host)
 > pkg_add: 1 package addition failed
 >=20
 > $ make -V MACHINE_ARCH
 > earmv6hf
 >=20
 > $ uname -p
 > earmv6hf

 That needs a different PR since it doesn't concern bsd.own.mk=

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 12:52:50 +0900 (JST)

 Hi,

 From: Matt Thomas <matt@3am-software.com>, Date: Sun, 15 Sep 2013 20:46:00 -0700

 > That needs a different PR since it doesn't concern bsd.own.mk

 I will create another PR for port-arm.
 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 14:59:16 +0900

 > That needs a different PR since it doesn't concern bsd.own.mk

 Is there any public discussion how we should switch sf and hf
 if they have the same ABI but just different default?

 I wonder if using MACHINE_ARCH and switching it at runtime
 is a really good idea...

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 23:00:55 -0700

 On Sep 15, 2013, at 10:59 PM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:

 >> That needs a different PR since it doesn't concern bsd.own.mk
 > 
 > Is there any public discussion how we should switch sf and hf
 > if they have the same ABI but just different default?
 > 
 > I wonder if using MACHINE_ARCH and switching it at runtime
 > is a really good idea...

 They aren't the same ABI, that's the problem.
 It's similar but different.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 15:04:05 +0900

 > They aren't the same ABI, that's the problem.
 > It's similar but different.

 Then why do we have to switch sysctl_hw_machine_arch at runtime?
 Different ABIs, but the same kernel?

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: gnats-bugs@NetBSD.org
Cc: port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 ryoon@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 23:23:19 -0700

 On Sep 15, 2013, at 11:05 PM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> =
 wrote:

 > The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >=20
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: matt@3am-software.com
 > Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi, MACHINE_ARCH
 > 	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk =
 .
 > Date: Mon, 16 Sep 2013 15:04:05 +0900
 >=20
 >> They aren't the same ABI, that's the problem.
 >> It's similar but different.
 >=20
 > Then why do we have to switch sysctl_hw_machine_arch at runtime?
 > Different ABIs, but the same kernel?

 Because we don't pass floating point values into the kernel.
 So the kernel is completely unaware of whether the userland
 is using softfloat or hardfloat.=

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 15:35:14 +0900

 > Because we don't pass floating point values into the kernel.
 > So the kernel is completely unaware of whether the userland
 > is using softfloat or hardfloat.

 Then is it really a good idea to ask machine_arch to the kernel
 via sysctl to deteremine userland ABI?

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Sun, 15 Sep 2013 23:53:42 -0700

 On Sep 15, 2013, at 11:35 PM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:

 >> Because we don't pass floating point values into the kernel.
 >> So the kernel is completely unaware of whether the userland
 >> is using softfloat or hardfloat.
 > 
 > Then is it really a good idea to ask machine_arch to the kernel
 > via sysctl to deteremine userland ABI?

 As opposed to?  Our build system is predicated on MACHINE_ARCH
 being a architecuture+abi indicator.  

 If you have a better suggestion, offer it on tech-kern.
 pr-s are not a place for this discussion.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 17:05:04 +0900

 > If you have a better suggestion, offer it on tech-kern.
 > pr-s are not a place for this discussion.

 My first question is:

 >> Is there any public discussion how we should switch sf and hf
 >> if they have the same ABI but just different default?

 If the answer is no, all your changes should be reverted before discussion.

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: gnats-bugs@NetBSD.org
Cc: port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org,
 ryoon@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 01:22:53 -0700

 On Sep 16, 2013, at 1:10 AM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> =
 wrote:

 > The following reply was made to PR port-arm/48193; it has been noted =
 by GNATS.
 >=20
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: matt@3am-software.com
 > Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 Pi, MACHINE_ARCH
 > 	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk =
 .
 > Date: Mon, 16 Sep 2013 17:05:04 +0900
 >=20
 >> If you have a better suggestion, offer it on tech-kern.
 >> pr-s are not a place for this discussion.
 >=20
 > My first question is:
 >=20
 >>> Is there any public discussion how we should switch sf and hf
 >>> if they have the same ABI but just different default?
 >=20
 > If the answer is no, all your changes should be reverted before =
 discussion.

 Uh, no.  It solves the PR.  It even solves the problem of untarring a =
 different
 implementation in a chroot and then getting the right MACHINE_ARCH for =
 that tree.

 It can be backed out if and when someone comes up with a better =
 solution.

 If exposes bugs in NetBSD, so much the better so we can fix them.=

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 18:25:44 +0900

 > Uh, no.  It solves the PR.

 No. It just worked around the problem, and then causes another problems.

 You should first define what MACHINE_ARCH and sysctl.hw.machine_arch mean,
 before touching sources. Kernel architectures? Userland binary ABI?

 >  It even solves the problem of untarring a different
 > implementation in a chroot and then getting the right MACHINE_ARCH for that tree.

 If hf and sf can be switched dynamically, it will cause confusion
 to have static MACHINE_ARCH in <arm/param.h> and dynamic one
 returned by sysctl.

 > It can be backed out if and when someone comes up with a better solution.

 Probably you should read the commit guidelines again. You didn't
 have a prior discussion, and you didn't even test your changes.
 If core members don't have to have reviews even for exported API changes,
 I have no further comments though.

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 02:34:33 -0700

 On Sep 16, 2013, at 2:25 AM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> =
 wrote:

 >> Uh, no.  It solves the PR.
 >=20
 > No. It just worked around the problem, and then causes another =
 problems.
 >=20
 > You should first define what MACHINE_ARCH and sysctl.hw.machine_arch =
 mean,
 > before touching sources. Kernel architectures? Userland binary ABI?

 latter otherwise we could collapse a lot of machine_arches.
 MACHINE_ARCH is also used by the pkgtools to delineate ABI as well.

 >> It even solves the problem of untarring a different
 >> implementation in a chroot and then getting the right MACHINE_ARCH =
 for that tree.
 >=20
 > If hf and sf can be switched dynamically, it will cause confusion
 > to have static MACHINE_ARCH in <arm/param.h> and dynamic one
 > returned by sysctl.

 MACHINE and MACHINE_ARCH in param.h should die.  If you want the value,
 use sysctl.  I've been arguing that on chat currently.

 >> It can be backed out if and when someone comes up with a better =
 solution.
 >=20
 > Probably you should read the commit guidelines again. You didn't
 > have a prior discussion, and you didn't even test your changes.
 > If core members don't have to have reviews even for exported API =
 changes,
 > I have no further comments though.

 Well, I did test my changes.  I determined that sysctl was doing what
 I expected.  It never occurred to me that make didn't use sysctl.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 18:51:54 +0900

 > I've been arguing that on chat currently.

 Why not on the public lists?

 ---
 Izumi Tsutsui

From: Matt Thomas <matt@3am-software.com>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 02:54:29 -0700

 On Sep 16, 2013, at 2:51 AM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:

 >> I've been arguing that on chat currently.
 > 
 > Why not on the public lists?

 because it's nearly 3am and I'm not cognizant enough to compose 
 a mail message supporting my proposal.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: matt@3am-software.com
Cc: gnats-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH
	 returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
Date: Mon, 16 Sep 2013 19:17:25 +0900

 > >> I've been arguing that on chat currently.
 > > 
 > > Why not on the public lists?
 > 
 > because it's nearly 3am and I'm not cognizant enough to compose 
 > a mail message supporting my proposal.

 Then, please have proper prior discussions on the public list
 *before* commits.  So that you can avoid annoying claims like this.

 ---
 Izumi Tsutsui

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 06 Oct 2013 08:33:59 +0000
State-Changed-Why:
AIUI from the PR discussion the problem here is fixed. 

Dealing with MACHINE_ARCH sanely is a real issue but that should be
hammered out on tech-kern, not in gnats. (and please do take it there,
it's not a trivial issue)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.