Source-Changes-HG archive

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

[src/trunk]: src/lib/libc Restrict -fno-sanitize=function to Clang/LLVM only



details:   https://anonhg.NetBSD.org/src/rev/b925ee2fff24
branches:  trunk
changeset: 991873:b925ee2fff24
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Aug 03 14:01:21 2018 +0000

description:
Restrict -fno-sanitize=function to Clang/LLVM only

The base GCC version 6,x does not support this option.

diffstat:

 lib/libc/Makefile |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 8fa4b8a1dc20 -r b925ee2fff24 lib/libc/Makefile
--- a/lib/libc/Makefile Fri Aug 03 13:48:24 2018 +0000
+++ b/lib/libc/Makefile Fri Aug 03 14:01:21 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.171 2018/08/03 02:29:35 kamil Exp $
+#      $NetBSD: Makefile,v 1.172 2018/08/03 14:01:21 kamil Exp $
 #      @(#)Makefile    8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -17,7 +17,9 @@
 # The Hesiod functions are always in libc. To choose that getpwent() and friends
 # actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
 
-LIBCSANITIZERFLAGS+=   -fno-sanitize=function  # generated code depends on RTTI
+
+# generated code depends on RTTI
+LIBCSANITIZERFLAGS+=   ${${ACTIVE_CC} == "clang":? -fno-sanitize=function :}
 
 .include "Makefile.inc"
 



Home | Main Index | Thread Index | Old Index