Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2016 18:35:04 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Warner Losh <imp@FreeBSD.org>, andrew@FreeBSD.org, Justin Hibbits <jhibbits@freebsd.org>
Subject:   Re: svn commit: r302670 - in head: . gnu/usr.bin/binutils gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb share/mk
Message-ID:  <6c601f75-c5eb-d276-b888-816c499cdcf5@FreeBSD.org>
In-Reply-To: <b318434f-f296-18f4-d208-876da61f5805@FreeBSD.org>
References:  <201607121857.u6CIvPBG060470@repo.freebsd.org> <b318434f-f296-18f4-d208-876da61f5805@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--XgnQavqvOKfrHR0mxKx4gG1ggcodB8ogW
Content-Type: multipart/mixed; boundary="KJbMESl6wW6OvK3agJW8xrLLtBhfaJSD2"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org, Warner Losh <imp@FreeBSD.org>, andrew@FreeBSD.org,
 Justin Hibbits <jhibbits@freebsd.org>
Message-ID: <6c601f75-c5eb-d276-b888-816c499cdcf5@FreeBSD.org>
Subject: Re: svn commit: r302670 - in head: . gnu/usr.bin/binutils
 gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb share/mk
References: <201607121857.u6CIvPBG060470@repo.freebsd.org>
 <b318434f-f296-18f4-d208-876da61f5805@FreeBSD.org>
In-Reply-To: <b318434f-f296-18f4-d208-876da61f5805@FreeBSD.org>

--KJbMESl6wW6OvK3agJW8xrLLtBhfaJSD2
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 7/12/2016 6:32 PM, Bryan Drewery wrote:
> On 7/12/2016 11:57 AM, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Tue Jul 12 18:57:25 2016
>> New Revision: 302670
>> URL: https://svnweb.freebsd.org/changeset/base/302670
>>
>> Log:
>>   Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUAR=
CH_SUB.
>>  =20
>>   This also adds missing s/aarch64/arm64 to the sys.mk version and als=
o
>=20
> This breaks the arm64 build, but I think it's correct.
>=20
> Let's first start with what even is MACHINE_CPUARCH? It's unclear.
> Looking at r209024 we get:
>=20
>>     Introduce MACHINE_CPUARCH.  Many different MACHINE_ARCHs will be b=
uilt
>>     from one MACHINE_CPUARCH.  This will allow us to move to a more
>>     standard MACHINE_ARCH for mips and arm which exist in many differe=
nt
>>     endian variants, and for powerpc where both 32 and 64 bit binaries=
 are
>>     generated from the same sources.
>=20
> If we look at the current targets list we have:
>=20
>> # make targets
>> Supported TARGET/TARGET_ARCH pairs for world and kernel targets
>>     amd64/amd64
>>     arm/arm
>>     arm/armeb
>>     arm/armv6
>>     arm64/aarch64
>>     i386/i386
>>     mips/mipsel
>>     mips/mips
>>     mips/mips64el
>>     mips/mips64
>>     mips/mipsn32
>>     pc98/i386
>>     powerpc/powerpc
>>     powerpc/powerpc64
>>     sparc64/sparc64
>=20
> So one TARGET can have multiple TARGET_ARCH.  So MACHINE_CPUARCH sounds=

> like TARGET.
>=20
> In all but the arm64 cases it seems that MACHINE_CPUARCH =3D=3D MACHINE=

> (meaning TARGET_CPUARCH =3D=3D TARGET).
>=20
> So 1. I think MACHINE_CPUARCH is really just MACHINE.
> and 2. I think the proper MACHINE_CPUARCH for AArch64 is arm64 since
> that is what the TARGET is.  There's a lot of code using MACHINE_CPUARC=
H
> =3D=3D aarc64 instead of MACHINE_CPUARCH =3D=3D arm64 (and directories =
named
> "aarch64" rather than "arm64",

And I think this is only the case because we had these replacements
spread everywhere and C/aarch64/arm64/ was missed in share/mk/sys.mk
until I added it here.

> so I am willing to revert or modify this
> but it seems to be inconsistent.
>=20
> For now I am just reverting this, but I think the commit is worth havin=
g
> in here if we are going to keep MACHINE_CPUARCH as it keeps the
> replacement list in 1 place.
>=20
>>   adds back armv6hf for universe since it was added to the sys.mk vers=
ion
>>   in r300438.
>>  =20
>>   MFC after:	3 days
>>   Sponsored by:	EMC / Isilon Storage Division
>>   Differential Revision:	https://reviews.freebsd.org/D7159
>>
>> Modified:
>>   head/Makefile
>>   head/gnu/usr.bin/binutils/Makefile.inc0
>>   head/gnu/usr.bin/cc/Makefile.tgt
>>   head/gnu/usr.bin/gdb/Makefile.inc
>>   head/gnu/usr.bin/gdb/libgdb/Makefile
>>   head/share/mk/sys.mk
>>
>> Modified: head/Makefile
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/Makefile	Tue Jul 12 17:58:58 2016	(r302669)
>> +++ head/Makefile	Tue Jul 12 18:57:25 2016	(r302670)
>> @@ -235,7 +235,7 @@ _MAKE+=3D	MK_META_MODE=3Dno
>>  _TARGET_ARCH=3D	${TARGET:S/pc98/i386/:S/arm64/aarch64/}
>>  .elif !defined(TARGET) && defined(TARGET_ARCH) && \
>>      ${TARGET_ARCH} !=3D ${MACHINE_ARCH}
>> -_TARGET=3D		${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/=
arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/}
>> +_TARGET=3D		${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .endif
>>  .if defined(TARGET) && !defined(_TARGET)
>>  _TARGET=3D${TARGET}
>>
>> Modified: head/gnu/usr.bin/binutils/Makefile.inc0
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/gnu/usr.bin/binutils/Makefile.inc0	Tue Jul 12 17:58:58 2016	(=
r302669)
>> +++ head/gnu/usr.bin/binutils/Makefile.inc0	Tue Jul 12 18:57:25 2016	(=
r302670)
>> @@ -7,7 +7,7 @@
>>  VERSION=3D	"2.17.50 [FreeBSD] 2007-07-03"
>> =20
>>  .if defined(TARGET_ARCH)
>> -TARGET_CPUARCH=3D${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(=
eb)?/arm/:C/powerpc64/powerpc/}
>> +TARGET_CPUARCH=3D${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .else
>>  TARGET_CPUARCH=3D${MACHINE_CPUARCH}
>>  .endif
>>
>> Modified: head/gnu/usr.bin/cc/Makefile.tgt
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/gnu/usr.bin/cc/Makefile.tgt	Tue Jul 12 17:58:58 2016	(r302669=
)
>> +++ head/gnu/usr.bin/cc/Makefile.tgt	Tue Jul 12 18:57:25 2016	(r302670=
)
>> @@ -4,7 +4,7 @@
>>  # MACHINE_CPUARCH, but there's no easy way to export make functions..=
=2E
>> =20
>>  .if defined(TARGET_ARCH)
>> -TARGET_CPUARCH=3D${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(=
eb)?/arm/:C/powerpc64/powerpc/}
>> +TARGET_CPUARCH=3D${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .else
>>  TARGET_CPUARCH=3D${MACHINE_CPUARCH}
>>  .endif
>>
>> Modified: head/gnu/usr.bin/gdb/Makefile.inc
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/gnu/usr.bin/gdb/Makefile.inc	Tue Jul 12 17:58:58 2016	(r30266=
9)
>> +++ head/gnu/usr.bin/gdb/Makefile.inc	Tue Jul 12 18:57:25 2016	(r30267=
0)
>> @@ -23,7 +23,7 @@ OBJ_RL=3D ${OBJ_ROOT}/../lib/libreadline/r
>>  # MACHINE_CPUARCH, but there's no easy way to export make functions..=
=2E
>> =20
>>  .if defined(TARGET_ARCH)
>> -TARGET_CPUARCH=3D${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(=
eb)?/arm/:C/powerpc64/powerpc/}
>> +TARGET_CPUARCH=3D${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .else
>>  TARGET_CPUARCH=3D${MACHINE_CPUARCH}
>>  .endif
>>
>> Modified: head/gnu/usr.bin/gdb/libgdb/Makefile
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/gnu/usr.bin/gdb/libgdb/Makefile	Tue Jul 12 17:58:58 2016	(r30=
2669)
>> +++ head/gnu/usr.bin/gdb/libgdb/Makefile	Tue Jul 12 18:57:25 2016	(r30=
2670)
>> @@ -4,7 +4,7 @@
>>  # MACHINE_CPUARCH, but there's no easy way to export make functions..=
=2E
>> =20
>>  .if defined(TARGET_ARCH)
>> -TARGET_CPUARCH=3D${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(=
eb)?/arm/:C/powerpc64/powerpc/}
>> +TARGET_CPUARCH=3D${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .else
>>  TARGET_CPUARCH=3D${MACHINE_CPUARCH}
>>  .endif
>>
>> Modified: head/share/mk/sys.mk
>> =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=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/share/mk/sys.mk	Tue Jul 12 17:58:58 2016	(r302669)
>> +++ head/share/mk/sys.mk	Tue Jul 12 18:57:25 2016	(r302670)
>> @@ -13,7 +13,13 @@ unix		?=3D	We run FreeBSD, not UNIX.
>>  # and/or endian.  This is called MACHINE_CPU in NetBSD, but that's us=
ed
>>  # for something different in FreeBSD.
>>  #
>> -MACHINE_CPUARCH=3D${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)=
?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/}
>> +MACHINE_CPUARCH_SUB=3D \
>> +		C/mips(n32|64)?(el)?/mips/ \
>> +		C/arm(v6)?(eb|hf)?/arm/ \
>> +		C/aarch64/arm64/ \
>> +		C/powerpc64/powerpc/ \
>> +		C/riscv64/riscv/
>> +MACHINE_CPUARCH=3D${MACHINE_ARCH:${MACHINE_CPUARCH_SUB:ts:}}
>>  .endif
>> =20
>> =20
>>
>=20
>=20


--=20
Regards,
Bryan Drewery


--KJbMESl6wW6OvK3agJW8xrLLtBhfaJSD2--

--XgnQavqvOKfrHR0mxKx4gG1ggcodB8ogW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJXhZrIAAoJEDXXcbtuRpfPsxQH/1h/g8uUqpxMchuHJjxmQvG5
KfxJHRKZP4z4myyGIumDck0nt+aO1dsYeGaeRNuNYcGvWZ7ZM2ed2Bbk3rrNT0DQ
XlGuueFmSby73p5AE2fxmyGKDrIh2LyZS/V9Z8uKXstBJWUFpY0xqkqKOJI4haVg
zWiHVE40RKkFZDj3yrySMPt3wzSey13CeN6opbom1G3YBpyAzcJ+HWVoYDQ5EmYl
brEVin/JxyCwHRQ1zkQ2w4RIKj2iyq/0WoSrzgUwanbpJlEfmN7W6PvkEdPz6ifR
SSROSRgFT2542WWRB07T74eKWkvboneBwnWaRo/CvgxHcH0PJv85VdIn6MO1XOs=
=i65F
-----END PGP SIGNATURE-----

--XgnQavqvOKfrHR0mxKx4gG1ggcodB8ogW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6c601f75-c5eb-d276-b888-816c499cdcf5>