Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/Makefile
| Show All 26 Lines | |||||
| # 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 | ||||
| LIB=c | LIB=c | ||||
| SHLIB_MAJOR= 7 | SHLIB_MAJOR= 7 | ||||
| .if ${MK_SSP} != "no" && \ | .if ${MK_SSP} != "no" && \ | ||||
| (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") | (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") | ||||
emaste: Is this just for consistency?
I should add a comment explaining this conditional - I wondered… | |||||
Done Inline ActionsYes, since it's only for consistency and doesn't actually change anything. pkubaj: Yes, since it's only for consistency and doesn't actually change anything. | |||||
| SHLIB_LDSCRIPT=libc.ldscript | SHLIB_LDSCRIPT=libc.ldscript | ||||
| .else | .else | ||||
| SHLIB_LDSCRIPT=libc_nossp.ldscript | SHLIB_LDSCRIPT=libc_nossp.ldscript | ||||
| .endif | .endif | ||||
| SHLIB_LDSCRIPT_LINKS=libxnet.so | SHLIB_LDSCRIPT_LINKS=libxnet.so | ||||
| WARNS?= 2 | WARNS?= 2 | ||||
| CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include | CFLAGS+=-I${LIBC_SRCTOP}/include -I${SRCTOP}/include | ||||
| CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} | CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} | ||||
| .if ${MK_NLS} != "no" | .if ${MK_NLS} != "no" | ||||
| CFLAGS+=-DNLS | CFLAGS+=-DNLS | ||||
| .endif | .endif | ||||
| CLEANFILES+=tags | CLEANFILES+=tags | ||||
| INSTALL_PIC_ARCHIVE= | INSTALL_PIC_ARCHIVE= | ||||
| BUILD_NOSSP_PIC_ARCHIVE= | BUILD_NOSSP_PIC_ARCHIVE= | ||||
| PRECIOUSLIB= | PRECIOUSLIB= | ||||
| .ifndef NO_THREAD_STACK_UNWIND | .ifndef NO_THREAD_STACK_UNWIND | ||||
| CANCELPOINTS_CFLAGS=-fexceptions | CANCELPOINTS_CFLAGS=-fexceptions | ||||
| CFLAGS+=${CANCELPOINTS_CFLAGS} | CFLAGS+=${CANCELPOINTS_CFLAGS} | ||||
| .endif | .endif | ||||
| # Use a more efficient TLS model for libc since we can reasonably assume that | # Use a more efficient TLS model for libc since we can reasonably assume that | ||||
| # it will be loaded during program startup. | # it will be loaded during program startup. | ||||
| .if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ | .if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ | ||||
| ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" | ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ | ||||
| ${LIBC_ARCH:Mpowerpc*} != "" | |||||
| 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 | ||||
| .if ${MK_SSP} != "no" && \ | .if ${MK_SSP} != "no" && \ | ||||
| (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") | (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") | ||||
| 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 20 Lines • Show All 148 Lines • Show Last 20 Lines | |||||
Is this just for consistency?
I should add a comment explaining this conditional - I wondered where this came from, and was surprised to find I added it in 0f61170882cb39a3fa4b76bcfc9c8acd2404a2da :)
I will do that after your commit though.