libssp_nonshared: use only on i386 and ppc

libssp_nonshared.a defines one symbol, __stack_chk_fail_local.  This
is used only on i386 and powerpc; other archs emit calls directly to
__stack_chk_fail.  Simplify linking on other archs by omitting it.

PR:		242941 [exp-run]
This commit is contained in:
Ed Maste 2020-02-05 20:08:01 +00:00
parent 37bd6bb849
commit 0f61170882
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357592
2 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,8 @@ CFLAGS+=-DNO__SCCSID -DNO__RCSID
LIB=c
SHLIB_MAJOR= 7
.if ${MK_SSP} != "no"
.if ${MK_SSP} != "no" && \
(${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "")
SHLIB_LDSCRIPT=libc.ldscript
.else
SHLIB_LDSCRIPT=libc_nossp.ldscript
@ -59,7 +60,8 @@ CFLAGS+=${CANCELPOINTS_CFLAGS}
LDFLAGS+= -nodefaultlibs
LIBADD+= compiler_rt
.if ${MK_SSP} != "no"
.if ${MK_SSP} != "no" && \
(${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "")
LIBADD+= ssp_nonshared
.endif

View File

@ -344,7 +344,8 @@ _DP_xo= util
# The libc dependencies are not strictly needed but are defined to make the
# assert happy.
_DP_c= compiler_rt
.if ${MK_SSP} != "no"
.if ${MK_SSP} != "no" && \
(${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "")
_DP_c+= ssp_nonshared
.endif
_DP_stats= sbuf pthread