From owner-svn-src-all@freebsd.org Sun Nov 5 19:25:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 227A2E4EEFD; Sun, 5 Nov 2017 19:25:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD455668CB; Sun, 5 Nov 2017 19:25:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA5JP604028900; Sun, 5 Nov 2017 19:25:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA5JP6Y3028898; Sun, 5 Nov 2017 19:25:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201711051925.vA5JP6Y3028898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 5 Nov 2017 19:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325442 - in head/lib/libclang_rt: . profile X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/lib/libclang_rt: . profile X-SVN-Commit-Revision: 325442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 19:25:08 -0000 Author: ngie Date: Sun Nov 5 19:25:06 2017 New Revision: 325442 URL: https://svnweb.freebsd.org/changeset/base/325442 Log: Support compiling lib/libclang_rt/profile a bit more with recent versions of gcc Several of the flags were being treated as CFLAGS, when they were actually technically CXXFLAGS. Move them there. Only apply -fno-sanitize=safe-stack with clang. PR: 223179 Modified: head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/profile/Makefile Modified: head/lib/libclang_rt/Makefile.inc ============================================================================== --- head/lib/libclang_rt/Makefile.inc Sun Nov 5 18:45:43 2017 (r325441) +++ head/lib/libclang_rt/Makefile.inc Sun Nov 5 19:25:06 2017 (r325442) @@ -20,13 +20,13 @@ CFLAGS+= -DNDEBUG CFLAGS+= ${PICFLAG} CFLAGS+= -fno-builtin CFLAGS+= -fno-exceptions -CFLAGS+= -fno-rtti -.if ${COMPILER_VERSION} >= 30700 +CXXFLAGS+= -fno-rtti +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700 CFLAGS+= -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 Modified: head/lib/libclang_rt/profile/Makefile ============================================================================== --- head/lib/libclang_rt/profile/Makefile Sun Nov 5 18:45:43 2017 (r325441) +++ head/lib/libclang_rt/profile/Makefile Sun Nov 5 19:25:06 2017 (r325442) @@ -5,7 +5,7 @@ LIB= clang_rt.profile-${CRTARCH} # This is needed for --coverage -CFLAGS+= -fvisibility=default +CXXFLAGS+= -fvisibility=default SRCS+= profile/GCDAProfiling.c SRCS+= profile/InstrProfiling.c