Replace dot-dot relative pathing with SRCTOP-relative paths where possible
This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg MFC after: 1 week Reviewed by: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9207
This commit is contained in:
parent
6b02cd2c8f
commit
d0fd0203fb
@ -36,7 +36,7 @@ SHLIB_LDSCRIPT=libc_nossp.ldscript
|
||||
.endif
|
||||
SHLIB_LDSCRIPT_LINKS=libxnet.so
|
||||
WARNS?= 2
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/include -I${LIBC_SRCTOP}/../../include
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH}
|
||||
.if ${MK_NLS} != "no"
|
||||
CFLAGS+=-DNLS
|
||||
|
@ -4,7 +4,7 @@
|
||||
# https://git.linaro.org/toolchain/cortex-strings.git
|
||||
#
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/../../contrib/cortex-strings/src/aarch64
|
||||
.PATH: ${SRCTOP}/contrib/cortex-strings/src/aarch64
|
||||
|
||||
MDSRCS+=memchr.S \
|
||||
memcmp.S \
|
||||
|
@ -21,7 +21,7 @@ SRCS+= aeabi_vfp_double.S \
|
||||
# libc. This causes issues when other parts of libc call these functions.
|
||||
# We work around this by including these functions in libc but mark them as
|
||||
# hidden so users of libc will not pick up these versions.
|
||||
.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/builtins/arm
|
||||
.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm
|
||||
|
||||
SRCS+= aeabi_memcmp.S \
|
||||
aeabi_memcpy.S \
|
||||
|
@ -1,7 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# capability sources
|
||||
.PATH: ${LIBC_SRCTOP}/../../sys/kern ${LIBC_SRCTOP}/capability
|
||||
.PATH: ${SRCTOP}/sys/kern ${LIBC_SRCTOP}/capability
|
||||
|
||||
SRCS+= subr_capability.c
|
||||
|
||||
|
@ -10,11 +10,11 @@ GDTOASRCS+=dmisc.c dtoa.c gdtoa.c gethex.c gmisc.c \
|
||||
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/gdtoa/Symbol.map
|
||||
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/gdtoa
|
||||
CFLAGS+=-I${SRCTOP}/contrib/gdtoa
|
||||
|
||||
.for src in ${GDTOASRCS}
|
||||
MISRCS+=gdtoa_${src}
|
||||
CLEANFILES+=gdtoa_${src}
|
||||
gdtoa_${src}: ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} .NOMETA
|
||||
gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
.endfor
|
||||
|
@ -152,11 +152,11 @@ SRCS+= fts-compat.c \
|
||||
unvis-compat.c
|
||||
.endif
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/../../contrib/libc-pwcache
|
||||
.PATH: ${SRCTOP}/contrib/libc-pwcache
|
||||
SRCS+= pwcache.c pwcache.h
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/../../contrib/libc-vis
|
||||
CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/libc-vis
|
||||
.PATH: ${SRCTOP}/contrib/libc-vis
|
||||
CFLAGS+= -I${SRCTOP}/contrib/libc-vis
|
||||
SRCS+= unvis.c vis.c
|
||||
|
||||
MISRCS+=modf.c
|
||||
|
@ -22,5 +22,5 @@ SRCS+= iconv_compat.c
|
||||
SYM_MAPS+= ${LIBC_SRCTOP}/iconv/Symbol.map
|
||||
|
||||
.if ${MK_ICONV} == yes
|
||||
.include "${LIBC_SRCTOP}/../libc_nonshared/Makefile.iconv"
|
||||
.include "${SRCTOP}/lib/libc_nonshared/Makefile.iconv"
|
||||
.endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/../libmd
|
||||
.PATH: ${SRCTOP}/lib/libmd
|
||||
|
||||
SRCS+= md5c.c
|
||||
|
@ -5,7 +5,7 @@
|
||||
CFLAGS+=-D_ACL_PRIVATE
|
||||
|
||||
# Copy kern/subr_acl_nfs4.c to the libc object directory.
|
||||
subr_acl_nfs4.c: ${LIBC_SRCTOP}/../../sys/kern/subr_acl_nfs4.c
|
||||
subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c
|
||||
cat ${.ALLSRC} > ${.TARGET}
|
||||
|
||||
SRCS+= acl_branding.c \
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Do not take -DPOSIX_MISTAKE out. REGCFLAGS isn't important to you (it's
|
||||
# for my use in some special contexts).
|
||||
|
||||
PATHS= ${.CURDIR:H} ${.CURDIR:H:H}/locale ${SRCTOP}/include
|
||||
PATHS= ${LIBC_SRCTOP}/regex ${LIBC_SRCTOP}/locale ${SRCTOP}/include
|
||||
.PATH: ${PATHS}
|
||||
|
||||
CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS)
|
||||
|
@ -9,4 +9,4 @@ SRCS+= herror.c h_errno.c mtctxres.c res_comp.c res_data.c res_debug.c \
|
||||
|
||||
SYM_MAPS+= ${LIBC_SRCTOP}/resolv/Symbol.map
|
||||
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/../libmd
|
||||
CFLAGS+=-I${SRCTOP}/lib/libmd
|
||||
|
@ -9,18 +9,18 @@ JEMALLOCSRCS:= jemalloc.c arena.c atomic.c base.c bitmap.c chunk.c \
|
||||
|
||||
SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map
|
||||
|
||||
CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/jemalloc/include
|
||||
CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include
|
||||
|
||||
.for src in ${JEMALLOCSRCS}
|
||||
MISRCS+=jemalloc_${src}
|
||||
CLEANFILES+=jemalloc_${src}
|
||||
jemalloc_${src}: ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} .NOMETA
|
||||
jemalloc_${src}: ${SRCTOP}/contrib/jemalloc/src/${src} .NOMETA
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
.endfor
|
||||
|
||||
MAN+=jemalloc.3
|
||||
CLEANFILES+=jemalloc.3
|
||||
jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 .NOMETA
|
||||
jemalloc.3: ${SRCTOP}/contrib/jemalloc/doc/jemalloc.3 .NOMETA
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
|
||||
MLINKS+= \
|
||||
|
@ -1,14 +1,14 @@
|
||||
# Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/stdtime ${LIBC_SRCTOP}/../../contrib/tzcode/stdtime
|
||||
.PATH: ${LIBC_SRCTOP}/stdtime ${SRCTOP}/contrib/tzcode/stdtime
|
||||
|
||||
SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c \
|
||||
time32.c
|
||||
|
||||
SYM_MAPS+= ${LIBC_SRCTOP}/stdtime/Symbol.map
|
||||
|
||||
CFLAGS+= -I${LIBC_SRCTOP}/../../contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime
|
||||
CFLAGS+= -I${SRCTOP}/contrib/tzcode/stdtime -I${LIBC_SRCTOP}/stdtime
|
||||
|
||||
CFLAGS.localtime.c= -fwrapv
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string
|
||||
.PATH: ${LIBC_SRCTOP}/../../sys/libkern
|
||||
.PATH: ${SRCTOP}/sys/libkern
|
||||
|
||||
CFLAGS+= -I${LIBC_SRCTOP}/locale
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
# Include the generated makefile containing the *complete* list
|
||||
# of syscall names in MIASM.
|
||||
.include "${LIBC_SRCTOP}/../../sys/sys/syscall.mk"
|
||||
.include "${SRCTOP}/sys/sys/syscall.mk"
|
||||
|
||||
# Include machine dependent definitions.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user