For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just abort built into it. For libssp_nonshared.a, steal stack_protector_compat.c from ^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local is a hidden symbol. libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the build environment, and the gcclibs version has been disconnected from the build in favor of this one. PR: 242950 (exp-run) Reviewed by: kib, emaste, pfg, Oliver Pinter (earlier version) Also discussed with: kan MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22943
21 lines
468 B
Makefile
21 lines
468 B
Makefile
# $FreeBSD$
|
|
|
|
PACKAGE= clibs
|
|
SHLIBDIR?= /lib
|
|
SHLIB= ssp
|
|
SHLIB_MAJOR= 0
|
|
|
|
VERSION_DEF= ${.CURDIR}/Versions.def
|
|
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
|
|
|
.PATH: ${SRCTOP}/lib/libc/secure
|
|
CFLAGS+= -I${SRCTOP}/lib/libc/include
|
|
# _elf_aux_info is exported from libc as elf_aux_info(3), so just that for the
|
|
# libssp build instead.
|
|
CFLAGS+= -D_elf_aux_info=elf_aux_info
|
|
SRCS= stack_protector.c fortify_stubs.c
|
|
|
|
CFLAGS.fortify_stubs.c= -Wno-unused-parameter
|
|
|
|
.include <bsd.lib.mk>
|