pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/platform Disable fortify on Linux when optimisation...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/76974d0c801b
branches:  trunk
changeset: 366151:76974d0c801b
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Aug 04 08:59:20 2017 +0000

description:
Disable fortify on Linux when optimisation is not enabled, it is not
supported in that configuration and warnings are issued from the system
headers.

diffstat:

 mk/platform/Linux.mk |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 1097cf9fc054 -r 76974d0c801b mk/platform/Linux.mk
--- a/mk/platform/Linux.mk      Fri Aug 04 08:53:33 2017 +0000
+++ b/mk/platform/Linux.mk      Fri Aug 04 08:59:20 2017 +0000
@@ -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_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") || \



Home | Main Index | Thread Index | Old Index