Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Invent a new flag "USE_SSP_DEFAULT" which defines w...
details: https://anonhg.NetBSD.org/src/rev/e30f88fafe53
branches: trunk
changeset: 748974:e30f88fafe53
user: tron <tron%NetBSD.org@localhost>
date: Thu Nov 12 13:22:34 2009 +0000
description:
Invent a new flag "USE_SSP_DEFAULT" which defines whether we want to use
SSP for building the whole source tree. Set this to "yes" for
NetBSD/amd64 and NetBSD/i386. It is now possible to get the old
behavior (build libs and certain programs with SSP) by setting
"USE_SSP_DEFAULT" to "no".
diffstat:
share/mk/bsd.README | 15 ++++++++++-----
share/mk/bsd.sys.mk | 10 +++++++---
2 files changed, 17 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r d46785bbb4cc -r e30f88fafe53 share/mk/bsd.README
--- a/share/mk/bsd.README Thu Nov 12 13:17:46 2009 +0000
+++ b/share/mk/bsd.README Thu Nov 12 13:22:34 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.256 2009/10/23 22:14:37 joerg Exp $
+# $NetBSD: bsd.README,v 1.257 2009/11/12 13:22:34 tron Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -385,9 +385,14 @@
Default: no
USE_SSP If "no", disables GCC stack protection code, which
- detects stack overflows and aborts the program. This
- imposes some performance penalty.
- Default: no
+ detects stack overflows and aborts the program. The
+ stack protecion code imposes a performance penalty
+ of about 5%
+ Default: no, unless "USE_FORT" is set to "yes"
+
+USE_SSP_DEFAULT The default of "USE_SSP" for part of the tree (e.g. kernels)
+ that are not compiled with "USE_FORT" set to "yes".
+ Default: "yes" for amd64 and i386, "no" otherwise
USE_FORT If "yes" turns on substitute wrappers for commonly used
functions that do not do bounds checking regularly, but
@@ -395,7 +400,7 @@
__builtin_object_size() function to determine the buffer
size where it is known and detect buffer overflows.
These substitute functions are in /usr/include/ssp.
- Default: no
+ Default: depends on the part of the source tree
USE_YP If "no", disables building YP (NIS) support into
various system utilities/libraries that support it.
diff -r d46785bbb4cc -r e30f88fafe53 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Thu Nov 12 13:17:46 2009 +0000
+++ b/share/mk/bsd.sys.mk Thu Nov 12 13:22:34 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.183 2009/11/12 08:51:50 tron Exp $
+# $NetBSD: bsd.sys.mk,v 1.184 2009/11/12 13:22:34 tron Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -61,7 +61,9 @@
.if ((${MACHINE_ARCH} == "amd64") || (${MACHINE_ARCH} == "i386")) && \
defined(_SRC_TOP_) && (${_SRC_TOP_} != "")
-USE_SSP?= yes
+USE_SSP_DEFAULT?= yes
+.else
+USE_SSP_DEFAULT?= no
.endif
.if defined(USE_FORT) && (${USE_FORT} != "no")
@@ -71,7 +73,9 @@
.endif
.endif
-.if defined(USE_SSP) && (${USE_SSP} != "no") && (${BINDIR:Ux} != "/usr/mdec")
+USE_SSP?= ${USE_SSP_DEFAULT}
+
+.if (${USE_SSP} != "no") && (${BINDIR:Ux} != "/usr/mdec")
.if ${HAS_SSP} == "yes"
COPTS+= -fstack-protector -Wstack-protector --param ssp-buffer-size=1
.endif
Home |
Main Index |
Thread Index |
Old Index