From owner-svn-ports-head@freebsd.org Wed Mar 28 09:37:40 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FBA1F6F3BB; Wed, 28 Mar 2018 09:37:40 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1C207F966; Wed, 28 Mar 2018 09:37:39 +0000 (UTC) (envelope-from tijl@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EF63107B; Wed, 28 Mar 2018 09:37:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2S9bdgU049994; Wed, 28 Mar 2018 09:37:39 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2S9bdgD049991; Wed, 28 Mar 2018 09:37:39 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201803280937.w2S9bdgD049991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 28 Mar 2018 09:37:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r465789 - in head/devel/boost-jam: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: in head/devel/boost-jam: . files X-SVN-Commit-Revision: 465789 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 09:37:40 -0000 Author: tijl Date: Wed Mar 28 09:37:38 2018 New Revision: 465789 URL: https://svnweb.freebsd.org/changeset/ports/465789 Log: - Add a patch to make bjam call poll with timeout -1 instead of 0 so it doesn't use so much CPU time. This cuts the build time of boost-libs in half for non-parallel builds. - Add support for WITH_DEBUG. Added: head/devel/boost-jam/files/ head/devel/boost-jam/files/patch-debugger.c (contents, props changed) head/devel/boost-jam/files/patch-execunix.c (contents, props changed) Modified: head/devel/boost-jam/Makefile Modified: head/devel/boost-jam/Makefile ============================================================================== --- head/devel/boost-jam/Makefile Wed Mar 28 09:33:24 2018 (r465788) +++ head/devel/boost-jam/Makefile Wed Mar 28 09:37:38 2018 (r465789) @@ -2,13 +2,14 @@ # $FreeBSD$ PORTNAME= boost-jam +PORTREVISION= 1 COMMENT= Build tool from the boost.org PLIST_FILES= bin/bjam EXTRACT_AFTER_ARGS= ${DISTNAME}/${WRKSRC_SUBDIR} MAKE_CMD= ./build.sh -ALL_TARGET= cc +ALL_TARGET= cc ${WITH_DEBUG:D--debug} MAKE_FLAGS= # _MAKE_JOBS= # MAKEFILE= # Added: head/devel/boost-jam/files/patch-debugger.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/boost-jam/files/patch-debugger.c Wed Mar 28 09:37:38 2018 (r465789) @@ -0,0 +1,20 @@ +--- debugger.c.orig 2017-12-13 23:56:50 UTC ++++ debugger.c +@@ -1102,7 +1102,7 @@ static void debug_start_child( int argc, const char * + PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 }; + STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; +- assert( DEBUG_STATE == DEBUG_NO_CHILD ); ++ assert( debug_state == DEBUG_NO_CHILD ); + if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) ) + { + printf("internal error\n"); +@@ -1189,7 +1189,7 @@ static void debug_start_child( int argc, const char * + int read_fd; + int pid; + int i; +- assert( DEBUG_STATE == DEBUG_NO_CHILD ); ++ assert( debug_state == DEBUG_NO_CHILD ); + pipe(pipe1); + pipe(pipe2); + pid = fork(); Added: head/devel/boost-jam/files/patch-execunix.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/boost-jam/files/patch-execunix.c Wed Mar 28 09:37:38 2018 (r465789) @@ -0,0 +1,56 @@ +--- execunix.c.orig 2017-12-13 23:56:50 UTC ++++ execunix.c +@@ -445,9 +445,7 @@ void exec_wait() + while ( !finished ) + { + int i; +- struct timeval tv; +- struct timeval * ptv = NULL; +- int select_timeout = globs.timeout; ++ int poll_timeout = -1; + + /* Check for timeouts: + * - kill children that already timed out +@@ -457,6 +455,7 @@ void exec_wait() + { + struct tms buf; + clock_t const current = times( &buf ); ++ poll_timeout = globs.timeout; + for ( i = 0; i < globs.jobs; ++i ) + if ( cmdtab[ i ].pid ) + { +@@ -467,28 +466,21 @@ void exec_wait() + killpg( cmdtab[ i ].pid, SIGKILL ); + cmdtab[ i ].exit_reason = EXIT_TIMEOUT; + } +- else if ( globs.timeout - consumed < select_timeout ) +- select_timeout = globs.timeout - consumed; ++ else if ( globs.timeout - consumed < poll_timeout ) ++ poll_timeout = globs.timeout - consumed; + } +- +- /* If nothing else causes our select() call to exit, force it after +- * however long it takes for the next one of our child processes to +- * crossed its alloted processing time so we can terminate it. +- */ +- tv.tv_sec = select_timeout; +- tv.tv_usec = 0; +- ptv = &tv; ++ poll_timeout *= 1000; + } + +- /* select() will wait for I/O on a descriptor, a signal, or timeout. */ ++ /* poll() will wait for I/O on a descriptor, a signal, or timeout. */ + { +- /* disable child termination signals while in select */ ++ /* disable child termination signals while in poll */ + int ret; + sigset_t sigmask; + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGCHLD); + sigprocmask(SIG_BLOCK, &sigmask, NULL); +- while ( ( ret = poll( wait_fds, WAIT_FDS_SIZE, select_timeout * 1000 ) ) == -1 ) ++ while ( ( ret = poll( wait_fds, WAIT_FDS_SIZE, poll_timeout ) ) == -1 ) + if ( errno != EINTR ) + break; + /* restore original signal mask by unblocking sigchld */