Page MenuHomeFreeBSD

Add a top-level target to rebuild all sysent files.
ClosedPublic

Authored by brooks on Nov 7 2018, 11:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 7:03 PM
Unknown Object (File)
Sat, Jun 22, 4:38 PM
Unknown Object (File)
Sat, Jun 22, 4:28 PM
Unknown Object (File)
Sat, Jun 22, 10:07 AM
Unknown Object (File)
Thu, Jun 20, 3:24 PM
Unknown Object (File)
Wed, Jun 12, 9:59 PM
Unknown Object (File)
Mar 14 2024, 2:29 PM
Unknown Object (File)
Mar 14 2024, 2:29 PM
Subscribers

Details

Summary

This is useful when changing makesyscalls.sh, when making paired changes
to syscalls.master files, or in a future where freebsd32 sysent entries
are built from the default syscalls.master.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Makefile.inc1
303 ↗(On Diff #50142)

Why is this line needed but not on MK_SYSTEM_COMPILER logic? Is linker used in make sysent?

brooks added inline comments.
Makefile.inc1
303 ↗(On Diff #50142)

Without it I get:

make[1]: "/home/bed22/git/cheribsd/Makefile.inc1" line 336: Malformed conditional (${MK_SYSTEM_LINKER} == "yes" &&  defined(WANT_LINKER_FREEBSD_VERSION) &&  (${MK_LLD_BOOTSTRAP} == "yes") &&  !make(xdev*) &&  ${X_LINKER_TYPE} == ${WANT_LINKER_TYPE} &&  ${X_LINKER_VERSION} == ${WANT_LINKER_VERSION} &&  ${X_LINKER_FREEBSD_VERSION} == ${WANT_LINKER_FREEBSD_VERSION})
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /home/bed22/git/cheribsd
Makefile.inc1
303 ↗(On Diff #50142)

That makes no sense to me. Something else is wrong. I'll apply your patch and check it.
rS339946 is a similar red flag to me.
We shouldn't need to add random targets to this list. xdev is here so the *build* of it does't get infected with system linker behavior. There are some other !make() sprinkled around for the sake of performance but I don't see why make sysent should be needed.

Makefile.inc1
303 ↗(On Diff #50142)

On the latest head, rS340241 I don't get the warning you're seeing.

  • Which revision are you on?
  • Do you have any X* or external toolchain vars set?
brooks added inline comments.
Makefile.inc1
303 ↗(On Diff #50142)

Hmm, I didn't check that it was still needed in head. I see it isn't. I'll remove.

  • Remove !make(sysent) conditional not required on FreeBSD.

I don't think this _must_ be in Makefile.inc1 but it's simpler to put it there to ensure the right bmake and share/mk is used, so fine to be there.

Makefile.inc1
1446 ↗(On Diff #50147)

Need ${_+_} for submake calls at the start of the line.
It's subtle but makes a difference in terms of make -n and make -N doing what's expected.

~/git/freebsd # git diff sys/kern
diff --git sys/kern/Makefile sys/kern/Makefile
index 21646b451f3b..6d7071f73cbe 100644
--- sys/kern/Makefile
+++ sys/kern/Makefile
@@ -11,6 +11,7 @@ all:

 sysent: init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall.mk \
 ../sys/sysproto.h
+       @echo HERE

 init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \
 ../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \

Without ${_+_}:

~/git/freebsd # make sysent -n
make -C /root/git/freebsd/sys/kern sysent
make -C /root/git/freebsd/sys/compat/freebsd32 sysent
make -C /root/git/freebsd/sys/i386/ibcs2 sysent
make -C /root/git/freebsd/sys/amd64/linux sysent
make -C /root/git/freebsd/sys/amd64/linux32 sysent
make -C /root/git/freebsd/sys/arm64/linux sysent
make -C /root/git/freebsd/sys/i386/linux sysent

With ${_+_}:

~/git/freebsd # make sysent -n
make -C /root/git/freebsd/sys/kern sysent
echo HERE
make -C /root/git/freebsd/sys/compat/freebsd32 sysent
make -C /root/git/freebsd/sys/i386/ibcs2 sysent
make -C /root/git/freebsd/sys/amd64/linux sysent
make -C /root/git/freebsd/sys/amd64/linux32 sysent
make -C /root/git/freebsd/sys/arm64/linux sysent
make -C /root/git/freebsd/sys/i386/linux sysent

bmake has -N for doing showing only the sub-make calls and not the sub-make -n calls:

~/git/freebsd # make sysent -N
cd /root/git/freebsd; PATH=/sbin:/bin:/usr/sbin:/usr/bin MAKE_CMD="make" make -m /root/git/freebsd/share/mk -f Makefile.inc1  TARGET=amd64 TARGET_ARCH=amd64 MK_AUTO_OBJ=no MK_META_MODE=no sysent
~/git/freebsd # TARGET=amd64 TARGET_ARCH=amd64 make -f Makefile.inc1 sysent -N
make -C /root/git/freebsd/sys/kern sysent
make -C /root/git/freebsd/sys/compat/freebsd32 sysent
make -C /root/git/freebsd/sys/i386/ibcs2 sysent
make -C /root/git/freebsd/sys/amd64/linux sysent
make -C /root/git/freebsd/sys/amd64/linux32 sysent
make -C /root/git/freebsd/sys/arm64/linux sysent
make -C /root/git/freebsd/sys/i386/linux sysent
This revision now requires changes to proceed.Nov 8 2018, 12:18 AM

I don't think this _must_ be in Makefile.inc1 but it's simpler to put it there to ensure the right bmake and share/mk is used, so fine to be there.

To be clear I'm saying it can stay in Makefile.inc1. I just want to see the ${_+_} fix.

  • Add ${_+_} for submake calls to do the right thing with -n and -N.
This revision is now accepted and ready to land.Nov 8 2018, 12:29 AM
This revision was automatically updated to reflect the committed changes.