Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2017 04:22:17 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r324894 - projects/runtime-coverage/lib/libclang_rt
Message-ID:  <201710230422.v9N4MHEH039412@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Mon Oct 23 04:22:17 2017
New Revision: 324894
URL: https://svnweb.freebsd.org/changeset/base/324894

Log:
  Support compiling lib/libclang_rt/profile with gcc
  
  Several of the flags were being treated as CFLAGS, when they were actually
  technically CXXFLAGS. Move them there.
  
  Also, only apply -fno-sanitize=safe-stack with clang.
  
  This is a draft diff.
  
  PR:		223179

Modified:
  projects/runtime-coverage/lib/libclang_rt/Makefile.inc

Modified: projects/runtime-coverage/lib/libclang_rt/Makefile.inc
==============================================================================
--- projects/runtime-coverage/lib/libclang_rt/Makefile.inc	Mon Oct 23 04:20:11 2017	(r324893)
+++ projects/runtime-coverage/lib/libclang_rt/Makefile.inc	Mon Oct 23 04:22:17 2017	(r324894)
@@ -20,13 +20,13 @@ CFLAGS+=	-DNDEBUG
 CFLAGS+=	${PICFLAG}
 CFLAGS+=	-fno-builtin
 CFLAGS+=	-fno-exceptions
-CFLAGS+=	-fno-rtti
+CXXFLAGS+=	-fno-rtti
 .if ${COMPILER_VERSION} >= 30700
-CFLAGS+=	-fno-sanitize=safe-stack
+CFLAGS.clang+=	-fno-sanitize=safe-stack
 .endif
 CFLAGS+=	-fno-stack-protector
 CFLAGS+=	-funwind-tables
-CFLAGS+=	-fvisibility-inlines-hidden
-CFLAGS+=	-fvisibility=hidden
+CXXFLAGS+=	-fvisibility-inlines-hidden
+CXXFLAGS+=	-fvisibility=hidden
 CFLAGS+=	-I${CRTSRC}/lib
 CXXFLAGS+=	-std=c++11



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710230422.v9N4MHEH039412>