Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/Makefile
Show All 15 Lines | |||||
# their own libc, so allow a directory named MACHINE_ARCH to override this. | # their own libc, so allow a directory named MACHINE_ARCH to override this. | ||||
.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) | .if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) | ||||
LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} | LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} | ||||
.else | .else | ||||
LIBC_ARCH=${MACHINE_CPUARCH} | LIBC_ARCH=${MACHINE_CPUARCH} | ||||
.endif | .endif | ||||
CFLAGS+=-D_FORTIFY_SOURCE_read=_read | |||||
kib: I am not sure about all current and future uses of this define, but I dislike it being taken… | |||||
Done Inline ActionsIt also wouldn't be used much, but I wonder if it'd be better to just -D_FORTIFY_SOURCE_read=_read and default _FORTIFY_SOURCE_read to read in the header. kevans: It also wouldn't be used much, but I wonder if it'd be better to just `… | |||||
# All library objects contain FreeBSD revision strings by default; they may be | # All library objects contain FreeBSD revision strings by default; they may be | ||||
# excluded as a space-saving measure. To produce a library that does | # excluded as a space-saving measure. To produce a library that does | ||||
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS | # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS | ||||
# below. Note: there are no IDs for syscall stubs whose sources are generated. | # below. Note: there are no IDs for syscall stubs whose sources are generated. | ||||
# To include legacy CSRG SCCS ID strings, remove -DNO__SCCSID from CFLAGS. | # To include legacy CSRG SCCS ID strings, remove -DNO__SCCSID from CFLAGS. | ||||
# To include RCS ID strings from other BSD projects, remove -DNO__RCSID from CFLAGS. | # To include RCS ID strings from other BSD projects, remove -DNO__RCSID from CFLAGS. | ||||
CFLAGS+=-DNO__SCCSID -DNO__RCSID | CFLAGS+=-DNO__SCCSID -DNO__RCSID | ||||
Show All 28 Lines | .if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ | ||||
${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" | ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" | ||||
CFLAGS+= -ftls-model=initial-exec | CFLAGS+= -ftls-model=initial-exec | ||||
.endif | .endif | ||||
# | # | ||||
# Link with static libcompiler_rt.a. | # Link with static libcompiler_rt.a. | ||||
# | # | ||||
LDFLAGS+= -nodefaultlibs | LDFLAGS+= -nodefaultlibs | ||||
LIBADD+= compiler_rt | LIBADD+= compiler_rt | ||||
Not Done Inline Actionsseems like this could be its own thing, no? imp: seems like this could be its own thing, no? | |||||
Done Inline Actionsnevermind.. Don't know what I clicked on, but there were lots of noise like this... imp: nevermind.. Don't know what I clicked on, but there were lots of noise like this... | |||||
.if ${MK_SSP} != "no" && \ | .if ${MK_SSP} != "no" && \ | ||||
(${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") | (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") | ||||
Not Done Inline ActionsHere (and elsewhere) this change could be its own commit. imp: Here (and elsewhere) this change could be its own commit. | |||||
LIBADD+= ssp_nonshared | LIBADD+= ssp_nonshared | ||||
.endif | .endif | ||||
# Extras that live in either libc.a or libc_nonshared.a | # Extras that live in either libc.a or libc_nonshared.a | ||||
LIBC_NONSHARED_SRCS= | LIBC_NONSHARED_SRCS= | ||||
RTLD_ELF_DIR=${SRCTOP}/libexec/rtld-elf | RTLD_ELF_DIR=${SRCTOP}/libexec/rtld-elf | ||||
.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) | .if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) | ||||
Show All 23 Lines | |||||
.include "${LIBC_SRCTOP}/inet/Makefile.inc" | .include "${LIBC_SRCTOP}/inet/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/isc/Makefile.inc" | .include "${LIBC_SRCTOP}/isc/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/locale/Makefile.inc" | .include "${LIBC_SRCTOP}/locale/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/md/Makefile.inc" | .include "${LIBC_SRCTOP}/md/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/nameser/Makefile.inc" | .include "${LIBC_SRCTOP}/nameser/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/net/Makefile.inc" | .include "${LIBC_SRCTOP}/net/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/nls/Makefile.inc" | .include "${LIBC_SRCTOP}/nls/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/posix1e/Makefile.inc" | .include "${LIBC_SRCTOP}/posix1e/Makefile.inc" | ||||
.if ${LIBC_ARCH} != "aarch64" && \ | .if ${LIBC_ARCH} != "aarch64" && \ | ||||
${LIBC_ARCH} != "amd64" && \ | ${LIBC_ARCH} != "amd64" && \ | ||||
${LIBC_ARCH} != "powerpc64" && \ | ${LIBC_ARCH} != "powerpc64" && \ | ||||
${LIBC_ARCH} != "riscv" && \ | ${LIBC_ARCH} != "riscv" && \ | ||||
${MACHINE_ARCH:Mmipsn32*} == "" && \ | ${MACHINE_ARCH:Mmipsn32*} == "" && \ | ||||
${MACHINE_ARCH:Mmips64*} == "" | ${MACHINE_ARCH:Mmips64*} == "" | ||||
Not Done Inline ActionsThis is a good change, but could be separate. It's not related to foritfy. imp: This is a good change, but could be separate. It's not related to foritfy. | |||||
.include "${LIBC_SRCTOP}/quad/Makefile.inc" | .include "${LIBC_SRCTOP}/quad/Makefile.inc" | ||||
.endif | .endif | ||||
.include "${LIBC_SRCTOP}/regex/Makefile.inc" | .include "${LIBC_SRCTOP}/regex/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/resolv/Makefile.inc" | .include "${LIBC_SRCTOP}/resolv/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/stdio/Makefile.inc" | .include "${LIBC_SRCTOP}/stdio/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/stdlib/Makefile.inc" | .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/stdlib/jemalloc/Makefile.inc" | .include "${LIBC_SRCTOP}/stdlib/jemalloc/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/stdtime/Makefile.inc" | .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/string/Makefile.inc" | .include "${LIBC_SRCTOP}/string/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/sys/Makefile.inc" | .include "${LIBC_SRCTOP}/sys/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/secure/Makefile.inc" | .include "${LIBC_SRCTOP}/secure/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/rpc/Makefile.inc" | .include "${LIBC_SRCTOP}/rpc/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/uuid/Makefile.inc" | .include "${LIBC_SRCTOP}/uuid/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/xdr/Makefile.inc" | .include "${LIBC_SRCTOP}/xdr/Makefile.inc" | ||||
.if (${LIBC_ARCH} == "arm" && \ | .if (${LIBC_ARCH} == "arm" && \ | ||||
(${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ | (${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ | ||||
(${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") || \ | (${LIBC_ARCH} == "mips" && ${MACHINE_ARCH:Mmips*hf} == "") || \ | ||||
(${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") | (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") | ||||
Not Done Inline Actionsnice cleanup, also independent of fortify. imp: nice cleanup, also independent of fortify. | |||||
.include "${LIBC_SRCTOP}/softfloat/Makefile.inc" | .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" | ||||
.endif | .endif | ||||
.if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" | .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" | ||||
.include "${LIBC_SRCTOP}/x86/sys/Makefile.inc" | .include "${LIBC_SRCTOP}/x86/sys/Makefile.inc" | ||||
.include "${LIBC_SRCTOP}/x86/gen/Makefile.inc" | .include "${LIBC_SRCTOP}/x86/gen/Makefile.inc" | ||||
.endif | .endif | ||||
.if ${MK_NIS} != "no" | .if ${MK_NIS} != "no" | ||||
CFLAGS+= -DYP | CFLAGS+= -DYP | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |
I am not sure about all current and future uses of this define, but I dislike it being taken from the user namespace.
Usually we use something like _IN_LIBC