diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2021-02-03 09:29:08 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2021-02-03 09:30:53 +0000 |
commit | 8b820df156e065f48857dca89a89462074659e14 (patch) | |
tree | 389629d06964eb4a86efd1bb98f8eea411be8c83 /tests | |
parent | eb0b1b33d5af4e81ee77732dffc77634e57a5879 (diff) | |
download | src-8b820df156e065f48857dca89a89462074659e14.tar.gz src-8b820df156e065f48857dca89a89462074659e14.zip |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/kern/Makefile | 6 |
1 files 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 |