Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/Makefile
Show All 13 Lines | |||||
# Note: This is copied to msun/Makefile | # Note: This is copied to msun/Makefile | ||||
M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} | M=${MACHINE_ARCH:S/powerpc64le/powerpc64/} | ||||
.if exists(${LIBC_SRCTOP}/${M}) | .if exists(${LIBC_SRCTOP}/${M}) | ||||
LIBC_ARCH=${M} | LIBC_ARCH=${M} | ||||
.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 32 Lines | |||||
# | # | ||||
LDFLAGS+= -nodefaultlibs | LDFLAGS+= -nodefaultlibs | ||||
LIBADD+= compiler_rt | LIBADD+= compiler_rt | ||||
LIBADD+= sys | LIBADD+= sys | ||||
.if defined(COMPAT_libcompat) | .if defined(COMPAT_libcompat) | ||||
# XXX: work around gcc -m32 + bfd ld path issue for DT_NEEDED symbols. | # XXX: work around gcc -m32 + bfd ld path issue for DT_NEEDED symbols. | ||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=31395 | # https://sourceware.org/bugzilla/show_bug.cgi?id=31395 | ||||
LDFLAGS+= -Wl,--rpath=/usr/lib${COMPAT_libcompat} | LDFLAGS+= -Wl,--rpath=/usr/lib${COMPAT_libcompat} | ||||
.endif | .endif | ||||
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... | |||||
LDFLAGS+=-Wl,--auxiliary,libsys.so.7 | LDFLAGS+=-Wl,--auxiliary,libsys.so.7 | ||||
.if ${MK_SSP} != "no" && \ | .if ${MK_SSP} != "no" && \ | ||||
(${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") | (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") | ||||
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 24 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 ${MACHINE_ABI:Mlong32} | .if ${MACHINE_ABI:Mlong32} | ||||
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}/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" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) | .if (${LIBC_ARCH} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) | ||||
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/gen/Makefile.inc" | .include "${LIBC_SRCTOP}/x86/gen/Makefile.inc" | ||||
.endif | .endif | ||||
.if ${MK_NIS} != "no" | .if ${MK_NIS} != "no" | ||||
CFLAGS+= -DYP | CFLAGS+= -DYP | ||||
.include "${LIBC_SRCTOP}/yp/Makefile.inc" | .include "${LIBC_SRCTOP}/yp/Makefile.inc" | ||||
▲ Show 20 Lines • Show All 86 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