summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-06-24 20:38:27 +0000
committerpfg <pfg@FreeBSD.org>2013-06-24 20:38:27 +0000
commit33803091b86f7876025d5fb6d75da725e8d17053 (patch)
tree3be89ae70d839ab73b128285940df5a0c58e2328 /contrib/gcc
parent494a0d771f6478563e97031ac07ee39b73edc05d (diff)
downloadFreeBSD-src-33803091b86f7876025d5fb6d75da725e8d17053.zip
FreeBSD-src-33803091b86f7876025d5fb6d75da725e8d17053.tar.gz
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)
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/config.gcc4
-rw-r--r--contrib/gcc/gthr-posix95.h14
-rw-r--r--contrib/gcc/opts.c2
3 files changed, 15 insertions, 5 deletions
diff --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc
index 5806ce7..2e1c10f 100644
--- a/contrib/gcc/config.gcc
+++ b/contrib/gcc/config.gcc
@@ -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
diff --git a/contrib/gcc/gthr-posix95.h b/contrib/gcc/gthr-posix95.h
index fde2645..1523865 100644
--- a/contrib/gcc/gthr-posix95.h
+++ b/contrib/gcc/gthr-posix95.h
@@ -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 */
diff --git a/contrib/gcc/opts.c b/contrib/gcc/opts.c
index 3de5627..fb122ba 100644
--- a/contrib/gcc/opts.c
+++ b/contrib/gcc/opts.c
@@ -504,7 +504,7 @@ decode_options (unsigned int argc, const char **argv)
/* 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)
{
OpenPOWER on IntegriCloud