diff options
author | jperkin <jperkin@pkgsrc.org> | 2017-08-04 08:59:20 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2017-08-04 08:59:20 +0000 |
commit | b01c6115083fe09ee82c9e1e19612727ade59556 (patch) | |
tree | 829f0814b867e59e5cd833e241e082a94c9a63fb | |
parent | f82764e2dc2c9391e0f72fef4075d69f8a8f43b5 (diff) | |
download | pkgsrc-b01c6115083fe09ee82c9e1e19612727ade59556.tar.gz |
Disable fortify on Linux when optimisation is not enabled, it is not
supported in that configuration and warnings are issued from the system
headers.
-rw-r--r-- | mk/platform/Linux.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index fda5b298fb8..594c750b438 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.75 2017/06/09 17:21:53 khorben Exp $ +# $NetBSD: Linux.mk,v 1.76 2017/08/04 08:59:20 jperkin Exp $ # # Variable definitions for the Linux operating system. @@ -119,8 +119,11 @@ _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk _OPSYS_MAX_CMDLEN_CMD?= /usr/bin/getconf ARG_MAX .endif -# Register support for FORTIFY (with GCC) +# Register support for FORTIFY (with GCC). Linux only supports FORTIFY +# when optimisation is enabled, otherwise warnings are issued. +.if !empty(CFLAGS:M-O*) _OPSYS_SUPPORTS_FORTIFY=yes +.endif # Register support for RELRO on supported architectures (with GCC) .if (${MACHINE_ARCH} == "i386") || \ |