From owner-svn-src-projects@freebsd.org Sun Jun 18 12:59:44 2017 Return-Path: Delivered-To: svn-src-projects@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 3FC89D90F7A for ; Sun, 18 Jun 2017 12:59:44 +0000 (UTC) (envelope-from dim@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 107596F267; Sun, 18 Jun 2017 12:59:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ICxhga046160; Sun, 18 Jun 2017 12:59:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ICxhla046159; Sun, 18 Jun 2017 12:59:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201706181259.v5ICxhla046159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jun 2017 12:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320071 - projects/clang500-import/contrib/llvm/tools/lld/ELF X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 12:59:44 -0000 Author: dim Date: Sun Jun 18 12:59:43 2017 New Revision: 320071 URL: https://svnweb.freebsd.org/changeset/base/320071 Log: Revert changes in r312891 and go back to stock lld code for rounding the PT_GNU_RELRO p_memsz. This should now work properly for FreeBSD. Modified: projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp Modified: projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp ============================================================================== --- projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp Sun Jun 18 12:28:43 2017 (r320070) +++ projects/clang500-import/contrib/llvm/tools/lld/ELF/Writer.cpp Sun Jun 18 12:59:43 2017 (r320071) @@ -1644,8 +1644,13 @@ template void Writer::setPhdrs() { } if (P.p_type == PT_LOAD) P.p_align = Config->MaxPageSize; - else if (P.p_type == PT_GNU_RELRO) + else if (P.p_type == PT_GNU_RELRO) { P.p_align = 1; + // The glibc dynamic loader rounds the size down, so we need to round up + // to protect the last page. This is a no-op on FreeBSD which always + // rounds up. + P.p_memsz = alignTo(P.p_memsz, Target->PageSize); + } // The TLS pointer goes after PT_TLS. At least glibc will align it, // so round up the size to make sure the offsets are correct. From owner-svn-src-projects@freebsd.org Wed Jun 21 03:40:36 2017 Return-Path: Delivered-To: svn-src-projects@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 352A7DA8567 for ; Wed, 21 Jun 2017 03:40:36 +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 04C0B7E67C; Wed, 21 Jun 2017 03:40:35 +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 v5L3eYxJ002309; Wed, 21 Jun 2017 03:40:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L3eYLF002308; Wed, 21 Jun 2017 03:40:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706210340.v5L3eYLF002308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 21 Jun 2017 03:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320180 - projects/runtime-coverage X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 03:40:36 -0000 Author: ngie Date: Wed Jun 21 03:40:34 2017 New Revision: 320180 URL: https://svnweb.freebsd.org/changeset/base/320180 Log: Start project branch for integrating runtime coverage instrumentation in to the build Runtime coverage instrumentation is typically used/useful with gcov/lcov, and helps developers gather information about how many times lines/branches are hit, etc in order to help them improve tests for libraries/programs. gcov statistics are separate from gprof statistics. Added: - copied from r320179, head/ Directory Properties: projects/runtime-coverage/ (props changed) From owner-svn-src-projects@freebsd.org Wed Jun 21 04:36:47 2017 Return-Path: Delivered-To: svn-src-projects@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 84742DA8FAB for ; Wed, 21 Jun 2017 04:36:47 +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 52D757FBEB; Wed, 21 Jun 2017 04:36:47 +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 v5L4akW5026583; Wed, 21 Jun 2017 04:36:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5L4akZV026581; Wed, 21 Jun 2017 04:36:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706210436.v5L4akZV026581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 21 Jun 2017 04:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320182 - in projects/runtime-coverage: share/mk tools/build/options X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 04:36:47 -0000 Author: ngie Date: Wed Jun 21 04:36:46 2017 New Revision: 320182 URL: https://svnweb.freebsd.org/changeset/base/320182 Log: Add MK_COVERAGE support to bsd.opts.mk, etc Added: projects/runtime-coverage/tools/build/options/WITH_COVERAGE (contents, props changed) Modified: projects/runtime-coverage/share/mk/bsd.opts.mk Modified: projects/runtime-coverage/share/mk/bsd.opts.mk ============================================================================== --- projects/runtime-coverage/share/mk/bsd.opts.mk Wed Jun 21 03:55:45 2017 (r320181) +++ projects/runtime-coverage/share/mk/bsd.opts.mk Wed Jun 21 04:36:46 2017 (r320182) @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ CCACHE_BUILD \ + COVERAGE \ CTF \ INSTALL_AS_USER \ STALE_STAGED Added: projects/runtime-coverage/tools/build/options/WITH_COVERAGE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/runtime-coverage/tools/build/options/WITH_COVERAGE Wed Jun 21 04:36:46 2017 (r320182) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build profiled libraries for use with +.Xr gcov 1 , +.Xr lcov 1 , +etc. From owner-svn-src-projects@freebsd.org Thu Jun 22 04:14:27 2017 Return-Path: Delivered-To: svn-src-projects@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 450BFDA4807 for ; Thu, 22 Jun 2017 04:14:27 +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 1354F67A40; Thu, 22 Jun 2017 04:14:27 +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 v5M4EQ0U010720; Thu, 22 Jun 2017 04:14:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M4EQsd010719; Thu, 22 Jun 2017 04:14:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220414.v5M4EQsd010719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 04:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320213 - projects/runtime-coverage/share/mk X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 04:14:27 -0000 Author: ngie Date: Thu Jun 22 04:14:25 2017 New Revision: 320213 URL: https://svnweb.freebsd.org/changeset/base/320213 Log: Add COV_CFLAGS and COV_CXXFLAGS for parity with PO_CFLAGS and PO_CXXFLAGS These variables will help drive cc/c++ when generating coverage instrumented binaries. Modified: projects/runtime-coverage/share/mk/sys.mk Modified: projects/runtime-coverage/share/mk/sys.mk ============================================================================== --- projects/runtime-coverage/share/mk/sys.mk Thu Jun 22 02:46:36 2017 (r320212) +++ projects/runtime-coverage/share/mk/sys.mk Thu Jun 22 04:14:25 2017 (r320213) @@ -163,6 +163,7 @@ CFLAGS += -fno-strict-aliasing .endif .endif IR_CFLAGS ?= ${STATIC_CFLAGS:N-O*} ${CFLAGS:N-O*} +COV_CFLAGS ?= ${CFLAGS} PO_CFLAGS ?= ${CFLAGS} # cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle @@ -184,6 +185,7 @@ CTFFLAGS += -g CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} IR_CXXFLAGS ?= ${STATIC_CXXFLAGS:N-O*} ${CXXFLAGS:N-O*} +COV_CXXFLAGS ?= ${CXXFLAGS} PO_CXXFLAGS ?= ${CXXFLAGS} DTRACE ?= dtrace From owner-svn-src-projects@freebsd.org Thu Jun 22 04:34:10 2017 Return-Path: Delivered-To: svn-src-projects@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 7B12EDA512A for ; Thu, 22 Jun 2017 04:34:10 +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 4BEE86840F; Thu, 22 Jun 2017 04:34:10 +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 v5M4Y9RU018670; Thu, 22 Jun 2017 04:34:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M4Y9Om018667; Thu, 22 Jun 2017 04:34:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220434.v5M4Y9Om018667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 04:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320214 - in projects/runtime-coverage/gnu/lib: libstdc++ libsupc++ X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 04:34:10 -0000 Author: ngie Date: Thu Jun 22 04:34:09 2017 New Revision: 320214 URL: https://svnweb.freebsd.org/changeset/base/320214 Log: Add COV_CXXFLAGS for gnu/lib/lib{std,sup}c++ Mark libstdc++ with MK_COVERAGE?= no to disable runtime coverage instrumentation with libstdc++. For reasons I don't yet understand, COV_CXXFLAGS isn't being passed down properly to my bsd.lib.mk static rules -- coming in the next commit. Modified: projects/runtime-coverage/gnu/lib/libstdc++/Makefile projects/runtime-coverage/gnu/lib/libsupc++/Makefile Modified: projects/runtime-coverage/gnu/lib/libstdc++/Makefile ============================================================================== --- projects/runtime-coverage/gnu/lib/libstdc++/Makefile Thu Jun 22 04:14:25 2017 (r320213) +++ projects/runtime-coverage/gnu/lib/libstdc++/Makefile Thu Jun 22 04:34:09 2017 (r320214) @@ -1,5 +1,9 @@ # $FreeBSD$ +# XXX (ngie): doesn't build with coverage today; COV_CXXFLAGS is getting passed +# down improperly, resulting in a -Werror issue with strsignal in debug.c. +MK_COVERAGE?= no + .include GCCVER= 4.2 @@ -21,6 +25,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated +COV_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} LIBADD+= m Modified: projects/runtime-coverage/gnu/lib/libsupc++/Makefile ============================================================================== --- projects/runtime-coverage/gnu/lib/libsupc++/Makefile Thu Jun 22 04:14:25 2017 (r320213) +++ projects/runtime-coverage/gnu/lib/libsupc++/Makefile Thu Jun 22 04:34:09 2017 (r320214) @@ -26,6 +26,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections +COV_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h From owner-svn-src-projects@freebsd.org Thu Jun 22 04:40:12 2017 Return-Path: Delivered-To: svn-src-projects@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 B54EFDA538B for ; Thu, 22 Jun 2017 04:40:12 +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 80FE6685C6; Thu, 22 Jun 2017 04:40:12 +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 v5M4eBG4018947; Thu, 22 Jun 2017 04:40:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M4eBva018946; Thu, 22 Jun 2017 04:40:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220440.v5M4eBva018946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 04:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r320215 - projects/runtime-coverage X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 04:40:12 -0000 Author: ngie Date: Thu Jun 22 04:40:11 2017 New Revision: 320215 URL: https://svnweb.freebsd.org/changeset/base/320215 Log: Don't build coverage instrumented binaries in the bootstrap-tools or libraries targets This is being done to establish parity with MK_PROFILE=no in buildworld, buildkernel, etc. Modified: projects/runtime-coverage/Makefile.inc1 Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Thu Jun 22 04:34:09 2017 (r320214) +++ projects/runtime-coverage/Makefile.inc1 Thu Jun 22 04:40:11 2017 (r320215) @@ -520,7 +520,7 @@ BSARGS= DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ BWPHASE=${.TARGET:C,^_,,} \ SSP_CFLAGS= \ - MK_HTML=no NO_LINT=yes MK_MAN=no \ + MK_COVERAGE=no MK_HTML=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ @@ -558,7 +558,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${W DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ - MK_HTML=no -DNO_LINT MK_MAN=no \ + MK_COVERAGE=no MK_HTML=no -DNO_LINT MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no @@ -906,7 +906,7 @@ _libraries: @echo ">>> stage 4.2: building libraries" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ - ${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \ + ${WMAKE} -DNO_FSCHG MK_COVERAGE=no MK_HTML=no -DNO_LINT MK_MAN=no \ MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries everything: .PHONY @echo