From owner-svn-src-head@FreeBSD.ORG Mon Jun 24 20:38:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0542C992; Mon, 24 Jun 2013 20:38:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DB6B91EB4; Mon, 24 Jun 2013 20:38:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5OKcSFl027553; Mon, 24 Jun 2013 20:38:28 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5OKcSPc027550; Mon, 24 Jun 2013 20:38:28 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201306242038.r5OKcSPc027550@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 24 Jun 2013 20:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252176 - head/contrib/gcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jun 2013 20:38:29 -0000 Author: pfg Date: Mon Jun 24 20:38:27 2013 New Revision: 252176 URL: http://svnweb.freebsd.org/changeset/base/252176 Log: gcc: add some configuration and references. -Add configure support for FreeBSD 10 and 11. -Adapt a threading fix to gnu POSIX95 (which we don't use). -Refer to a bug fix for the disabled vrptree support. This is all useless in our current build but it is included for convenience in case someone may want to re-package our older gcc. Reviewed by: gerald (long ago) Modified: head/contrib/gcc/config.gcc head/contrib/gcc/gthr-posix95.h head/contrib/gcc/opts.c Modified: head/contrib/gcc/config.gcc ============================================================================== --- head/contrib/gcc/config.gcc Mon Jun 24 20:36:12 2013 (r252175) +++ head/contrib/gcc/config.gcc Mon Jun 24 20:38:27 2013 (r252176) @@ -428,6 +428,10 @@ case ${target} in tm_defines="${tm_defines} FBSD_MAJOR=8" ;; *-*-freebsd9 | *-*-freebsd[9].*) tm_defines="${tm_defines} FBSD_MAJOR=9" ;; + *-*-freebsd10 | *-*-freebsd[10].*) + tm_defines="${tm_defines} FBSD_MAJOR=10" ;; + *-*-freebsd11 | *-*-freebsd[11].*) + tm_defines="${tm_defines} FBSD_MAJOR=11" ;; *) echo 'Please update *-*-freebsd* in gcc/config.gcc' exit 1 Modified: head/contrib/gcc/gthr-posix95.h ============================================================================== --- head/contrib/gcc/gthr-posix95.h Mon Jun 24 20:36:12 2013 (r252175) +++ head/contrib/gcc/gthr-posix95.h Mon Jun 24 20:38:27 2013 (r252176) @@ -115,9 +115,15 @@ __gthrw(pthread_setschedparam) it is passed so we cannot pretend that the interface is active if -pthreads is not specified. On Solaris 2.5.1, the interface is not exposed at all so we need to play the usual game with weak symbols. On Solaris 10 and up, a - working interface is always exposed. */ + working interface is always exposed. On FreeBSD 6 and later, libc also + exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up + to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, + which means the alternate __gthread_active_p below cannot be used there. */ -#if defined(__sun) && defined(__svr4__) + + */ + +#if defined(__FreeBSD__) || defined(__sun) && defined(__svr4__) static volatile int __gthread_active = -1; @@ -160,7 +166,7 @@ __gthread_active_p (void) return __gthread_active_latest_value != 0; } -#else /* not Solaris */ +#else /* neither FreeBSD nor Solaris */ static inline int __gthread_active_p (void) @@ -170,7 +176,7 @@ __gthread_active_p (void) return __gthread_active_ptr != 0; } -#endif /* Solaris */ +#endif /* FreeBSD or Solaris */ #else /* not SUPPORTS_WEAK */ Modified: head/contrib/gcc/opts.c ============================================================================== --- head/contrib/gcc/opts.c Mon Jun 24 20:36:12 2013 (r252175) +++ head/contrib/gcc/opts.c Mon Jun 24 20:38:27 2013 (r252176) @@ -504,7 +504,7 @@ decode_options (unsigned int argc, const /* XXX: some issues with ports have been traced to -ftree-vrp. So remove it from -O2 and above. Note that jdk1{5,6} are affected and they build with w/-O3 - so we cannot just move it to -O3. */ - // flag_tree_vrp = 1; + /* flag_tree_vrp = 1; // See GCC tree-optimization/33099 */ if (!optimize_size) {