Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2024 17:50:49 +0100
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        John Baldwin <jhb@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: 3a4b04e82df6 - main - depend-cleanup.sh: Simplify handling for stale syscall.S
Message-ID:  <4DA51278-CCE1-4790-BAE3-73DAC2494574@freebsd.org>
In-Reply-To: <202408051949.475JnRAM055960@gitrepo.freebsd.org>
References:  <202408051949.475JnRAM055960@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5 Aug 2024, at 20:49, John Baldwin <jhb@FreeBSD.org> wrote:
>=20
> The branch main has been updated by jhb:
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D3a4b04e82df6bb9b28aa0c3c670c1906=
3843d644
>=20
> commit 3a4b04e82df6bb9b28aa0c3c670c19063843d644
> Author:     John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2024-08-05 19:49:06 +0000
> Commit:     John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2024-08-05 19:49:06 +0000
>=20
>    depend-cleanup.sh: Simplify handling for stale syscall.S
>=20
>    Remove the outer grep and depend on the greps in clean_dep instead.
>=20
>    Reviewed by:    brooks, imp
>    Obtained from:  CheriBSD
>    Sponsored by:   AFRL, DARPA
>    Differential Revision:  https://reviews.freebsd.org/D46103
> ---
> tools/build/depend-cleanup.sh | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>=20
> diff --git a/tools/build/depend-cleanup.sh =
b/tools/build/depend-cleanup.sh
> index b93d50a57ff4..b7231422c5ed 100755
> --- a/tools/build/depend-cleanup.sh
> +++ b/tools/build/depend-cleanup.sh
> @@ -171,9 +171,7 @@ clean_dep   lib/libc        statfs        c
> # 20240308  e6ffc7669a56    Remove pointless MD syscall(2)
> # 20240308  0ee0ae237324    Remove pointless MD syscall(2)
> # 20240308  7b3836c28188    Remove pointless MD syscall(2)
> -if [ ${MACHINE} !=3D i386 -a -f =
"$OBJTOP"/lib/libsys/.depend.syscall.o ] && \
> -    grep -q -e 'libsys/[^ /]*/syscall.S' =
"$OBJTOP"/lib/libsys/.depend.syscall.*; then
> - echo "Removing stale <arch>/syscall.S depends"
> +if [ ${MACHINE} !=3D i386 ]; then
> clean_dep   lib/libsys  syscall S
> clean_dep   lib/libc    syscall S
> fi

Aside from causing the files to be removed for amd64 lib32 as
documented in the revision (but not, sadly, in the commit or file
here), this causes them to also be removed for any non-i386
architecture. This is because "syscall.S" still features in the .depend
file, just as:

    syscall.o: syscall.S

given the source exists in the .OBJDIR, rather than:

    syscall.o \
      /path/to/src/lib/libc/MACHINE/sys/syscall.S

or

    syscall.o \
      /path/to/src/lib/libsys/MACHINE/syscall.S

You can test this for yourself with:

    MACHINE=3D... MACHINE_ARCH=3D... ALL_libcompats=3D"32" \
      tools/build/depend-cleanup.sh -n /path/to/objtop

(which I added last year for precisely this purpose)

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DA51278-CCE1-4790-BAE3-73DAC2494574>