Date: Mon, 12 Dec 2022 11:48:47 +0000 From: Andrew Turner <andrew@fubar.geek.nz> To: Piotr Kubaj <pkubaj@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 83bf6ab56829 - main - uname: switch machine to HW_MACHINE_ARCH Message-ID: <F89AA9DF-46F5-41A3-87DF-984B9F199E12@fubar.geek.nz> In-Reply-To: <202212111208.2BBC835O095410@gitrepo.freebsd.org> References: <202212111208.2BBC835O095410@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 11 Dec 2022, at 12:08, Piotr Kubaj <pkubaj@FreeBSD.org> wrote: >=20 > The branch main has been updated by pkubaj (ports committer): >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D83bf6ab568293e325f437342cdb87a62= 6353e27c >=20 > commit 83bf6ab568293e325f437342cdb87a626353e27c > Author: Piotr Kubaj <pkubaj@FreeBSD.org> > AuthorDate: 2022-12-11 03:01:44 +0000 > Commit: Piotr Kubaj <pkubaj@FreeBSD.org> > CommitDate: 2022-12-11 12:05:39 +0000 >=20 > uname: switch machine to HW_MACHINE_ARCH >=20 > On powerpc64, powerpc64le and riscv64 some software wrongly assumes = that > it runs on powerpc or riscv (32-bit). >=20 > Differential revision: https://reviews.freebsd.org/D35962 > Approved by: alfredo, imp > --- > lib/libc/gen/__xuname.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/libc/gen/__xuname.c b/lib/libc/gen/__xuname.c > index fba5eaeebc88..bd328d4f880f 100644 > --- a/lib/libc/gen/__xuname.c > +++ b/lib/libc/gen/__xuname.c > @@ -127,11 +127,11 @@ __xuname(int namesize, void *namebuf) > } > q +=3D namesize; >=20 > - if ((p =3D getenv("UNAME_m"))) > + if ((p =3D getenv("UNAME_p"))) > strlcpy(q, p, namesize); > else { > mib[0] =3D CTL_HW; > - mib[1] =3D HW_MACHINE; > + mib[1] =3D HW_MACHINE_ARCH; > len =3D namesize; > oerrno =3D errno; > if (sysctl(mib, 2, q, &len, NULL, 0) =3D=3D -1) { >=20 This breaks the native arm64 build as make sets MACHINE based on this = value. It is changed from arm64 to aarch64 which is incorrect so I get = issues like the following: make[1]: =E2=80=9C.../freebsd/Makefile.inc1" line 163: Unknown target = aarch64:aarch64. I expect it also breaks the powerpc and riscv native builds for the same = reason. Can you please revert until this can be fixed. Andrew=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F89AA9DF-46F5-41A3-87DF-984B9F199E12>