git: 8b820df156e0 - main - Fix build with read-only source dir after 83c20b8a2da0
Alex Richardson
arichardson at FreeBSD.org
Wed Feb 3 09:38:38 UTC 2021
The branch main has been updated by arichardson:
URL: https://cgit.FreeBSD.org/src/commit/?id=8b820df156e065f48857dca89a89462074659e14
commit 8b820df156e065f48857dca89a89462074659e14
Author: Alex Richardson <arichardson at FreeBSD.org>
AuthorDate: 2021-02-03 09:29:08 +0000
Commit: Alex Richardson <arichardson at FreeBSD.org>
CommitDate: 2021-02-03 09:30:53 +0000
Fix build with read-only source dir after 83c20b8a2da0
I changed the Makefile to use SRCS instead of LDADD, but since there is
still and absolute path to the source the .o file was created inside the
source directory instead of the build directory.
It would be nice if this was an error/warning by default, but for now just
fix this issue by using .PATH and the base name of the file.
Reported by: cy, peterj
---
tests/sys/kern/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index f350b740b7ea..6746812d9b4a 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -62,9 +62,11 @@ SRCS.libkern_crc32+= libkern_crc32.c
SRCS.libkern_crc32+= gsb_crc32.c
CFLAGS.libkern_crc32+= -DTESTING
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
-SRCS.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c
+.PATH: ${SRCTOP}/sys/libkern/x86
+SRCS.libkern_crc32+= crc32_sse42.c
.elif ${MACHINE_CPUARCH} == "aarch64"
-SRCS.libkern_crc32+= ${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S
+.PATH: ${SRCTOP}/sys/libkern/arm64
+SRCS.libkern_crc32+= crc32c_armv8.S
.endif
# subr_unit.c contains functions whose prototypes lie in headers that cannot be
More information about the dev-commits-src-all
mailing list