Author: emaste
Date: Wed Feb  5 20:08:01 2020
New Revision: 357592
URL: https://svnweb.freebsd.org/changeset/base/357592

Log:
  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]

Modified:
  head/lib/libc/Makefile
  head/share/mk/src.libnames.mk

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile      Wed Feb  5 20:06:35 2020        (r357591)
+++ head/lib/libc/Makefile      Wed Feb  5 20:08:01 2020        (r357592)
@@ -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
 

Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk       Wed Feb  5 20:06:35 2020        
(r357591)
+++ head/share/mk/src.libnames.mk       Wed Feb  5 20:08:01 2020        
(r357592)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to