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
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_CPUARCH_SUB. >> >> This also adds missing s/aarch64/arm64 to the sys.mk version and also > > This breaks the arm64 build, but I think it's correct. > > Let's first start with what even is MACHINE_CPUARCH? It's unclear. > Looking at r209024 we get: > >> Introduce MACHINE_CPUARCH. Many different MACHINE_ARCHs will be built >> from one MACHINE_CPUARCH. This will allow us to move to a more >> standard MACHINE_ARCH for mips and arm which exist in many different >> endian variants, and for powerpc where both 32 and 64 bit binaries are >> generated from the same sources. > > If we look at the current targets list we have: > >> # 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 > > So one TARGET can have multiple TARGET_ARCH. So MACHINE_CPUARCH sounds > like TARGET. > > In all but the arm64 cases it seems that MACHINE_CPUARCH == MACHINE > (meaning TARGET_CPUARCH == TARGET). > > 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_CPUARCH > == aarc64 instead of MACHINE_CPUARCH == 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. > > For now I am just reverting this, but I think the commit is worth having > in here if we are going to keep MACHINE_CPUARCH as it keeps the > replacement list in 1 place. > >> adds back armv6hf for universe since it was added to the sys.mk version >> in r300438. >> >> 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 >> == >> --- head/MakefileTue Jul 12 17:58:58 2016(r302669) >> +++ head/MakefileTue Jul 12 18:57:25 2016(r302670) >> @@ -235,7 +235,7 @@ _MAKE+= MK_META_MODE=no >> _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} >> .elif !defined(TARGET) && defined(TARGET_ARCH) && \ >> ${TARGET_ARCH} != ${MACHINE_ARCH} >> -_TARGET= >> ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} >> +_TARGET=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} >> .endif >> .if defined(TARGET) && !defined(_TARGET) >> _TARGET=${TARGET} >> >> Modified: head/gnu/usr.bin/binutils/Makefile.inc0 >> == >> --- 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="2.17.50 [FreeBSD] 2007-07-03" >> >> .if defined(TARGET_ARCH) >> -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} >> +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} >> .else >> TARGET_CPUARCH=${MACHINE_CPUARCH} >> .endif >> >> Modified: head/gnu/usr.bin/cc/Makefile.tgt >> == >> --- 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... >> >> .if defined(TARGET_ARCH) >> -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} >> +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} >> .else >> TARGET_CPUARCH=${MACHINE_CPUARCH} >> .endif >> >> Modified: head/gnu/usr.bin/gdb/Makefile.inc >> == >> --- head/gnu/usr.bin/gdb/Makefile.incTue Jul 12 17:58:58 2016 >> (r3
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
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_CPUARCH_SUB. > > This also adds missing s/aarch64/arm64 to the sys.mk version and also This breaks the arm64 build, but I think it's correct. Let's first start with what even is MACHINE_CPUARCH? It's unclear. Looking at r209024 we get: > Introduce MACHINE_CPUARCH. Many different MACHINE_ARCHs will be built > from one MACHINE_CPUARCH. This will allow us to move to a more > standard MACHINE_ARCH for mips and arm which exist in many different > endian variants, and for powerpc where both 32 and 64 bit binaries are > generated from the same sources. If we look at the current targets list we have: > # 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 So one TARGET can have multiple TARGET_ARCH. So MACHINE_CPUARCH sounds like TARGET. In all but the arm64 cases it seems that MACHINE_CPUARCH == MACHINE (meaning TARGET_CPUARCH == TARGET). 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_CPUARCH == aarc64 instead of MACHINE_CPUARCH == arm64 (and directories named "aarch64" rather than "arm64", so I am willing to revert or modify this but it seems to be inconsistent. For now I am just reverting this, but I think the commit is worth having in here if we are going to keep MACHINE_CPUARCH as it keeps the replacement list in 1 place. > adds back armv6hf for universe since it was added to the sys.mk version > in r300438. > > 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 > == > --- 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+= MK_META_MODE=no > _TARGET_ARCH=${TARGET:S/pc98/i386/:S/arm64/aarch64/} > .elif !defined(TARGET) && defined(TARGET_ARCH) && \ > ${TARGET_ARCH} != ${MACHINE_ARCH} > -_TARGET= > ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} > +_TARGET= ${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} > .endif > .if defined(TARGET) && !defined(_TARGET) > _TARGET=${TARGET} > > Modified: head/gnu/usr.bin/binutils/Makefile.inc0 > == > --- 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= "2.17.50 [FreeBSD] 2007-07-03" > > .if defined(TARGET_ARCH) > -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} > +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} > .else > TARGET_CPUARCH=${MACHINE_CPUARCH} > .endif > > Modified: head/gnu/usr.bin/cc/Makefile.tgt > == > --- 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... > > .if defined(TARGET_ARCH) > -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} > +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} > .else > TARGET_CPUARCH=${MACHINE_CPUARCH} > .endif > > Modified: head/gnu/usr.bin/gdb/Makefile.inc > == > --- head/gnu/usr.bin/gdb/Makefile.inc Tue Jul 12 17:58:58 2016 > (r302669) > +++ head/gnu/usr.bin/gdb/Makefile.inc Tue Jul 12 18:57:25 2016 > (r302670) > @@ -23,7 +23,7 @@ OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/r > # MACHINE_CPUARCH, but there's no easy way to export make functions... > > .if defined(TARGET_ARCH) > -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerp
svn commit: r302670 - in head: . gnu/usr.bin/binutils gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb share/mk
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_CPUARCH_SUB. This also adds missing s/aarch64/arm64 to the sys.mk version and also adds back armv6hf for universe since it was added to the sys.mk version in r300438. 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 == --- 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+= MK_META_MODE=no _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} +_TARGET= ${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} Modified: head/gnu/usr.bin/binutils/Makefile.inc0 == --- 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= "2.17.50 [FreeBSD] 2007-07-03" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/cc/Makefile.tgt == --- head/gnu/usr.bin/cc/Makefile.tgtTue Jul 12 17:58:58 2016 (r302669) +++ head/gnu/usr.bin/cc/Makefile.tgtTue Jul 12 18:57:25 2016 (r302670) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/Makefile.inc == --- head/gnu/usr.bin/gdb/Makefile.inc Tue Jul 12 17:58:58 2016 (r302669) +++ head/gnu/usr.bin/gdb/Makefile.inc Tue Jul 12 18:57:25 2016 (r302670) @@ -23,7 +23,7 @@ OBJ_RL= ${OBJ_ROOT}/../lib/libreadline/r # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile == --- head/gnu/usr.bin/gdb/libgdb/MakefileTue Jul 12 17:58:58 2016 (r302669) +++ head/gnu/usr.bin/gdb/libgdb/MakefileTue Jul 12 18:57:25 2016 (r302670) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkTue Jul 12 17:58:58 2016(r302669) +++ head/share/mk/sys.mkTue Jul 12 18:57:25 2016(r302670) @@ -13,7 +13,13 @@ unix ?= We run FreeBSD, not UNIX. # and/or endian. This is called MACHINE_CPU in NetBSD, but that's used # for something different in FreeBSD. # -MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/} +MACHINE_CPUARCH_SUB= \ + C/mips(n32|64)?(el)?/mips/ \ + C/arm(v6)?(eb|hf)?/arm/ \ + C/aarch64/arm64/ \ + C/powerpc64/powerpc/ \ + C/riscv64/riscv/ +MACHINE_CPUARCH=${MACHINE_ARCH:${MACHINE_CPUARCH_SUB:ts:}} .endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"