Per gcc(1), the following clangs (minus -fno-sanitize=...) are c++ flags, and are being applied to CFLAGS instead of CXXFLAGS. ===> lib/libclang_rt/profile (obj,all,install) cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C cc1: error: unrecognized command line option "-fno-sanitize=safe-stack" cc1: warning: command line option "-fvisibility-inlines-hidden" is valid for C++/ObjC++ but not for C
A commit references this bug: Author: ngie Date: Mon Oct 23 04:22:17 UTC 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 Changes: projects/runtime-coverage/lib/libclang_rt/Makefile.inc
A commit references this bug: Author: ngie Date: Mon Oct 23 05:11:01 UTC 2017 New revision: 324899 URL: https://svnweb.freebsd.org/changeset/base/324899 Log: -fvisibility is a c++ thing, per gcc(1) Followup to r324894 PR: 223179 Changes: projects/runtime-coverage/lib/libclang_rt/profile/Makefile
A commit references this bug: Author: ngie Date: Sun Nov 5 19:25:06 UTC 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 Changes: head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/profile/Makefile
Closing bug since it's fixed in ^/head.