Download raw body.
Fix 'make links' error on arm64
Hi all,
Running 'make links' in sys/kern works, but produces a confusing error
message on arm64:
/bin/sh: cd: /usr/src/sys/lib/libkern/arch/aarch64 - No such file or directory
The ${DGEN} variable includes lib/libkern/arch/${MACHINE_ARCH}, but this
directory doesn't exist for all architectures. The patch below checks if
each directory exists before attempting to cd into it and avoids the
error message.
Thanks,
Thorsten
Index: kern/Makefile
===================================================================
RCS file: /cvs/src/sys/kern/Makefile,v
retrieving revision 1.53
diff -u -p -r1.53 Makefile
--- kern/Makefile 3 Nov 2024 07:58:42 -0000 1.53
+++ kern/Makefile 24 Oct 2025 08:40:27 -0000
@@ -53,6 +53,6 @@ links::
rm -f ${SYSTAGS}
ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS}
-for i in ${DGEN}; do \
- (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done
+ ([ -d ../$$i ] && cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done
-for i in ${ARCH}; do \
(cd ../arch/$$i && make ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
Fix 'make links' error on arm64