diff --git a/.gcc.metadata b/.gcc.metadata
index c38b824..cdc1fdf 100644
--- a/.gcc.metadata
+++ b/.gcc.metadata
@@ -1,4 +1,4 @@
85f620a26aabf6a934c44ca40a9799af0952f863 SOURCES/cloog-0.18.0.tar.gz
8263777994323f58bb81869354fb18c6ca32f88a SOURCES/fastjar-0.97.tar.gz
-4dc43586c58752ff53f9dbda92b16c761dca8b65 SOURCES/gcc-4.8.2-20140120.tar.bz2
+67cb44e56acd1a81e8641595b8ba300a50d5a04a SOURCES/gcc-4.8.3-20140911.tar.bz2
d7936929c3937e03f09b64c3c54e49422fa8ddb3 SOURCES/isl-0.11.1.tar.bz2
diff --git a/.gitignore b/.gitignore
index ebc57bd..eb870f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
SOURCES/cloog-0.18.0.tar.gz
SOURCES/fastjar-0.97.tar.gz
-SOURCES/gcc-4.8.2-20140120.tar.bz2
+SOURCES/gcc-4.8.3-20140911.tar.bz2
SOURCES/isl-0.11.1.tar.bz2
diff --git a/SOURCES/cloog-0.18.0-ppc64le-config.patch b/SOURCES/cloog-0.18.0-ppc64le-config.patch
new file mode 100644
index 0000000..5538a24
--- /dev/null
+++ b/SOURCES/cloog-0.18.0-ppc64le-config.patch
@@ -0,0 +1,717 @@
+--- cloog-0.18.0/m4/libtool.m4.jj 2014-04-10 14:29:12.547772844 -0700
++++ cloog-0.18.0/m4/libtool.m4 2014-04-10 14:33:01.848642792 -0700
+@@ -1312,7 +1312,7 @@
+ rm -rf conftest*
+ ;;
+
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+@@ -1326,7 +1326,10 @@
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -1345,7 +1348,10 @@
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+--- cloog-0.18.0/autoconf/config.sub.jj 2013-10-11 09:27:45.000000000 +0200
++++ cloog-0.18.0/autoconf/config.sub 2014-04-10 10:38:39.000000000 +0200
+@@ -1,24 +1,18 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+-# 2011, 2012 Free Software Foundation, Inc.
+-
+-timestamp='2012-04-18'
+-
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine. It does not imply ALL GNU software can.
+-#
+-# This file is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
++# Copyright 1992-2013 Free Software Foundation, Inc.
++
++timestamp='2013-10-01'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, see .
+@@ -26,11 +20,12 @@ timestamp='2012-04-18'
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+
+
+-# Please send patches to . Submit a context
+-# diff and a properly formatted GNU ChangeLog entry.
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+@@ -73,9 +68,7 @@ Report bugs and patches to and include a ChangeLog
+-# entry.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
++# Originally written by Per Bothner.
+ #
+ # You can get the latest version of this script from:
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++#
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
++
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -54,9 +50,7 @@ version="\
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+-Free Software Foundation, Inc.
++Copyright 1992-2013 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ ;;
++esac
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -801,6 +820,9 @@ EOF
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+@@ -852,21 +874,21 @@ EOF
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -879,59 +901,54 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+- LIBC=gnu
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -950,54 +967,63 @@ EOF
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
++ or1k:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ or32:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+- echo sparc-unknown-linux-gnu
++ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-ibm-linux
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+@@ -1201,6 +1227,9 @@ EOF
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1227,19 +1256,21 @@ EOF
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+- case $UNAME_PROCESSOR in
+- i386)
+- eval $set_cc_for_build
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+- grep IS_64BIT_ARCH >/dev/null
+- then
+- UNAME_PROCESSOR="x86_64"
+- fi
+- fi ;;
+- unknown) UNAME_PROCESSOR=powerpc ;;
+- esac
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+@@ -1256,7 +1287,7 @@ EOF
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+- NSE-?:NONSTOP_KERNEL:*:*)
++ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+@@ -1330,9 +1361,6 @@ EOF
+ exit ;;
+ esac
+
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c < conftest.$ac_ext
+@@ -1326,7 +1326,10 @@
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -1345,7 +1348,10 @@
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
diff --git a/SOURCES/fastjar-0.97-ppc64le-config.patch b/SOURCES/fastjar-0.97-ppc64le-config.patch
new file mode 100644
index 0000000..5671561
--- /dev/null
+++ b/SOURCES/fastjar-0.97-ppc64le-config.patch
@@ -0,0 +1,708 @@
+--- fastjar-0.97/m4/libtool.m4.jj 2008-10-16 10:14:54.000000000 +0200
++++ fastjar-0.97/m4/libtool.m4 2014-04-10 20:41:26.563064023 +0200
+@@ -1263,7 +1263,7 @@ ia64-*-hpux*)
+ rm -rf conftest*
+ ;;
+
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+@@ -1277,7 +1277,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -1296,7 +1299,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+--- fastjar-0.97/config.sub.jj 2014-04-10 20:40:53.000000000 +0200
++++ fastjar-0.97/config.sub 2014-04-10 10:38:39.000000000 +0200
+@@ -1,24 +1,18 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+-# 2011, 2012 Free Software Foundation, Inc.
+-
+-timestamp='2012-04-18'
+-
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine. It does not imply ALL GNU software can.
+-#
+-# This file is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
++# Copyright 1992-2013 Free Software Foundation, Inc.
++
++timestamp='2013-10-01'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, see .
+@@ -26,11 +20,12 @@ timestamp='2012-04-18'
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+
+
+-# Please send patches to . Submit a context
+-# diff and a properly formatted GNU ChangeLog entry.
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+@@ -73,9 +68,7 @@ Report bugs and patches to and include a ChangeLog
+-# entry.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
++# Originally written by Per Bothner.
+ #
+ # You can get the latest version of this script from:
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++#
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
++
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -54,9 +50,7 @@ version="\
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+-Free Software Foundation, Inc.
++Copyright 1992-2013 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ ;;
++esac
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -801,6 +820,9 @@ EOF
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+@@ -852,21 +874,21 @@ EOF
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -879,59 +901,54 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+- LIBC=gnu
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -950,54 +967,63 @@ EOF
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
++ or1k:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ or32:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+- echo sparc-unknown-linux-gnu
++ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-ibm-linux
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+@@ -1201,6 +1227,9 @@ EOF
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1227,19 +1256,21 @@ EOF
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+- case $UNAME_PROCESSOR in
+- i386)
+- eval $set_cc_for_build
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+- grep IS_64BIT_ARCH >/dev/null
+- then
+- UNAME_PROCESSOR="x86_64"
+- fi
+- fi ;;
+- unknown) UNAME_PROCESSOR=powerpc ;;
+- esac
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+@@ -1330,9 +1361,6 @@ EOF
+ exit ;;
+ esac
+
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c < conftest.$ac_ext
+@@ -6936,7 +6936,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -6955,7 +6958,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
diff --git a/SOURCES/gcc48-aarch64-ada.patch b/SOURCES/gcc48-aarch64-ada.patch
new file mode 100644
index 0000000..4d2fb7d
--- /dev/null
+++ b/SOURCES/gcc48-aarch64-ada.patch
@@ -0,0 +1,96 @@
+2014-04-09 Richard Henderson
+
+ * gcc-interface/Makefile.in: Support aarch64-linux.
+ * init.c: Enable alternate stack support also on aarch64.
+ * types.h (Fat_Pointer): Remove aligned attribute.
+
+--- gcc/ada/gcc-interface/Makefile.in
++++ gcc/ada/gcc-interface/Makefile.in
+@@ -2123,6 +2123,44 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
++# AArch64 Linux
++ifeq ($(strip $(filter-out aarch64% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-exetim.adb
+
+ * common/config/aarch64/aarch64-common.c (TARGET_OPTION_INIT_STRUCT):
+ Define.
+ (aarch64_option_init_struct): New function.
+
+--- gcc/common/config/aarch64/aarch64-common.c
++++ gcc/common/config/aarch64/aarch64-common.c
+@@ -39,6 +39,9 @@
+ #undef TARGET_OPTION_OPTIMIZATION_TABLE
+ #define TARGET_OPTION_OPTIMIZATION_TABLE aarch_option_optimization_table
+
++#undef TARGET_OPTION_INIT_STRUCT
++#define TARGET_OPTION_INIT_STRUCT aarch64_option_init_struct
++
+ /* Set default optimization options. */
+ static const struct default_options aarch_option_optimization_table[] =
+ {
+@@ -47,6 +50,16 @@ static const struct default_options aarch_option_optimization_table[] =
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
+ };
+
++/* Implement TARGET_OPTION_INIT_STRUCT. */
++
++static void
++aarch64_option_init_struct (struct gcc_options *opts)
++{
++ /* By default, always emit DWARF-2 unwind info. This allows debugging
++ without maintaining a stack frame back-chain. */
++ opts->x_flag_asynchronous_unwind_tables = 1;
++}
++
+ /* Implement TARGET_HANDLE_OPTION.
+ This function handles the target specific options for CPU/target selection.
+
diff --git a/SOURCES/gcc48-aarch64-unwind-opt.patch b/SOURCES/gcc48-aarch64-unwind-opt.patch
new file mode 100644
index 0000000..074cd7e
--- /dev/null
+++ b/SOURCES/gcc48-aarch64-unwind-opt.patch
@@ -0,0 +1,342 @@
+2014-08-08 Richard Henderson
+
+ * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Add
+ cfi_ops argument, for restore put REG_CFA_RESTORE notes into
+ *cfi_ops rather than on individual insns. Cleanup.
+ (aarch64_save_or_restore_callee_save_registers): Likewise.
+ (aarch64_expand_prologue): Adjust caller.
+ (aarch64_expand_epilogue): Likewise. Cleanup. Emit queued cfi_ops
+ on the stack restore insn.
+
+--- gcc/config/aarch64/aarch64.c 2014-07-15 02:27:16.000000000 -0700
++++ gcc/config/aarch64/aarch64.c 2014-08-21 12:52:44.190455860 -0700
+@@ -1603,24 +1603,23 @@ aarch64_register_saved_on_entry (int reg
+
+ static void
+ aarch64_save_or_restore_fprs (int start_offset, int increment,
+- bool restore, rtx base_rtx)
+-
++ bool restore, rtx base_rtx, rtx *cfi_ops)
+ {
+ unsigned regno;
+ unsigned regno2;
+ rtx insn;
+ rtx (*gen_mem_ref)(enum machine_mode, rtx) = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
+
+-
+ for (regno = V0_REGNUM; regno <= V31_REGNUM; regno++)
+ {
+ if (aarch64_register_saved_on_entry (regno))
+ {
+- rtx mem;
++ rtx mem, reg1;
+ mem = gen_mem_ref (DFmode,
+ plus_constant (Pmode,
+ base_rtx,
+ start_offset));
++ reg1 = gen_rtx_REG (DFmode, regno);
+
+ for (regno2 = regno + 1;
+ regno2 <= V31_REGNUM
+@@ -1632,54 +1631,51 @@ aarch64_save_or_restore_fprs (int start_
+ if (regno2 <= V31_REGNUM &&
+ aarch64_register_saved_on_entry (regno2))
+ {
+- rtx mem2;
++ rtx mem2, reg2;
+ /* Next highest register to be saved. */
+ mem2 = gen_mem_ref (DFmode,
+ plus_constant
+ (Pmode,
+ base_rtx,
+ start_offset + increment));
++ reg2 = gen_rtx_REG (DFmode, regno2);
++
+ if (restore == false)
+ {
+- insn = emit_insn
+- ( gen_store_pairdf (mem, gen_rtx_REG (DFmode, regno),
+- mem2, gen_rtx_REG (DFmode, regno2)));
+-
++ insn = emit_insn (gen_store_pairdf (mem, reg1, mem2, reg2));
++ /* The first part of a frame-related parallel insn
++ is always assumed to be relevant to the frame
++ calculations; subsequent parts, are only
++ frame-related if explicitly marked. */
++ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else
+ {
+- insn = emit_insn
+- ( gen_load_pairdf (gen_rtx_REG (DFmode, regno), mem,
+- gen_rtx_REG (DFmode, regno2), mem2));
+-
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DFmode, regno));
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DFmode, regno2));
++ emit_insn (gen_load_pairdf (reg1, mem, reg2, mem2));
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops);
+ }
+
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0,
+- 1)) = 1;
+ regno = regno2;
+ start_offset += increment * 2;
+ }
+ else
+ {
+ if (restore == false)
+- insn = emit_move_insn (mem, gen_rtx_REG (DFmode, regno));
++ {
++ insn = emit_move_insn (mem, reg1);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
+ else
+ {
+- insn = emit_move_insn (gen_rtx_REG (DFmode, regno), mem);
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno));
++ emit_move_insn (reg1, mem);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
+ }
+ start_offset += increment;
+ }
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+-
+ }
+
+
+@@ -1687,13 +1683,14 @@ aarch64_save_or_restore_fprs (int start_
+ restore's have to happen. */
+ static void
+ aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT offset,
+- bool restore)
++ bool restore, rtx *cfi_ops)
+ {
+ rtx insn;
+ rtx base_rtx = stack_pointer_rtx;
+ HOST_WIDE_INT start_offset = offset;
+ HOST_WIDE_INT increment = UNITS_PER_WORD;
+- rtx (*gen_mem_ref)(enum machine_mode, rtx) = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
++ rtx (*gen_mem_ref)(enum machine_mode, rtx)
++ = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
+ unsigned limit = (frame_pointer_needed)? R28_REGNUM: R30_REGNUM;
+ unsigned regno;
+ unsigned regno2;
+@@ -1702,11 +1699,13 @@ aarch64_save_or_restore_callee_save_regi
+ {
+ if (aarch64_register_saved_on_entry (regno))
+ {
+- rtx mem;
++ rtx mem, reg1;
++
+ mem = gen_mem_ref (Pmode,
+ plus_constant (Pmode,
+ base_rtx,
+ start_offset));
++ reg1 = gen_rtx_REG (DImode, regno);
+
+ for (regno2 = regno + 1;
+ regno2 <= limit
+@@ -1718,56 +1717,54 @@ aarch64_save_or_restore_callee_save_regi
+ if (regno2 <= limit &&
+ aarch64_register_saved_on_entry (regno2))
+ {
+- rtx mem2;
++ rtx mem2, reg2;
+ /* Next highest register to be saved. */
+ mem2 = gen_mem_ref (Pmode,
+ plus_constant
+ (Pmode,
+ base_rtx,
+ start_offset + increment));
++ reg2 = gen_rtx_REG (DImode, regno2);
++
+ if (restore == false)
+ {
+- insn = emit_insn
+- ( gen_store_pairdi (mem, gen_rtx_REG (DImode, regno),
+- mem2, gen_rtx_REG (DImode, regno2)));
+-
++ insn = emit_insn (gen_store_pairdi (mem, reg1, mem2, reg2));
++ /* The first part of a frame-related parallel insn
++ is always assumed to be relevant to the frame
++ calculations; subsequent parts, are only
++ frame-related if explicitly marked. */
++ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else
+ {
+- insn = emit_insn
+- ( gen_load_pairdi (gen_rtx_REG (DImode, regno), mem,
+- gen_rtx_REG (DImode, regno2), mem2));
+-
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno));
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno2));
++ emit_insn (gen_load_pairdi (reg1, mem, reg2, mem2));
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops);
+ }
+
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0,
+- 1)) = 1;
+ regno = regno2;
+ start_offset += increment * 2;
+ }
+ else
+ {
+ if (restore == false)
+- insn = emit_move_insn (mem, gen_rtx_REG (DImode, regno));
++ {
++ insn = emit_move_insn (mem, reg1);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
+ else
+ {
+- insn = emit_move_insn (gen_rtx_REG (DImode, regno), mem);
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno));
++ emit_move_insn (reg1, mem);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
+ }
+ start_offset += increment;
+ }
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+
+- aarch64_save_or_restore_fprs (start_offset, increment, restore, base_rtx);
+-
++ aarch64_save_or_restore_fprs (start_offset, increment, restore,
++ base_rtx, cfi_ops);
+ }
+
+ /* AArch64 stack frames generated by this compiler look like:
+@@ -1966,7 +1963,7 @@ aarch64_expand_prologue (void)
+ }
+
+ aarch64_save_or_restore_callee_save_registers
+- (fp_offset + cfun->machine->frame.hardfp_offset, 0);
++ (fp_offset + cfun->machine->frame.hardfp_offset, 0, NULL);
+ }
+
+ /* when offset >= 512,
+@@ -1991,6 +1988,7 @@ aarch64_expand_epilogue (bool for_sibcal
+ HOST_WIDE_INT fp_offset;
+ rtx insn;
+ rtx cfa_reg;
++ rtx cfi_ops = NULL;
+
+ aarch64_layout_frame ();
+ original_frame_size = get_frame_size () + cfun->machine->saved_varargs_size;
+@@ -2035,15 +2033,17 @@ aarch64_expand_epilogue (bool for_sibcal
+ insn = emit_insn (gen_add3_insn (stack_pointer_rtx,
+ hard_frame_pointer_rtx,
+ GEN_INT (- fp_offset)));
++ /* CFA should be calculated from the value of SP from now on. */
++ add_reg_note (insn, REG_CFA_ADJUST_CFA,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, hard_frame_pointer_rtx,
++ -fp_offset)));
+ RTX_FRAME_RELATED_P (insn) = 1;
+- /* As SP is set to (FP - fp_offset), according to the rules in
+- dwarf2cfi.c:dwarf2out_frame_debug_expr, CFA should be calculated
+- from the value of SP from now on. */
+ cfa_reg = stack_pointer_rtx;
+ }
+
+ aarch64_save_or_restore_callee_save_registers
+- (fp_offset + cfun->machine->frame.hardfp_offset, 1);
++ (fp_offset + cfun->machine->frame.hardfp_offset, 1, &cfi_ops);
+
+ /* Restore the frame pointer and lr if the frame pointer is needed. */
+ if (offset > 0)
+@@ -2051,6 +2051,8 @@ aarch64_expand_epilogue (bool for_sibcal
+ if (frame_pointer_needed)
+ {
+ rtx mem_fp, mem_lr;
++ rtx reg_fp = hard_frame_pointer_rtx;
++ rtx reg_lr = gen_rtx_REG (DImode, LR_REGNUM);
+
+ if (fp_offset)
+ {
+@@ -2063,52 +2065,36 @@ aarch64_expand_epilogue (bool for_sibcal
+ stack_pointer_rtx,
+ fp_offset
+ + UNITS_PER_WORD));
+- insn = emit_insn (gen_load_pairdi (hard_frame_pointer_rtx,
+- mem_fp,
+- gen_rtx_REG (DImode,
+- LR_REGNUM),
+- mem_lr));
++ emit_insn (gen_load_pairdi (reg_fp, mem_fp, reg_lr, mem_lr));
++
++ insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
++ GEN_INT (offset)));
+ }
+ else
+ {
+ insn = emit_insn (gen_loadwb_pairdi_di
+- (stack_pointer_rtx,
+- stack_pointer_rtx,
+- hard_frame_pointer_rtx,
+- gen_rtx_REG (DImode, LR_REGNUM),
+- GEN_INT (offset),
++ (stack_pointer_rtx, stack_pointer_rtx,
++ reg_fp, reg_lr, GEN_INT (offset),
+ GEN_INT (GET_MODE_SIZE (DImode) + offset)));
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 2)) = 1;
+- add_reg_note (insn, REG_CFA_ADJUST_CFA,
+- (gen_rtx_SET (Pmode, stack_pointer_rtx,
+- plus_constant (Pmode, cfa_reg,
+- offset))));
+- }
+-
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
+- RTX_FRAME_RELATED_P (insn) = 1;
+- add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx);
+- add_reg_note (insn, REG_CFA_RESTORE,
+- gen_rtx_REG (DImode, LR_REGNUM));
+-
+- if (fp_offset)
+- {
+- insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
+- GEN_INT (offset)));
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_fp, cfi_ops);
++ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_lr, cfi_ops);
+ }
+ else
+ {
+ insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
+ GEN_INT (offset)));
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ cfi_ops = alloc_reg_note (REG_CFA_ADJUST_CFA,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, cfa_reg,
++ offset)),
++ cfi_ops);
++ REG_NOTES (insn) = cfi_ops;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ else
++ gcc_assert (cfi_ops == NULL);
+
+ /* Stack adjustment for exception handler. */
+ if (crtl->calls_eh_return)
diff --git a/SOURCES/gcc48-libstdc++-docs.patch b/SOURCES/gcc48-libstdc++-docs.patch
index 6f87ea5..382666b 100644
--- a/SOURCES/gcc48-libstdc++-docs.patch
+++ b/SOURCES/gcc48-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 4.8.1
++ Release 4.8.3
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -18,7 +18,7 @@
- The API documentation, rendered into HTML, can be viewed online:
+ The API documentation, rendered into HTML, can be viewed here:
-+ for the 4.8.1 release, local
++ for the 4.8.3 release, local
+
+
for the 3.4 release
diff --git a/SOURCES/gcc48-ppc32-retaddr.patch b/SOURCES/gcc48-ppc32-retaddr.patch
index 78120cc..e906dad 100644
--- a/SOURCES/gcc48-ppc32-retaddr.patch
+++ b/SOURCES/gcc48-ppc32-retaddr.patch
@@ -8,9 +8,9 @@
--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
+++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
-@@ -18325,18 +18325,22 @@ rs6000_return_addr (int count, rtx frame
- don't try to be too clever here. */
- if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
+@@ -21423,18 +21423,22 @@ rs6000_return_addr (int count, rtx frame
+ if (count != 0
+ || ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && flag_pic))
{
+ rtx x;
cfun->machine->ra_needs_full_frame = 1;
diff --git a/SOURCES/gcc48-pr57896.patch b/SOURCES/gcc48-pr57896.patch
deleted file mode 100644
index 7b27bf1..0000000
--- a/SOURCES/gcc48-pr57896.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-2014-02-21 Jakub Jelinek
-
- * config/i386/i386.c (ix86_expand_vec_perm): Use V8SImode
- mode for mask of V8SFmode permutation.
-
-2014-02-20 Jakub Jelinek
-
- PR target/57896
- * config/i386/i386.c (expand_vec_perm_interleave2): Don't call
- gen_reg_rtx if d->testing_p.
- (expand_vec_perm_pshufb2, expand_vec_perm_even_odd_1,
- expand_vec_perm_broadcast_1): Return early if d->testing_p and
- we will certainly return true.
-
---- gcc/config/i386/i386.c (revision 207969)
-+++ gcc/config/i386/i386.c (revision 207982)
-@@ -20460,7 +20460,7 @@ ix86_expand_vec_perm (rtx operands[])
- return;
-
- case V8SFmode:
-- mask = gen_lowpart (V8SFmode, mask);
-+ mask = gen_lowpart (V8SImode, mask);
- if (one_operand_shuffle)
- emit_insn (gen_avx2_permvarv8sf (target, op0, mask));
- else
-@@ -39405,7 +39405,9 @@ expand_vec_perm_interleave2 (struct expa
- else
- dfinal.perm[i] = e;
- }
-- dfinal.op0 = gen_reg_rtx (dfinal.vmode);
-+
-+ if (!d->testing_p)
-+ dfinal.op0 = gen_reg_rtx (dfinal.vmode);
- dfinal.op1 = dfinal.op0;
- dfinal.one_operand_p = true;
- dremap.target = dfinal.op0;
-@@ -39840,6 +39842,9 @@ expand_vec_perm_pshufb2 (struct expand_v
- return false;
- gcc_assert (!d->one_operand_p);
-
-+ if (d->testing_p)
-+ return true;
-+
- nelt = d->nelt;
- eltsz = GET_MODE_SIZE (GET_MODE_INNER (d->vmode));
-
-@@ -40039,6 +40044,8 @@ expand_vec_perm_even_odd_1 (struct expan
- switch (d->vmode)
- {
- case V4DFmode:
-+ if (d->testing_p)
-+ break;
- t1 = gen_reg_rtx (V4DFmode);
- t2 = gen_reg_rtx (V4DFmode);
-
-@@ -40058,6 +40065,8 @@ expand_vec_perm_even_odd_1 (struct expan
- {
- int mask = odd ? 0xdd : 0x88;
-
-+ if (d->testing_p)
-+ break;
- t1 = gen_reg_rtx (V8SFmode);
- t2 = gen_reg_rtx (V8SFmode);
- t3 = gen_reg_rtx (V8SFmode);
-@@ -40099,6 +40108,8 @@ expand_vec_perm_even_odd_1 (struct expan
- return expand_vec_perm_pshufb2 (d);
- else
- {
-+ if (d->testing_p)
-+ break;
- /* We need 2*log2(N)-1 operations to achieve odd/even
- with interleave. */
- t1 = gen_reg_rtx (V8HImode);
-@@ -40120,6 +40131,8 @@ expand_vec_perm_even_odd_1 (struct expan
- return expand_vec_perm_pshufb2 (d);
- else
- {
-+ if (d->testing_p)
-+ break;
- t1 = gen_reg_rtx (V16QImode);
- t2 = gen_reg_rtx (V16QImode);
- t3 = gen_reg_rtx (V16QImode);
-@@ -40152,6 +40165,9 @@ expand_vec_perm_even_odd_1 (struct expan
- return expand_vec_perm_even_odd_1 (&d_copy, odd);
- }
-
-+ if (d->testing_p)
-+ break;
-+
- t1 = gen_reg_rtx (V4DImode);
- t2 = gen_reg_rtx (V4DImode);
-
-@@ -40178,6 +40194,9 @@ expand_vec_perm_even_odd_1 (struct expan
- return expand_vec_perm_even_odd_1 (&d_copy, odd);
- }
-
-+ if (d->testing_p)
-+ break;
-+
- t1 = gen_reg_rtx (V8SImode);
- t2 = gen_reg_rtx (V8SImode);
-
-@@ -40270,6 +40289,8 @@ expand_vec_perm_broadcast_1 (struct expa
- case V16QImode:
- /* These can be implemented via interleave. We save one insn by
- stopping once we have promoted to V4SImode and then use pshufd. */
-+ if (d->testing_p)
-+ return true;
- do
- {
- rtx dest;
diff --git a/SOURCES/gcc48-pr60046.patch b/SOURCES/gcc48-pr60046.patch
deleted file mode 100644
index fde6da9..0000000
--- a/SOURCES/gcc48-pr60046.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-2014-02-19 Jason Merrill
-
- PR c++/60046
- * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
- spec from template context.
-
---- gcc/cp/pt.c (revision 207920)
-+++ gcc/cp/pt.c (revision 207921)
-@@ -18567,6 +18567,10 @@ maybe_instantiate_noexcept (tree fn)
- {
- tree fntype, spec, noex, clone;
-
-+ /* Don't instantiate a noexcept-specification from template context. */
-+ if (processing_template_decl)
-+ return;
-+
- if (DECL_CLONED_FUNCTION_P (fn))
- fn = DECL_CLONED_FUNCTION (fn);
- fntype = TREE_TYPE (fn);
---- gcc/testsuite/g++.dg/cpp0x/noexcept22.C (revision 0)
-+++ gcc/testsuite/g++.dg/cpp0x/noexcept22.C (revision 207921)
-@@ -0,0 +1,21 @@
-+// PR c++/60046
-+// { dg-require-effective-target c++11 }
-+
-+constexpr bool foo () { return noexcept (true); }
-+template
-+struct V
-+{
-+ void bar (V &) noexcept (foo ()) {}
-+};
-+template
-+struct W : public V
-+{
-+ void bar (W &x) { V ::bar (x); }
-+};
-+
-+int
-+main ()
-+{
-+ W a, b;
-+ a.bar (b);
-+}
diff --git a/SOURCES/gcc48-pr60137.patch b/SOURCES/gcc48-pr60137.patch
deleted file mode 100644
index 74cd998..0000000
--- a/SOURCES/gcc48-pr60137.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-2014-02-11 Michael Meissner
-
- PR target/60137
- * config/rs6000/rs6000.md (128-bit GPR splitter): Add a splitter
- for VSX/Altivec vectors that land in GPR registers.
-
- * gcc.target/powerpc/pr60137.c: New file.
-
---- gcc/config/rs6000/rs6000.md (revision 207698)
-+++ gcc/config/rs6000/rs6000.md (revision 207699)
-@@ -9963,6 +9963,15 @@ (define_insn_and_split "reload_vsx_from_
- [(set_attr "length" "12")
- (set_attr "type" "three")])
-
-+(define_split
-+ [(set (match_operand:FMOVE128_GPR 0 "nonimmediate_operand" "")
-+ (match_operand:FMOVE128_GPR 1 "input_operand" ""))]
-+ "reload_completed
-+ && (int_reg_operand (operands[0], mode)
-+ || int_reg_operand (operands[1], mode))"
-+ [(pc)]
-+{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
-+
- ;; Move SFmode to a VSX from a GPR register. Because scalar floating point
- ;; type is stored internally as double precision in the VSX registers, we have
- ;; to convert it from the vector format.
---- gcc/testsuite/gcc.target/powerpc/pr60137.c (revision 0)
-+++ gcc/testsuite/gcc.target/powerpc/pr60137.c (revision 207699)
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target { powerpc*-*-* } } } */
-+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
-+/* { dg-require-effective-target powerpc_p8vector_ok } */
-+/* { dg-options "-mcpu=power8 -O3 -mno-vsx" } */
-+
-+/* target/60137, compiler got a 'could not split insn error'. */
-+
-+extern int target_flags;
-+extern char fixed_regs[53];
-+extern char call_used_regs[53];
-+
-+void init_reg_sets_1(void)
-+{
-+ int i;
-+ for (i = 0; i < 53; i++)
-+ fixed_regs[i] = call_used_regs[i] = (call_used_regs[i] &((target_flags & 0x02000000) ? 2 : 1)) != 0;
-+}
diff --git a/SOURCES/gcc48-pr60233.patch b/SOURCES/gcc48-pr60233.patch
deleted file mode 100644
index 5402ac0..0000000
--- a/SOURCES/gcc48-pr60233.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-2014-02-18 Jakub Jelinek
- Uros Bizjak
-
- PR driver/60233
- * config/i386/driver-i386.c (host_detect_local_cpu): If
- YMM state is not saved by the OS, also clear has_f16c. Move
- CPUID 0x80000001 handling before YMM state saving checking.
-
---- gcc/config/i386/driver-i386.c (revision 207833)
-+++ gcc/config/i386/driver-i386.c (revision 207834)
-@@ -488,6 +488,28 @@ const char *host_detect_local_cpu (int a
- has_xsaveopt = eax & bit_XSAVEOPT;
- }
-
-+ /* Check cpuid level of extended features. */
-+ __cpuid (0x80000000, ext_level, ebx, ecx, edx);
-+
-+ if (ext_level > 0x80000000)
-+ {
-+ __cpuid (0x80000001, eax, ebx, ecx, edx);
-+
-+ has_lahf_lm = ecx & bit_LAHF_LM;
-+ has_sse4a = ecx & bit_SSE4a;
-+ has_abm = ecx & bit_ABM;
-+ has_lwp = ecx & bit_LWP;
-+ has_fma4 = ecx & bit_FMA4;
-+ has_xop = ecx & bit_XOP;
-+ has_tbm = ecx & bit_TBM;
-+ has_lzcnt = ecx & bit_LZCNT;
-+ has_prfchw = ecx & bit_PRFCHW;
-+
-+ has_longmode = edx & bit_LM;
-+ has_3dnowp = edx & bit_3DNOWP;
-+ has_3dnow = edx & bit_3DNOW;
-+ }
-+
- /* Get XCR_XFEATURE_ENABLED_MASK register with xgetbv. */
- #define XCR_XFEATURE_ENABLED_MASK 0x0
- #define XSTATE_FP 0x1
-@@ -506,33 +528,12 @@ const char *host_detect_local_cpu (int a
- has_avx2 = 0;
- has_fma = 0;
- has_fma4 = 0;
-+ has_f16c = 0;
- has_xop = 0;
- has_xsave = 0;
- has_xsaveopt = 0;
- }
-
-- /* Check cpuid level of extended features. */
-- __cpuid (0x80000000, ext_level, ebx, ecx, edx);
--
-- if (ext_level > 0x80000000)
-- {
-- __cpuid (0x80000001, eax, ebx, ecx, edx);
--
-- has_lahf_lm = ecx & bit_LAHF_LM;
-- has_sse4a = ecx & bit_SSE4a;
-- has_abm = ecx & bit_ABM;
-- has_lwp = ecx & bit_LWP;
-- has_fma4 = ecx & bit_FMA4;
-- has_xop = ecx & bit_XOP;
-- has_tbm = ecx & bit_TBM;
-- has_lzcnt = ecx & bit_LZCNT;
-- has_prfchw = ecx & bit_PRFCHW;
--
-- has_longmode = edx & bit_LM;
-- has_3dnowp = edx & bit_3DNOWP;
-- has_3dnow = edx & bit_3DNOW;
-- }
--
- if (!arch)
- {
- if (vendor == signature_AMD_ebx
diff --git a/SOURCES/gcc48-pr60272.patch b/SOURCES/gcc48-pr60272.patch
deleted file mode 100644
index 2360a91..0000000
--- a/SOURCES/gcc48-pr60272.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-2014-02-20 Richard Henderson
-
- PR c++/60272
- * builtins.c (expand_builtin_atomic_compare_exchange): Conditionalize
- on failure the store back into EXPECT. Always make a new pseudo for
- OLDVAL.
-
- * cas_n.c (libat_compare_exchange): Conditionalize on failure
- the store back to EPTR.
-
---- gcc/builtins.c (revision 207972)
-+++ gcc/builtins.c (revision 207973)
-@@ -5350,7 +5350,7 @@ static rtx
- expand_builtin_atomic_compare_exchange (enum machine_mode mode, tree exp,
- rtx target)
- {
-- rtx expect, desired, mem, oldval;
-+ rtx expect, desired, mem, oldval, label;
- enum memmodel success, failure;
- tree weak;
- bool is_weak;
-@@ -5388,14 +5388,26 @@ expand_builtin_atomic_compare_exchange (
- if (host_integerp (weak, 0) && tree_low_cst (weak, 0) != 0)
- is_weak = true;
-
-- oldval = expect;
-- if (!expand_atomic_compare_and_swap ((target == const0_rtx ? NULL : &target),
-- &oldval, mem, oldval, desired,
-+ if (target == const0_rtx)
-+ target = NULL;
-+
-+ /* Lest the rtl backend create a race condition with an imporoper store
-+ to memory, always create a new pseudo for OLDVAL. */
-+ oldval = NULL;
-+
-+ if (!expand_atomic_compare_and_swap (&target, &oldval, mem, expect, desired,
- is_weak, success, failure))
- return NULL_RTX;
-
-- if (oldval != expect)
-- emit_move_insn (expect, oldval);
-+ /* Conditionally store back to EXPECT, lest we create a race condition
-+ with an improper store to memory. */
-+ /* ??? With a rearrangement of atomics at the gimple level, we can handle
-+ the normal case where EXPECT is totally private, i.e. a register. At
-+ which point the store can be unconditional. */
-+ label = gen_label_rtx ();
-+ emit_cmp_and_jump_insns (target, const0_rtx, NE, NULL, VOIDmode, 1, label);
-+ emit_move_insn (expect, oldval);
-+ emit_label (label);
-
- return target;
- }
---- libatomic/cas_n.c (revision 207972)
-+++ libatomic/cas_n.c (revision 207973)
-@@ -51,10 +51,9 @@ SIZE(libat_compare_exchange) (UTYPE *mpt
- #if !DONE && N <= WORDSIZE && defined(atomic_compare_exchange_w)
- bool
- SIZE(libat_compare_exchange) (UTYPE *mptr, UTYPE *eptr, UTYPE newval,
-- int smodel, int fmodel UNUSED)
-+ int smodel, int fmodel)
- {
- UWORD mask, shift, weval, woldval, wnewval, t, *wptr;
-- bool ret = false;
-
- pre_barrier (smodel);
-
-@@ -82,12 +81,13 @@ SIZE(libat_compare_exchange) (UTYPE *mpt
- }
- while (!atomic_compare_exchange_w (wptr, &woldval, t, true,
- __ATOMIC_RELAXED, __ATOMIC_RELAXED));
-- ret = true;
-+ post_barrier (smodel);
-+ return true;
-+
- failure:
- *eptr = woldval >> shift;
--
-- post_barrier (smodel);
-- return ret;
-+ post_barrier (fmodel);
-+ return false;
- }
-
- #define DONE 1
-@@ -102,18 +102,17 @@ SIZE(libat_compare_exchange) (UTYPE *mpt
- {
- UTYPE oldval;
- UWORD magic;
-- bool ret = false;
-+ bool ret;
-
- pre_seq_barrier (smodel);
- magic = protect_start (mptr);
-
- oldval = *mptr;
-- if (oldval == *eptr)
-- {
-- *mptr = newval;
-- ret = true;
-- }
-- *eptr = oldval;
-+ ret = (oldval == *eptr);
-+ if (ret)
-+ *mptr = newval;
-+ else
-+ *eptr = oldval;
-
- protect_end (mptr, magic);
- post_seq_barrier (smodel);
diff --git a/SOURCES/gcc48-pr60274.patch b/SOURCES/gcc48-pr60274.patch
deleted file mode 100644
index 63f277c..0000000
--- a/SOURCES/gcc48-pr60274.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-2014-02-20 Jason Merrill
-
- PR c++/60274
- * g++.dg/template/ref7.C: New test.
-
---- gcc/testsuite/g++.dg/template/ref7.C (revision 0)
-+++ gcc/testsuite/g++.dg/template/ref7.C (revision 207978)
-@@ -0,0 +1,16 @@
-+// PR c++/60274
-+
-+typedef const char *const& ProtocolIdType;
-+
-+template
-+struct C {
-+ typedef int ProtocolVersion;
-+ struct D {
-+ ProtocolVersion GetProtocolVersion();
-+ };
-+};
-+template
-+typename C::ProtocolVersion C::D::GetProtocolVersion()
-+{
-+ return 1;
-+}
diff --git a/SOURCES/gcc48-pr61801.patch b/SOURCES/gcc48-pr61801.patch
deleted file mode 100644
index b75696e..0000000
--- a/SOURCES/gcc48-pr61801.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-2014-07-17 Richard Biener
-
- PR rtl-optimization/61801
- * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
- ASM_INPUT don't set reg_pending_barrier if it appears in a
- debug-insn.
-
-2014-08-06 Jakub Jelinek
-
- PR rtl-optimization/61801
- * gcc.target/i386/pr61801.c: Rewritten.
-
-2014-07-28 Richard Biener
-
- PR rtl-optimization/61801
- * gcc.target/i386/pr61801.c: Fix testcase.
-
-2014-07-28 Richard Biener
-
- PR rtl-optimization/61801
- * gcc.target/i386/pr61801.c: New testcase.
-
---- gcc/sched-deps.c (revision 212737)
-+++ gcc/sched-deps.c (revision 212738)
-@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps,
- Consider for instance a volatile asm that changes the fpu rounding
- mode. An insn should not be moved across this even if it only uses
- pseudo-regs because it might give an incorrectly rounded result. */
-- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ && !DEBUG_INSN_P (insn))
- reg_pending_barrier = TRUE_BARRIER;
-
- /* For all ASM_OPERANDS, we must traverse the vector of input operands.
---- gcc/testsuite/gcc.target/i386/pr61801.c (revision 0)
-+++ gcc/testsuite/gcc.target/i386/pr61801.c (revision 213654)
-@@ -0,0 +1,21 @@
-+/* PR rtl-optimization/61801 */
-+/* { dg-do compile } */
-+/* { dg-options "-Os -fcompare-debug" } */
-+
-+int a, c;
-+int bar (void);
-+void baz (void);
-+
-+void
-+foo (void)
-+{
-+ int d;
-+ if (bar ())
-+ {
-+ int e;
-+ baz ();
-+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
-+ d = e;
-+ }
-+ c = d;
-+}
diff --git a/SOURCES/gcc48-pr63284.patch b/SOURCES/gcc48-pr63284.patch
new file mode 100644
index 0000000..592e000
--- /dev/null
+++ b/SOURCES/gcc48-pr63284.patch
@@ -0,0 +1,78 @@
+2014-09-17 Jakub Jelinek
+
+ PR debug/63284
+ * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
+ if there are only debug stmts after the noreturn call, instead
+ remove the debug stmts.
+
+ * gcc.dg/pr63284.c: New test.
+
+--- gcc/tree-cfgcleanup.c (revision 215332)
++++ gcc/tree-cfgcleanup.c (revision 215333)
+@@ -498,7 +498,20 @@ fixup_noreturn_call (gimple stmt)
+
+ /* First split basic block if stmt is not last. */
+ if (stmt != gsi_stmt (gsi_last_bb (bb)))
+- split_block (bb, stmt);
++ {
++ if (stmt == gsi_stmt (gsi_last_nondebug_bb (bb)))
++ {
++ /* Don't split if there are only debug stmts
++ after stmt, that can result in -fcompare-debug
++ failures. Remove the debug stmts instead,
++ they should be all unreachable anyway. */
++ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
++ for (gsi_next (&gsi); !gsi_end_p (gsi); )
++ gsi_remove (&gsi, true);
++ }
++ else
++ split_block (bb, stmt);
++ }
+
+ changed |= remove_fallthru_edge (bb->succs);
+
+--- gcc/testsuite/gcc.dg/pr63284.c (revision 0)
++++ gcc/testsuite/gcc.dg/pr63284.c (revision 215333)
+@@ -0,0 +1,42 @@
++/* PR debug/63284 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -fcompare-debug" } */
++
++int a[10], *b, *d, c, f;
++int fn2 (void);
++void fn3 (void);
++void fn4 (int);
++
++static int
++fn1 (int x)
++{
++ int e = a[0];
++ if (e)
++ return 1;
++ if (b)
++ switch (x)
++ {
++ case 1:
++ if (d)
++ e = fn2 ();
++ else
++ fn3 ();
++ break;
++ case 0:
++ if (d)
++ {
++ fn3 ();
++ if (c)
++ fn4 (1);
++ }
++ else
++ fn4 (0);
++ }
++ return e;
++}
++
++void
++fn6 (void)
++{
++ f = fn1 (0);
++}
diff --git a/SOURCES/gcc48-pr63341.patch b/SOURCES/gcc48-pr63341.patch
new file mode 100644
index 0000000..0d1d249
--- /dev/null
+++ b/SOURCES/gcc48-pr63341.patch
@@ -0,0 +1,224 @@
+2014-09-25 Jakub Jelinek
+
+ PR tree-optimization/63341
+ * tree-vectorizer.h (vect_create_data_ref_ptr,
+ vect_create_addr_base_for_vector_ref): Add another tree argument
+ defaulting to NULL_TREE.
+ * tree-vect-data-refs.c (vect_create_data_ref_ptr): Add byte_offset
+ argument, pass it down to vect_create_addr_base_for_vector_ref.
+ (vect_create_addr_base_for_vector_ref): Add byte_offset argument,
+ add that to base_offset too if non-NULL.
+ * tree-vect-stmts.c (vectorizable_load): Add byte_offset variable,
+ for dr_explicit_realign_optimized set it to vector byte size
+ - 1 instead of setting offset, pass byte_offset down to
+ vect_create_data_ref_ptr.
+
+ * gcc.dg/vect/pr63341-1.c: New test.
+ * gcc.dg/vect/pr63341-2.c: New test.
+
+--- gcc/tree-vectorizer.h (revision 215586)
++++ gcc/tree-vectorizer.h (revision 215587)
+@@ -931,7 +931,8 @@ extern tree vect_check_gather (gimple, l
+ extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
+ extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
+ tree *, gimple_stmt_iterator *,
+- gimple *, bool, bool *);
++ gimple *, bool, bool *,
++ tree = NULL_TREE);
+ extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
+ extern tree vect_create_destination_var (tree, tree);
+ extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT);
+@@ -949,7 +950,8 @@ extern void vect_record_grouped_load_vec
+ extern int vect_get_place_in_interleaving_chain (gimple, gimple);
+ extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
+ extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
+- tree, struct loop *);
++ tree, struct loop *,
++ tree = NULL_TREE);
+
+ /* In tree-vect-loop.c. */
+ /* FORNOW: Used in tree-parloops.c. */
+--- gcc/tree-vect-data-refs.c (revision 215586)
++++ gcc/tree-vect-data-refs.c (revision 215587)
+@@ -3553,6 +3553,9 @@ vect_get_new_vect_var (tree type, enum v
+ is as follows:
+ if LOOP=i_loop: &in (relative to i_loop)
+ if LOOP=j_loop: &in+i*2B (relative to j_loop)
++ BYTE_OFFSET: Optional, defaulted to NULL. If supplied, it is added to the
++ initial address. Unlike OFFSET, which is number of elements to
++ be added, BYTE_OFFSET is measured in bytes.
+
+ Output:
+ 1. Return an SSA_NAME whose value is the address of the memory location of
+@@ -3566,7 +3569,8 @@ tree
+ vect_create_addr_base_for_vector_ref (gimple stmt,
+ gimple_seq *new_stmt_list,
+ tree offset,
+- struct loop *loop)
++ struct loop *loop,
++ tree byte_offset)
+ {
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
+@@ -3628,6 +3632,16 @@ vect_create_addr_base_for_vector_ref (gi
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
+ gimple_seq_add_seq (new_stmt_list, seq);
+ }
++ if (byte_offset)
++ {
++ tree tmp = create_tmp_var (sizetype, "offset");
++
++ byte_offset = fold_convert (sizetype, byte_offset);
++ base_offset = fold_build2 (PLUS_EXPR, sizetype,
++ base_offset, byte_offset);
++ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
++ gimple_seq_add_seq (new_stmt_list, seq);
++ }
+
+ /* base + base_offset */
+ if (loop_vinfo)
+@@ -3692,6 +3706,10 @@ vect_create_addr_base_for_vector_ref (gi
+ 5. BSI: location where the new stmts are to be placed if there is no loop
+ 6. ONLY_INIT: indicate if ap is to be updated in the loop, or remain
+ pointing to the initial address.
++ 7. BYTE_OFFSET (optional, defaults to NULL): a byte offset to be added
++ to the initial address accessed by the data-ref in STMT. This is
++ similar to OFFSET, but OFFSET is counted in elements, while BYTE_OFFSET
++ in bytes.
+
+ Output:
+ 1. Declare a new ptr to vector_type, and have it point to the base of the
+@@ -3705,6 +3723,8 @@ vect_create_addr_base_for_vector_ref (gi
+ initial_address = &a[init];
+ if OFFSET is supplied:
+ initial_address = &a[init + OFFSET];
++ if BYTE_OFFSET is supplied:
++ initial_address = &a[init] + BYTE_OFFSET;
+
+ Return the initial_address in INITIAL_ADDRESS.
+
+@@ -3722,7 +3742,7 @@ tree
+ vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
+ tree offset, tree *initial_address,
+ gimple_stmt_iterator *gsi, gimple *ptr_incr,
+- bool only_init, bool *inv_p)
++ bool only_init, bool *inv_p, tree byte_offset)
+ {
+ const char *base_name;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+@@ -3881,10 +3901,10 @@ vect_create_data_ref_ptr (gimple stmt, t
+ /* (2) Calculate the initial address of the aggregate-pointer, and set
+ the aggregate-pointer to point to it before the loop. */
+
+- /* Create: (&(base[init_val+offset]) in the loop preheader. */
++ /* Create: (&(base[init_val+offset]+byte_offset) in the loop preheader. */
+
+ new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
+- offset, loop);
++ offset, loop, byte_offset);
+ if (new_stmt_list)
+ {
+ if (pe)
+--- gcc/tree-vect-stmts.c (revision 215586)
++++ gcc/tree-vect-stmts.c (revision 215587)
+@@ -4319,6 +4319,7 @@ vectorizable_load (gimple stmt, gimple_s
+ int i, j, group_size;
+ tree msq = NULL_TREE, lsq;
+ tree offset = NULL_TREE;
++ tree byte_offset = NULL_TREE;
+ tree realignment_token = NULL_TREE;
+ gimple phi = NULL;
+ vec dr_chain = vNULL;
+@@ -4934,7 +4935,8 @@ vectorizable_load (gimple stmt, gimple_s
+ if (alignment_support_scheme == dr_explicit_realign_optimized)
+ {
+ phi = SSA_NAME_DEF_STMT (msq);
+- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
++ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
++ size_one_node);
+ }
+ }
+ else
+@@ -4955,7 +4957,8 @@ vectorizable_load (gimple stmt, gimple_s
+ if (j == 0)
+ dataref_ptr = vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
+ offset, &dummy, gsi,
+- &ptr_incr, false, &inv_p);
++ &ptr_incr, false, &inv_p,
++ byte_offset);
+ else
+ dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
+ TYPE_SIZE_UNIT (aggr_type));
+--- gcc/testsuite/gcc.dg/vect/pr63341-1.c (revision 0)
++++ gcc/testsuite/gcc.dg/vect/pr63341-1.c (revision 215587)
+@@ -0,0 +1,32 @@
++/* PR tree-optimization/63341 */
++/* { dg-do run } */
++
++#include "tree-vect.h"
++
++typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
++struct S { char e __attribute__((aligned (64))); U s[32]; };
++struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
++ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
++ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
++ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
++unsigned short d[32] = { 1 };
++
++__attribute__((noinline, noclone)) void
++foo ()
++{
++ int i;
++ for (i = 0; i < 32; i++)
++ d[i] = t.s[i].s;
++ if (__builtin_memcmp (d, t.s, sizeof d))
++ abort ();
++}
++
++int
++main ()
++{
++ check_vect ();
++ foo ();
++ return 0;
++}
++
++/* { dg-final { cleanup-tree-dump "vect" } } */
+--- gcc/testsuite/gcc.dg/vect/pr63341-2.c (revision 0)
++++ gcc/testsuite/gcc.dg/vect/pr63341-2.c (revision 215587)
+@@ -0,0 +1,35 @@
++/* PR tree-optimization/63341 */
++/* { dg-do run } */
++
++#include "tree-vect.h"
++
++typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
++struct S { char e __attribute__((aligned (64))); U s[32]; };
++struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
++ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
++ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
++ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
++unsigned short d[32] = { 1 };
++
++__attribute__((noinline, noclone)) void
++foo ()
++{
++ int i;
++ for (i = 0; i < 32; i++)
++ d[i] = t.s[i].s + 4;
++ for (i = 0; i < 32; i++)
++ if (d[i] != t.s[i].s + 4)
++ abort ();
++ else
++ asm volatile ("" : : : "memory");
++}
++
++int
++main ()
++{
++ check_vect ();
++ foo ();
++ return 0;
++}
++
++/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/SOURCES/gcc48-rh1121077.patch b/SOURCES/gcc48-rh1121077.patch
deleted file mode 100644
index a610217..0000000
--- a/SOURCES/gcc48-rh1121077.patch
+++ /dev/null
@@ -1,5990 +0,0 @@
-2014-08-04 Jakub Jelinek
-
- * task.c (GOMP_taskgroup_end): If taskgroup->num_children
- is not zero, but taskgroup->children is NULL and there are
- any task->children, schedule those instead of waiting.
-
-2014-08-01 Jakub Jelinek
-
- * libgomp.h (struct gomp_task_depend_entry): Add redundant_out field.
- (struct gomp_taskwait): New type.
- (struct gomp_task): Add taskwait and parent_depends_on, remove
- in_taskwait and taskwait_sem fields.
- (gomp_finish_task): Don't destroy taskwait_sem.
- * task.c (gomp_init_task): Don't init in_taskwait, instead init
- taskwait and parent_depends_on.
- (GOMP_task): For if (0) tasks with depend clause that depend on
- earlier tasks don't defer them, instead call
- gomp_task_maybe_wait_for_dependencies to wait for the dependencies.
- Initialize redundant_out field, for redundant out entries just
- move them at the end of linked list instead of removing them
- completely, and set redundant_out flag instead of redundant.
- (gomp_task_run_pre): Update last_parent_depends_on if scheduling
- that task.
- (gomp_task_run_post_handle_dependers): If parent is in
- gomp_task_maybe_wait_for_dependencies and newly runnable task
- is not parent_depends_on, queue it in parent->children linked
- list after all runnable tasks with parent_depends_on set.
- Adjust for addition of taskwait indirection.
- (gomp_task_run_post_remove_parent): If parent is in
- gomp_task_maybe_wait_for_dependencies and task to be removed
- is parent_depends_on, decrement n_depend and if needed awake
- parent. Adjust for addition of taskwait indirection.
- (GOMP_taskwait): Adjust for addition of taskwait indirection.
- (gomp_task_maybe_wait_for_dependencies): New function.
-
-2013-10-14 Jakub Jelinek
-
- * env.c (parse_bind_var): Initialize value to avoid
- (false positive) warning.
-
-2013-10-12 Jakub Jelinek
-
- PR libgomp/58691
- * config/linux/proc.c (gomp_cpuset_popcount): Add unused attribute
- to check variable.
- (gomp_init_num_threads): Move i variable declaration into
- #ifdef CPU_ALLOC_SIZE block.
- * config/linux/affinity.c (gomp_affinity_init_level): Test
- gomp_places_list_len == 0 rather than gomp_places_list == 0
- when checking for topology reading error.
- * team.c (gomp_team_start): Don't handle bind == omp_proc_bind_false.
- * env.c (parse_affinity): Add ignore argument, if true, don't populate
- gomp_places_list, only parse env var and always return false.
- (parse_places_var): Likewise. Don't check gomp_global_icv.bind_var.
- (initialize_env): Always parse OMP_PLACES and GOMP_CPU_AFFINITY env
- vars, default to OMP_PROC_BIND=true if OMP_PROC_BIND wasn't specified
- and either of these variables were parsed correctly into a places
- list.
-
-2013-10-11 Thomas Schwinge
-
- * testsuite/libgomp.c/lib-1.c (main): Add missing error check.
- * testsuite/libgomp.fortran/lib1.f90: Likewise.
- * testsuite/libgomp.fortran/lib2.f: Likewise.
- * testsuite/libgomp.fortran/lib3.f: Likewise.
-
-2013-10-11 Jakub Jelinek
- Tobias Burnus
- Richard Henderson
-
- * target.c: New file.
- * Makefile.am (libgomp_la_SOURCES): Add target.c.
- * Makefile.in: Regenerated.
- * libgomp_g.h (GOMP_task): Add depend argument.
- (GOMP_barrier_cancel, GOMP_loop_end_cancel,
- GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
- GOMP_target_end_data, GOMP_target_update, GOMP_teams,
- GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
- GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
- GOMP_parallel, GOMP_cancel, GOMP_cancellation_point,
- GOMP_taskgroup_start, GOMP_taskgroup_end,
- GOMP_parallel_sections): New prototypes.
- * fortran.c (omp_is_initial_device): Add ialias_redirect.
- (omp_is_initial_device_): New function.
- (ULP, STR1, STR2, ialias_redirect): Removed.
- (omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
- omp_set_default_device_8_, omp_get_default_device_,
- omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
- functions.
- * libgomp.map (GOMP_barrier_cancel, GOMP_loop_end_cancel,
- GOMP_sections_end_cancel, GOMP_target, GOMP_target_data,
- GOMP_target_end_data, GOMP_target_update, GOMP_teams): Export
- @@GOMP_4.0.
- (omp_is_initial_device, omp_is_initial_device_, omp_get_cancellation,
- omp_get_cancellation_, omp_get_proc_bind, omp_get_proc_bind_,
- omp_set_default_device, omp_set_default_device_,
- omp_set_default_device_8_, omp_get_default_device,
- omp_get_default_device_, omp_get_num_devices, omp_get_num_devices_,
- omp_get_num_teams, omp_get_num_teams_, omp_get_team_num,
- omp_get_team_num_): Export @@OMP_4.0.
- * team.c (struct gomp_thread_start_data): Add place field.
- (gomp_thread_start): Clear thr->thread_pool and
- thr->task before returning. Use gomp_team_barrier_wait_final
- instead of gomp_team_barrier_wait. Initialize thr->place.
- (gomp_new_team): Initialize work_shares_to_free, work_share_cancelled,
- team_cancelled and task_queued_count fields.
- (gomp_free_pool_helper): Clear thr->thread_pool and thr->task
- before calling pthread_exit.
- (gomp_free_thread): No longer static. Use
- gomp_managed_threads_lock instead of gomp_remaining_threads_lock.
- (gomp_team_start): Add flags argument. Set
- thr->thread_pool->threads_busy to nthreads immediately after creating
- new pool. Use gomp_managed_threads_lock instead of
- gomp_remaining_threads_lock. Handle OpenMP 4.0 affinity.
- (gomp_team_end): Use gomp_managed_threads_lock instead of
- gomp_remaining_threads_lock. Use gomp_team_barrier_wait_final instead
- of gomp_team_barrier_wait. If team->team_cancelled, call
- gomp_fini_worshare on ws chain starting at team->work_shares_to_free
- rather than thr->ts.work_share.
- (initialize_team): Don't call gomp_sem_init here.
- * sections.c (GOMP_parallel_sections_start): Adjust gomp_team_start
- caller.
- (GOMP_parallel_sections, GOMP_sections_end_cancel): New functions.
- * env.c (gomp_global_icv): Add default_device_var, target_data and
- bind_var initializers.
- (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
- (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
- gomp_places_list_len): New variables.
- (parse_bind_var, parse_one_place, parse_places_var): New functions.
- (parse_affinity): Rewritten to construct OMP_PLACES list with unit
- sized places.
- (gomp_cancel_var): New global variable.
- (parse_int): New function.
- (handle_omp_display_env): New function.
- (initialize_env): Use it. Initialize default_device_var.
- Parse OMP_CANCELLATION env var. Use parse_bind_var to parse
- OMP_PROC_BIND instead of parse_boolean. Use parse_places_var for
- OMP_PLACES parsing. Don't call parse_affinity if OMP_PLACES has
- been successfully parsed (and call gomp_init_affinity in that case).
- (omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
- omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
- omp_get_team_num, omp_is_initial_device): New functions.
- * libgomp.h: Include stdlib.h.
- (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect, ialias_call):
- Define.
- (struct target_mem_desc): Forward declare.
- (struct gomp_task_icv): Add default_device_var, target_data, bind_var
- and thread_limit_var fields.
- (gomp_get_num_devices): New prototype.
- (gomp_cancel_var): New extern decl.
- (struct gomp_team): Add work_shares_to_free, work_share_cancelled,
- team_cancelled and task_queued_count fields. Add comments about
- task_{,queued_,running_}count.
- (gomp_cancel_kind): New enum.
- (gomp_work_share_end_cancel): New prototype.
- (struct gomp_task): Add next_taskgroup, prev_taskgroup, taskgroup,
- copy_ctors_done, dependers, depend_hash, depend_count, num_dependees
- and depend fields.
- (struct gomp_taskgroup): New type.
- (struct gomp_task_depend_entry,
- struct gomp_dependers_vec): New types.
- (gomp_finish_task): Free depend_hash if non-NULL.
- (struct gomp_team_state): Add place_partition_off
- and place_partition_len fields.
- (gomp_bind_var_list, gomp_bind_var_list_len, gomp_places_list,
- gomp_places_list_len): New extern decls.
- (struct gomp_thread): Add place field.
- (gomp_cpu_affinity, gomp_cpu_affinity_len): Remove.
- (gomp_init_thread_affinity): Add place argument.
- (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
- gomp_affinity_remove_cpu, gomp_affinity_copy_place,
- gomp_affinity_same_place, gomp_affinity_finalize_place_list,
- gomp_affinity_init_level, gomp_affinity_print_place): New
- prototypes.
- (gomp_team_start): Add flags argument.
- (gomp_thread_limit_var, gomp_remaining_threads_count,
- gomp_remaining_threads_lock): Remove.
- (gomp_managed_threads_lock): New variable.
- (struct gomp_thread_pool): Add threads_busy field.
- (gomp_free_thread): New prototype.
- * task.c: Include hashtab.h.
- (hash_entry_type): New typedef.
- (htab_alloc, htab_free, htab_hash, htab_eq): New inlines.
- (gomp_init_task): Clear dependers, depend_hash, depend_count,
- copy_ctors_done and taskgroup fields.
- (GOMP_task): Add depend argument, handle depend clauses. If
- gomp_team_barrier_cancelled or if it's taskgroup has been
- cancelled, don't queue or start new tasks. Set copy_ctors_done
- field if needed. Initialize taskgroup field. If copy_ctors_done
- and already cancelled, don't discard the task. If taskgroup is
- non-NULL, enqueue the task into taskgroup queue. Increment
- num_children field in taskgroup. Increment task_queued_count.
- (gomp_task_run_pre, gomp_task_run_post_remove_parent,
- gomp_task_run_post_remove_taskgroup): New inline functions.
- (gomp_task_run_post_handle_depend_hash,
- gomp_task_run_post_handle_dependers,
- gomp_task_run_post_handle_depend): New functions.
- (GOMP_taskwait): Use them. If more than one new tasks
- have been queued, wake other threads if needed.
- (gomp_barrier_handle_tasks): Likewise. If
- gomp_team_barrier_cancelled, don't start any new tasks, just free
- all tasks.
- (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
- * loop.c (gomp_parallel_loop_start): Add flags argument, pass it
- through to gomp_team_start.
- (GOMP_parallel_loop_static_start, GOMP_parallel_loop_dynamic_start,
- GOMP_parallel_loop_guided_start, GOMP_parallel_loop_runtime_start):
- Adjust gomp_parallel_loop_start callers.
- (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
- GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
- GOMP_loop_end_cancel): New functions.
- (GOMP_parallel_end): Add ialias_redirect.
- * hashtab.h: New file.
- * work.c (gomp_work_share_end, gomp_work_share_end_nowait): Set
- team->work_shares_to_free to thr->ts.work_share before calling
- free_work_share.
- (gomp_work_share_end_cancel): New function.
- * config/linux/proc.c: Include errno.h.
- (gomp_get_cpuset_size, gomp_cpuset_size, gomp_cpusetp): New variables.
- (gomp_cpuset_popcount): Add cpusetsize argument, use it instead of
- sizeof (cpu_set_t) to determine number of iterations. Fix up check
- extern decl. Use CPU_COUNT_S if available, or CPU_COUNT if
- gomp_cpuset_size is sizeof (cpu_set_t).
- (gomp_init_num_threads): Initialize gomp_cpuset_size,
- gomp_get_cpuset_size and gomp_cpusetp here, use gomp_cpusetp instead
- of &cpuset and pass gomp_cpuset_size instead of sizeof (cpu_set_t)
- to pthread_getaffinity_np. Free and clear gomp_cpusetp if it didn't
- contain any logical CPUs.
- (get_num_procs): Don't call pthread_getaffinity_np if gomp_cpusetp
- is NULL. Use gomp_cpusetp instead of &cpuset and pass
- gomp_get_cpuset_size instead of sizeof (cpu_set_t) to
- pthread_getaffinity_np. Check gomp_places_list instead of
- gomp_cpu_affinity. Adjust gomp_cpuset_popcount caller.
- * config/linux/bar.c (gomp_barrier_wait_end,
- gomp_barrier_wait_last): Use BAR_* defines.
- (gomp_team_barrier_wait_end): Likewise. Clear BAR_CANCELLED
- from state where needed. Set work_share_cancelled to 0 on last
- thread.
- (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel_end,
- gomp_team_barrier_wait_cancel, gomp_team_barrier_cancel): New
- functions.
- * config/linux/proc.h (gomp_cpuset_popcount): Add attribute_hidden.
- Add cpusetsize argument.
- (gomp_cpuset_size, gomp_cpusetp): Declare.
- * config/linux/affinity.c: Include errno.h, stdio.h and string.h.
- (affinity_counter): Remove.
- (CPU_ISSET_S, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S): Define
- if CPU_ALLOC_SIZE isn't defined.
- (gomp_init_affinity): Rewritten, if gomp_places_list is NULL, try
- silently create OMP_PLACES=threads, if it is non-NULL afterwards,
- bind current thread to the first place.
- (gomp_init_thread_affinity): Rewritten. Add place argument, just
- pthread_setaffinity_np to gomp_places_list[place].
- (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
- gomp_affinity_remove_cpu, gomp_affinity_copy_place,
- gomp_affinity_same_place, gomp_affinity_finalize_place_list,
- gomp_affinity_init_level, gomp_affinity_print_place): New functions.
- * config/linux/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
- BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
- (gomp_barrier_t): Add awaited_final field.
- (gomp_barrier_init): Initialize awaited_final field.
- (gomp_team_barrier_wait_final, gomp_team_barrier_wait_cancel,
- gomp_team_barrier_wait_cancel_end, gomp_team_barrier_cancel): New
- prototypes.
- (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit. Use BAR_*
- defines.
- (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final_start,
- gomp_team_barrier_cancelled): New inline functions.
- (gomp_barrier_last_thread,
- gomp_team_barrier_set_task_pending,
- gomp_team_barrier_clear_task_pending,
- gomp_team_barrier_set_waiting_for_tasks,
- gomp_team_barrier_waiting_for_tasks,
- gomp_team_barrier_done): Use BAR_* defines.
- * config/posix/bar.c (gomp_barrier_init): Clear cancellable field.
- (gomp_barrier_wait_end): Use BAR_* defines.
- (gomp_team_barrier_wait_end): Clear BAR_CANCELLED from state.
- Set work_share_cancelled to 0 on last thread, use __atomic_load_n.
- Use BAR_* defines.
- (gomp_team_barrier_wait_cancel_end, gomp_team_barrier_wait_cancel,
- gomp_team_barrier_cancel): New functions.
- * config/posix/affinity.c (gomp_init_thread_affinity): Add place
- argument.
- (gomp_affinity_alloc, gomp_affinity_init_place, gomp_affinity_add_cpus,
- gomp_affinity_remove_cpu, gomp_affinity_copy_place,
- gomp_affinity_same_place, gomp_affinity_finalize_place_list,
- gomp_affinity_init_level, gomp_affinity_print_place): New stubs.
- * config/posix/bar.h (BAR_TASK_PENDING, BAR_WAS_LAST,
- BAR_WAITING_FOR_TASK, BAR_INCR, BAR_CANCELLED): Define.
- (gomp_barrier_t): Add cancellable field.
- (gomp_team_barrier_wait_cancel, gomp_team_barrier_wait_cancel_end,
- gomp_team_barrier_cancel): New prototypes.
- (gomp_barrier_wait_start): Preserve BAR_CANCELLED bit.
- (gomp_barrier_wait_cancel_start, gomp_team_barrier_wait_final,
- gomp_team_barrier_cancelled): New inline functions.
- (gomp_barrier_wait_start, gomp_barrier_last_thread,
- gomp_team_barrier_set_task_pending,
- gomp_team_barrier_clear_task_pending,
- gomp_team_barrier_set_waiting_for_tasks,
- gomp_team_barrier_waiting_for_tasks,
- gomp_team_barrier_done): Use BAR_* defines.
- * barrier.c (GOMP_barrier_cancel): New function.
- * parallel.c (GOMP_parallel, GOMP_cancel, GOMP_cancellation_point):
- New functions.
- (gomp_resolve_num_threads): Adjust for thread_limit now being in
- icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
- infinity. If not nested, just return minimum of max_num_threads
- and icv->thread_limit_var and if thr->thread_pool, set threads_busy
- to the returned value. Otherwise, don't update atomically
- gomp_remaining_threads_count, but instead thr->thread_pool->threads_busy.
- (GOMP_parallel_end): Adjust for thread_limit now being in
- icv->thread_limit_var. Use UINT_MAX instead of ULONG_MAX as
- infinity. Adjust threads_busy in the pool rather than
- gomp_remaining_threads_count. Remember team->nthreads and call
- gomp_team_end before adjusting threads_busy, if not nested
- afterwards, just set it to 1 non-atomically. Add ialias.
- (GOMP_parallel_start): Adjust gomp_team_start caller.
- * testsuite/libgomp.c/atomic-14.c: Add parens to make it valid.
-
---- libgomp/Makefile.am (revision 210461)
-+++ libgomp/Makefile.am (revision 210462)
-@@ -60,7 +60,7 @@ libgomp_la_LINK = $(LINK) $(libgomp_la_L
- libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
- iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
- task.c team.c work.c lock.c mutex.c proc.c sem.c bar.c ptrlock.c \
-- time.c fortran.c affinity.c
-+ time.c fortran.c affinity.c target.c
-
- nodist_noinst_HEADERS = libgomp_f.h
- nodist_libsubinclude_HEADERS = omp.h
---- libgomp/Makefile.in (revision 210461)
-+++ libgomp/Makefile.in (revision 210462)
-@@ -96,7 +96,7 @@ am_libgomp_la_OBJECTS = alloc.lo barrier
- error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo \
- parallel.lo sections.lo single.lo task.lo team.lo work.lo \
- lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo \
-- fortran.lo affinity.lo
-+ fortran.lo affinity.lo target.lo
- libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
- DEFAULT_INCLUDES = -I.@am__isrc@
- depcomp = $(SHELL) $(top_srcdir)/../depcomp
-@@ -317,7 +317,7 @@ libgomp_la_LINK = $(LINK) $(libgomp_la_L
- libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
- iter_ull.c loop.c loop_ull.c ordered.c parallel.c sections.c single.c \
- task.c team.c work.c lock.c mutex.c proc.c sem.c bar.c ptrlock.c \
-- time.c fortran.c affinity.c
-+ time.c fortran.c affinity.c target.c
-
- nodist_noinst_HEADERS = libgomp_f.h
- nodist_libsubinclude_HEADERS = omp.h
-@@ -474,6 +474,7 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sections.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/target.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/team.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Plo@am__quote@
---- libgomp/libgomp_g.h (revision 210461)
-+++ libgomp/libgomp_g.h (revision 210462)
-@@ -33,6 +33,7 @@
- /* barrier.c */
-
- extern void GOMP_barrier (void);
-+extern bool GOMP_barrier_cancel (void);
-
- /* critical.c */
-
-@@ -76,9 +77,22 @@ extern void GOMP_parallel_loop_guided_st
- unsigned, long, long, long, long);
- extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
- unsigned, long, long, long);
-+extern void GOMP_parallel_loop_static (void (*)(void *), void *,
-+ unsigned, long, long, long, long,
-+ unsigned);
-+extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
-+ unsigned, long, long, long, long,
-+ unsigned);
-+extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
-+ unsigned, long, long, long, long,
-+ unsigned);
-+extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
-+ unsigned, long, long, long,
-+ unsigned);
-
- extern void GOMP_loop_end (void);
- extern void GOMP_loop_end_nowait (void);
-+extern bool GOMP_loop_end_cancel (void);
-
- /* loop_ull.c */
-
-@@ -157,13 +171,18 @@ extern void GOMP_ordered_end (void);
-
- extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
- extern void GOMP_parallel_end (void);
-+extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
-+extern bool GOMP_cancel (int, bool);
-+extern bool GOMP_cancellation_point (int);
-
- /* task.c */
-
- extern void GOMP_task (void (*) (void *), void *, void (*) (void *, void *),
-- long, long, bool, unsigned);
-+ long, long, bool, unsigned, void **);
- extern void GOMP_taskwait (void);
- extern void GOMP_taskyield (void);
-+extern void GOMP_taskgroup_start (void);
-+extern void GOMP_taskgroup_end (void);
-
- /* sections.c */
-
-@@ -171,8 +190,11 @@ extern unsigned GOMP_sections_start (uns
- extern unsigned GOMP_sections_next (void);
- extern void GOMP_parallel_sections_start (void (*) (void *), void *,
- unsigned, unsigned);
-+extern void GOMP_parallel_sections (void (*) (void *), void *,
-+ unsigned, unsigned, unsigned);
- extern void GOMP_sections_end (void);
- extern void GOMP_sections_end_nowait (void);
-+extern bool GOMP_sections_end_cancel (void);
-
- /* single.c */
-
-@@ -180,4 +202,15 @@ extern bool GOMP_single_start (void);
- extern void *GOMP_single_copy_start (void);
- extern void GOMP_single_copy_end (void *);
-
-+/* target.c */
-+
-+extern void GOMP_target (int, void (*) (void *), const void *,
-+ size_t, void **, size_t *, unsigned char *);
-+extern void GOMP_target_data (int, const void *,
-+ size_t, void **, size_t *, unsigned char *);
-+extern void GOMP_target_end_data (void);
-+extern void GOMP_target_update (int, const void *,
-+ size_t, void **, size_t *, unsigned char *);
-+extern void GOMP_teams (unsigned int, unsigned int);
-+
- #endif /* LIBGOMP_G_H */
---- libgomp/fortran.c (revision 210461)
-+++ libgomp/fortran.c (revision 210462)
-@@ -31,11 +31,6 @@
-
- #ifdef HAVE_ATTRIBUTE_ALIAS
- /* Use internal aliases if possible. */
--# define ULP STR1(__USER_LABEL_PREFIX__)
--# define STR1(x) STR2(x)
--# define STR2(x) #x
--# define ialias_redirect(fn) \
-- extern __typeof (fn) fn __asm__ (ULP "gomp_ialias_" #fn) attribute_hidden;
- # ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
- ialias_redirect (omp_init_lock)
- ialias_redirect (omp_init_nest_lock)
-@@ -70,6 +65,14 @@ ialias_redirect (omp_get_ancestor_thread
- ialias_redirect (omp_get_team_size)
- ialias_redirect (omp_get_active_level)
- ialias_redirect (omp_in_final)
-+ialias_redirect (omp_get_cancellation)
-+ialias_redirect (omp_get_proc_bind)
-+ialias_redirect (omp_set_default_device)
-+ialias_redirect (omp_get_default_device)
-+ialias_redirect (omp_get_num_devices)
-+ialias_redirect (omp_get_num_teams)
-+ialias_redirect (omp_get_team_num)
-+ialias_redirect (omp_is_initial_device)
- #endif
-
- #ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
-@@ -435,3 +438,57 @@ omp_in_final_ (void)
- {
- return omp_in_final ();
- }
-+
-+int32_t
-+omp_get_cancellation_ (void)
-+{
-+ return omp_get_cancellation ();
-+}
-+
-+int32_t
-+omp_get_proc_bind_ (void)
-+{
-+ return omp_get_proc_bind ();
-+}
-+
-+void
-+omp_set_default_device_ (const int32_t *device_num)
-+{
-+ return omp_set_default_device (*device_num);
-+}
-+
-+void
-+omp_set_default_device_8_ (const int64_t *device_num)
-+{
-+ return omp_set_default_device (TO_INT (*device_num));
-+}
-+
-+int32_t
-+omp_get_default_device_ (void)
-+{
-+ return omp_get_default_device ();
-+}
-+
-+int32_t
-+omp_get_num_devices_ (void)
-+{
-+ return omp_get_num_devices ();
-+}
-+
-+int32_t
-+omp_get_num_teams_ (void)
-+{
-+ return omp_get_num_teams ();
-+}
-+
-+int32_t
-+omp_get_team_num_ (void)
-+{
-+ return omp_get_team_num ();
-+}
-+
-+int32_t
-+omp_is_initial_device_ (void)
-+{
-+ return omp_is_initial_device ();
-+}
---- libgomp/libgomp.map (revision 210461)
-+++ libgomp/libgomp.map (revision 210462)
-@@ -113,6 +113,27 @@ OMP_3.1 {
- omp_in_final_;
- } OMP_3.0;
-
-+OMP_4.0 {
-+ global:
-+ omp_get_cancellation;
-+ omp_get_cancellation_;
-+ omp_get_proc_bind;
-+ omp_get_proc_bind_;
-+ omp_set_default_device;
-+ omp_set_default_device_;
-+ omp_set_default_device_8_;
-+ omp_get_default_device;
-+ omp_get_default_device_;
-+ omp_get_num_devices;
-+ omp_get_num_devices_;
-+ omp_get_num_teams;
-+ omp_get_num_teams_;
-+ omp_get_team_num;
-+ omp_get_team_num_;
-+ omp_is_initial_device;
-+ omp_is_initial_device_;
-+} OMP_3.1;
-+
- GOMP_1.0 {
- global:
- GOMP_atomic_end;
-@@ -184,3 +205,25 @@ GOMP_3.0 {
- global:
- GOMP_taskyield;
- } GOMP_2.0;
-+
-+GOMP_4.0 {
-+ global:
-+ GOMP_barrier_cancel;
-+ GOMP_cancel;
-+ GOMP_cancellation_point;
-+ GOMP_loop_end_cancel;
-+ GOMP_parallel_loop_dynamic;
-+ GOMP_parallel_loop_guided;
-+ GOMP_parallel_loop_runtime;
-+ GOMP_parallel_loop_static;
-+ GOMP_parallel_sections;
-+ GOMP_parallel;
-+ GOMP_sections_end_cancel;
-+ GOMP_taskgroup_start;
-+ GOMP_taskgroup_end;
-+ GOMP_target;
-+ GOMP_target_data;
-+ GOMP_target_end_data;
-+ GOMP_target_update;
-+ GOMP_teams;
-+} GOMP_3.0;
---- libgomp/team.c (revision 210461)
-+++ libgomp/team.c (revision 210462)
-@@ -53,6 +53,7 @@ struct gomp_thread_start_data
- struct gomp_team_state ts;
- struct gomp_task *task;
- struct gomp_thread_pool *thread_pool;
-+ unsigned int place;
- bool nested;
- };
-
-@@ -84,6 +85,7 @@ gomp_thread_start (void *xdata)
- thr->thread_pool = data->thread_pool;
- thr->ts = data->ts;
- thr->task = data->task;
-+ thr->place = data->place;
-
- thr->ts.team->ordered_release[thr->ts.team_id] = &thr->release;
-
-@@ -98,7 +100,7 @@ gomp_thread_start (void *xdata)
- gomp_barrier_wait (&team->barrier);
-
- local_fn (local_data);
-- gomp_team_barrier_wait (&team->barrier);
-+ gomp_team_barrier_wait_final (&team->barrier);
- gomp_finish_task (task);
- gomp_barrier_wait_last (&team->barrier);
- }
-@@ -113,7 +115,7 @@ gomp_thread_start (void *xdata)
- struct gomp_task *task = thr->task;
-
- local_fn (local_data);
-- gomp_team_barrier_wait (&team->barrier);
-+ gomp_team_barrier_wait_final (&team->barrier);
- gomp_finish_task (task);
-
- gomp_barrier_wait (&pool->threads_dock);
-@@ -126,6 +128,8 @@ gomp_thread_start (void *xdata)
- }
-
- gomp_sem_destroy (&thr->release);
-+ thr->thread_pool = NULL;
-+ thr->task = NULL;
- return NULL;
- }
-
-@@ -149,6 +153,7 @@ gomp_new_team (unsigned nthreads)
- #else
- gomp_mutex_init (&team->work_share_list_free_lock);
- #endif
-+ team->work_shares_to_free = &team->work_shares[0];
- gomp_init_work_share (&team->work_shares[0], false, nthreads);
- team->work_shares[0].next_alloc = NULL;
- team->work_share_list_free = NULL;
-@@ -167,7 +172,10 @@ gomp_new_team (unsigned nthreads)
- gomp_mutex_init (&team->task_lock);
- team->task_queue = NULL;
- team->task_count = 0;
-+ team->task_queued_count = 0;
- team->task_running_count = 0;
-+ team->work_share_cancelled = 0;
-+ team->team_cancelled = 0;
-
- return team;
- }
-@@ -199,16 +207,19 @@ static struct gomp_thread_pool *gomp_new
- static void
- gomp_free_pool_helper (void *thread_pool)
- {
-+ struct gomp_thread *thr = gomp_thread ();
- struct gomp_thread_pool *pool
- = (struct gomp_thread_pool *) thread_pool;
- gomp_barrier_wait_last (&pool->threads_dock);
-- gomp_sem_destroy (&gomp_thread ()->release);
-+ gomp_sem_destroy (&thr->release);
-+ thr->thread_pool = NULL;
-+ thr->task = NULL;
- pthread_exit (NULL);
- }
-
- /* Free a thread pool and release its threads. */
-
--static void
-+void
- gomp_free_thread (void *arg __attribute__((unused)))
- {
- struct gomp_thread *thr = gomp_thread ();
-@@ -236,9 +247,9 @@ gomp_free_thread (void *arg __attribute_
- __sync_fetch_and_add (&gomp_managed_threads,
- 1L - pool->threads_used);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
- gomp_managed_threads -= pool->threads_used - 1L;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
- }
- free (pool->threads);
-@@ -259,7 +270,7 @@ gomp_free_thread (void *arg __attribute_
-
- void
- gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
-- struct gomp_team *team)
-+ unsigned flags, struct gomp_team *team)
- {
- struct gomp_thread_start_data *start_data;
- struct gomp_thread *thr, *nthr;
-@@ -270,17 +281,24 @@ gomp_team_start (void (*fn) (void *), vo
- unsigned i, n, old_threads_used = 0;
- pthread_attr_t thread_attr, *attr;
- unsigned long nthreads_var;
-+ char bind, bind_var;
-+ unsigned int s = 0, rest = 0, p = 0, k = 0;
-+ unsigned int affinity_count = 0;
-+ struct gomp_thread **affinity_thr = NULL;
-
- thr = gomp_thread ();
- nested = thr->ts.team != NULL;
- if (__builtin_expect (thr->thread_pool == NULL, 0))
- {
- thr->thread_pool = gomp_new_thread_pool ();
-+ thr->thread_pool->threads_busy = nthreads;
- pthread_setspecific (gomp_thread_destructor, thr);
- }
- pool = thr->thread_pool;
- task = thr->task;
- icv = task ? &task->icv : &gomp_global_icv;
-+ if (__builtin_expect (gomp_places_list != NULL, 0) && thr->place == 0)
-+ gomp_init_affinity ();
-
- /* Always save the previous state, even if this isn't a nested team.
- In particular, we should save any work share state from an outer
-@@ -303,14 +321,90 @@ gomp_team_start (void (*fn) (void *), vo
- if (__builtin_expect (gomp_nthreads_var_list != NULL, 0)
- && thr->ts.level < gomp_nthreads_var_list_len)
- nthreads_var = gomp_nthreads_var_list[thr->ts.level];
-+ bind_var = icv->bind_var;
-+ if (bind_var != omp_proc_bind_false && (flags & 7) != omp_proc_bind_false)
-+ bind_var = flags & 7;
-+ bind = bind_var;
-+ if (__builtin_expect (gomp_bind_var_list != NULL, 0)
-+ && thr->ts.level < gomp_bind_var_list_len)
-+ bind_var = gomp_bind_var_list[thr->ts.level];
- gomp_init_task (thr->task, task, icv);
- team->implicit_task[0].icv.nthreads_var = nthreads_var;
-+ team->implicit_task[0].icv.bind_var = bind_var;
-
- if (nthreads == 1)
- return;
-
- i = 1;
-
-+ if (__builtin_expect (gomp_places_list != NULL, 0))
-+ {
-+ /* Depending on chosen proc_bind model, set subpartition
-+ for the master thread and initialize helper variables
-+ P and optionally S, K and/or REST used by later place
-+ computation for each additional thread. */
-+ p = thr->place - 1;
-+ switch (bind)
-+ {
-+ case omp_proc_bind_true:
-+ case omp_proc_bind_close:
-+ if (nthreads > thr->ts.place_partition_len)
-+ {
-+ /* T > P. S threads will be placed in each place,
-+ and the final REM threads placed one by one
-+ into the already occupied places. */
-+ s = nthreads / thr->ts.place_partition_len;
-+ rest = nthreads % thr->ts.place_partition_len;
-+ }
-+ else
-+ s = 1;
-+ k = 1;
-+ break;
-+ case omp_proc_bind_master:
-+ /* Each thread will be bound to master's place. */
-+ break;
-+ case omp_proc_bind_spread:
-+ if (nthreads <= thr->ts.place_partition_len)
-+ {
-+ /* T <= P. Each subpartition will have in between s
-+ and s+1 places (subpartitions starting at or
-+ after rest will have s places, earlier s+1 places),
-+ each thread will be bound to the first place in
-+ its subpartition (except for the master thread
-+ that can be bound to another place in its
-+ subpartition). */
-+ s = thr->ts.place_partition_len / nthreads;
-+ rest = thr->ts.place_partition_len % nthreads;
-+ rest = (s + 1) * rest + thr->ts.place_partition_off;
-+ if (p < rest)
-+ {
-+ p -= (p - thr->ts.place_partition_off) % (s + 1);
-+ thr->ts.place_partition_len = s + 1;
-+ }
-+ else
-+ {
-+ p -= (p - rest) % s;
-+ thr->ts.place_partition_len = s;
-+ }
-+ thr->ts.place_partition_off = p;
-+ }
-+ else
-+ {
-+ /* T > P. Each subpartition will have just a single
-+ place and we'll place between s and s+1
-+ threads into each subpartition. */
-+ s = nthreads / thr->ts.place_partition_len;
-+ rest = nthreads % thr->ts.place_partition_len;
-+ thr->ts.place_partition_off = p;
-+ thr->ts.place_partition_len = 1;
-+ k = 1;
-+ }
-+ break;
-+ }
-+ }
-+ else
-+ bind = omp_proc_bind_false;
-+
- /* We only allow the reuse of idle threads for non-nested PARALLEL
- regions. This appears to be implied by the semantics of
- threadprivate variables, but perhaps that's reading too much into
-@@ -341,47 +435,244 @@ gomp_team_start (void (*fn) (void *), vo
- team will exit. */
- pool->threads_used = nthreads;
-
-+ /* If necessary, expand the size of the gomp_threads array. It is
-+ expected that changes in the number of threads are rare, thus we
-+ make no effort to expand gomp_threads_size geometrically. */
-+ if (nthreads >= pool->threads_size)
-+ {
-+ pool->threads_size = nthreads + 1;
-+ pool->threads
-+ = gomp_realloc (pool->threads,
-+ pool->threads_size
-+ * sizeof (struct gomp_thread_data *));
-+ }
-+
- /* Release existing idle threads. */
- for (; i < n; ++i)
- {
-- nthr = pool->threads[i];
-+ unsigned int place_partition_off = thr->ts.place_partition_off;
-+ unsigned int place_partition_len = thr->ts.place_partition_len;
-+ unsigned int place = 0;
-+ if (__builtin_expect (gomp_places_list != NULL, 0))
-+ {
-+ switch (bind)
-+ {
-+ case omp_proc_bind_true:
-+ case omp_proc_bind_close:
-+ if (k == s)
-+ {
-+ ++p;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ k = 1;
-+ if (i == nthreads - rest)
-+ s = 1;
-+ }
-+ else
-+ ++k;
-+ break;
-+ case omp_proc_bind_master:
-+ break;
-+ case omp_proc_bind_spread:
-+ if (k == 0)
-+ {
-+ /* T <= P. */
-+ if (p < rest)
-+ p += s + 1;
-+ else
-+ p += s;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ place_partition_off = p;
-+ if (p < rest)
-+ place_partition_len = s + 1;
-+ else
-+ place_partition_len = s;
-+ }
-+ else
-+ {
-+ /* T > P. */
-+ if (k == s)
-+ {
-+ ++p;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ k = 1;
-+ if (i == nthreads - rest)
-+ s = 1;
-+ }
-+ else
-+ ++k;
-+ place_partition_off = p;
-+ place_partition_len = 1;
-+ }
-+ break;
-+ }
-+ if (affinity_thr != NULL
-+ || (bind != omp_proc_bind_true
-+ && pool->threads[i]->place != p + 1)
-+ || pool->threads[i]->place <= place_partition_off
-+ || pool->threads[i]->place > (place_partition_off
-+ + place_partition_len))
-+ {
-+ unsigned int l;
-+ if (affinity_thr == NULL)
-+ {
-+ unsigned int j;
-+
-+ if (team->prev_ts.place_partition_len > 64)
-+ affinity_thr
-+ = gomp_malloc (team->prev_ts.place_partition_len
-+ * sizeof (struct gomp_thread *));
-+ else
-+ affinity_thr
-+ = gomp_alloca (team->prev_ts.place_partition_len
-+ * sizeof (struct gomp_thread *));
-+ memset (affinity_thr, '\0',
-+ team->prev_ts.place_partition_len
-+ * sizeof (struct gomp_thread *));
-+ for (j = i; j < old_threads_used; j++)
-+ {
-+ if (pool->threads[j]->place
-+ > team->prev_ts.place_partition_off
-+ && (pool->threads[j]->place
-+ <= (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len)))
-+ {
-+ l = pool->threads[j]->place - 1
-+ - team->prev_ts.place_partition_off;
-+ pool->threads[j]->data = affinity_thr[l];
-+ affinity_thr[l] = pool->threads[j];
-+ }
-+ pool->threads[j] = NULL;
-+ }
-+ if (nthreads > old_threads_used)
-+ memset (&pool->threads[old_threads_used],
-+ '\0', ((nthreads - old_threads_used)
-+ * sizeof (struct gomp_thread *)));
-+ n = nthreads;
-+ affinity_count = old_threads_used - i;
-+ }
-+ if (affinity_count == 0)
-+ break;
-+ l = p;
-+ if (affinity_thr[l - team->prev_ts.place_partition_off]
-+ == NULL)
-+ {
-+ if (bind != omp_proc_bind_true)
-+ continue;
-+ for (l = place_partition_off;
-+ l < place_partition_off + place_partition_len;
-+ l++)
-+ if (affinity_thr[l - team->prev_ts.place_partition_off]
-+ != NULL)
-+ break;
-+ if (l == place_partition_off + place_partition_len)
-+ continue;
-+ }
-+ nthr = affinity_thr[l - team->prev_ts.place_partition_off];
-+ affinity_thr[l - team->prev_ts.place_partition_off]
-+ = (struct gomp_thread *) nthr->data;
-+ affinity_count--;
-+ pool->threads[i] = nthr;
-+ }
-+ else
-+ nthr = pool->threads[i];
-+ place = p + 1;
-+ }
-+ else
-+ nthr = pool->threads[i];
- nthr->ts.team = team;
- nthr->ts.work_share = &team->work_shares[0];
- nthr->ts.last_work_share = NULL;
- nthr->ts.team_id = i;
- nthr->ts.level = team->prev_ts.level + 1;
- nthr->ts.active_level = thr->ts.active_level;
-+ nthr->ts.place_partition_off = place_partition_off;
-+ nthr->ts.place_partition_len = place_partition_len;
- #ifdef HAVE_SYNC_BUILTINS
- nthr->ts.single_count = 0;
- #endif
- nthr->ts.static_trip = 0;
- nthr->task = &team->implicit_task[i];
-+ nthr->place = place;
- gomp_init_task (nthr->task, task, icv);
- team->implicit_task[i].icv.nthreads_var = nthreads_var;
-+ team->implicit_task[i].icv.bind_var = bind_var;
- nthr->fn = fn;
- nthr->data = data;
- team->ordered_release[i] = &nthr->release;
- }
-
-+ if (__builtin_expect (affinity_thr != NULL, 0))
-+ {
-+ /* If AFFINITY_THR is non-NULL just because we had to
-+ permute some threads in the pool, but we've managed
-+ to find exactly as many old threads as we'd find
-+ without affinity, we don't need to handle this
-+ specially anymore. */
-+ if (nthreads <= old_threads_used
-+ ? (affinity_count == old_threads_used - nthreads)
-+ : (i == old_threads_used))
-+ {
-+ if (team->prev_ts.place_partition_len > 64)
-+ free (affinity_thr);
-+ affinity_thr = NULL;
-+ affinity_count = 0;
-+ }
-+ else
-+ {
-+ i = 1;
-+ /* We are going to compute the places/subpartitions
-+ again from the beginning. So, we need to reinitialize
-+ vars modified by the switch (bind) above inside
-+ of the loop, to the state they had after the initial
-+ switch (bind). */
-+ switch (bind)
-+ {
-+ case omp_proc_bind_true:
-+ case omp_proc_bind_close:
-+ if (nthreads > thr->ts.place_partition_len)
-+ /* T > P. S has been changed, so needs
-+ to be recomputed. */
-+ s = nthreads / thr->ts.place_partition_len;
-+ k = 1;
-+ p = thr->place - 1;
-+ break;
-+ case omp_proc_bind_master:
-+ /* No vars have been changed. */
-+ break;
-+ case omp_proc_bind_spread:
-+ p = thr->ts.place_partition_off;
-+ if (k != 0)
-+ {
-+ /* T > P. */
-+ s = nthreads / team->prev_ts.place_partition_len;
-+ k = 1;
-+ }
-+ break;
-+ }
-+
-+ /* Increase the barrier threshold to make sure all new
-+ threads and all the threads we're going to let die
-+ arrive before the team is released. */
-+ if (affinity_count)
-+ gomp_barrier_reinit (&pool->threads_dock,
-+ nthreads + affinity_count);
-+ }
-+ }
-+
- if (i == nthreads)
- goto do_release;
-
-- /* If necessary, expand the size of the gomp_threads array. It is
-- expected that changes in the number of threads are rare, thus we
-- make no effort to expand gomp_threads_size geometrically. */
-- if (nthreads >= pool->threads_size)
-- {
-- pool->threads_size = nthreads + 1;
-- pool->threads
-- = gomp_realloc (pool->threads,
-- pool->threads_size
-- * sizeof (struct gomp_thread_data *));
-- }
- }
-
-- if (__builtin_expect (nthreads > old_threads_used, 0))
-+ if (__builtin_expect (nthreads + affinity_count > old_threads_used, 0))
- {
-- long diff = (long) nthreads - (long) old_threads_used;
-+ long diff = (long) (nthreads + affinity_count) - (long) old_threads_used;
-
- if (old_threads_used == 0)
- --diff;
-@@ -389,14 +680,14 @@ gomp_team_start (void (*fn) (void *), vo
- #ifdef HAVE_SYNC_BUILTINS
- __sync_fetch_and_add (&gomp_managed_threads, diff);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
- gomp_managed_threads += diff;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
- }
-
- attr = &gomp_thread_attr;
-- if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
-+ if (__builtin_expect (gomp_places_list != NULL, 0))
- {
- size_t stacksize;
- pthread_attr_init (&thread_attr);
-@@ -410,11 +701,78 @@ gomp_team_start (void (*fn) (void *), vo
- * (nthreads-i));
-
- /* Launch new threads. */
-- for (; i < nthreads; ++i, ++start_data)
-+ for (; i < nthreads; ++i)
- {
- pthread_t pt;
- int err;
-
-+ start_data->ts.place_partition_off = thr->ts.place_partition_off;
-+ start_data->ts.place_partition_len = thr->ts.place_partition_len;
-+ start_data->place = 0;
-+ if (__builtin_expect (gomp_places_list != NULL, 0))
-+ {
-+ switch (bind)
-+ {
-+ case omp_proc_bind_true:
-+ case omp_proc_bind_close:
-+ if (k == s)
-+ {
-+ ++p;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ k = 1;
-+ if (i == nthreads - rest)
-+ s = 1;
-+ }
-+ else
-+ ++k;
-+ break;
-+ case omp_proc_bind_master:
-+ break;
-+ case omp_proc_bind_spread:
-+ if (k == 0)
-+ {
-+ /* T <= P. */
-+ if (p < rest)
-+ p += s + 1;
-+ else
-+ p += s;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ start_data->ts.place_partition_off = p;
-+ if (p < rest)
-+ start_data->ts.place_partition_len = s + 1;
-+ else
-+ start_data->ts.place_partition_len = s;
-+ }
-+ else
-+ {
-+ /* T > P. */
-+ if (k == s)
-+ {
-+ ++p;
-+ if (p == (team->prev_ts.place_partition_off
-+ + team->prev_ts.place_partition_len))
-+ p = team->prev_ts.place_partition_off;
-+ k = 1;
-+ if (i == nthreads - rest)
-+ s = 1;
-+ }
-+ else
-+ ++k;
-+ start_data->ts.place_partition_off = p;
-+ start_data->ts.place_partition_len = 1;
-+ }
-+ break;
-+ }
-+ start_data->place = p + 1;
-+ if (affinity_thr != NULL && pool->threads[i] != NULL)
-+ continue;
-+ gomp_init_thread_affinity (attr, p);
-+ }
-+
- start_data->fn = fn;
- start_data->fn_data = data;
- start_data->ts.team = team;
-@@ -430,18 +788,16 @@ gomp_team_start (void (*fn) (void *), vo
- start_data->task = &team->implicit_task[i];
- gomp_init_task (start_data->task, task, icv);
- team->implicit_task[i].icv.nthreads_var = nthreads_var;
-+ team->implicit_task[i].icv.bind_var = bind_var;
- start_data->thread_pool = pool;
- start_data->nested = nested;
-
-- if (gomp_cpu_affinity != NULL)
-- gomp_init_thread_affinity (attr);
--
-- err = pthread_create (&pt, attr, gomp_thread_start, start_data);
-+ err = pthread_create (&pt, attr, gomp_thread_start, start_data++);
- if (err != 0)
- gomp_fatal ("Thread creation failed: %s", strerror (err));
- }
-
-- if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
-+ if (__builtin_expect (gomp_places_list != NULL, 0))
- pthread_attr_destroy (&thread_attr);
-
- do_release:
-@@ -450,21 +806,32 @@ gomp_team_start (void (*fn) (void *), vo
- /* Decrease the barrier threshold to match the number of threads
- that should arrive back at the end of this team. The extra
- threads should be exiting. Note that we arrange for this test
-- to never be true for nested teams. */
-- if (__builtin_expect (nthreads < old_threads_used, 0))
-+ to never be true for nested teams. If AFFINITY_COUNT is non-zero,
-+ the barrier as well as gomp_managed_threads was temporarily
-+ set to NTHREADS + AFFINITY_COUNT. For NTHREADS < OLD_THREADS_COUNT,
-+ AFFINITY_COUNT if non-zero will be always at least
-+ OLD_THREADS_COUNT - NTHREADS. */
-+ if (__builtin_expect (nthreads < old_threads_used, 0)
-+ || __builtin_expect (affinity_count, 0))
- {
- long diff = (long) nthreads - (long) old_threads_used;
-
-+ if (affinity_count)
-+ diff = -affinity_count;
-+
- gomp_barrier_reinit (&pool->threads_dock, nthreads);
-
- #ifdef HAVE_SYNC_BUILTINS
- __sync_fetch_and_add (&gomp_managed_threads, diff);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
- gomp_managed_threads += diff;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
- }
-+ if (__builtin_expect (affinity_thr != NULL, 0)
-+ && team->prev_ts.place_partition_len > 64)
-+ free (affinity_thr);
- }
-
-
-@@ -477,9 +844,26 @@ gomp_team_end (void)
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-
-- /* This barrier handles all pending explicit threads. */
-- gomp_team_barrier_wait (&team->barrier);
-- gomp_fini_work_share (thr->ts.work_share);
-+ /* This barrier handles all pending explicit threads.
-+ As #pragma omp cancel parallel might get awaited count in
-+ team->barrier in a inconsistent state, we need to use a different
-+ counter here. */
-+ gomp_team_barrier_wait_final (&team->barrier);
-+ if (__builtin_expect (team->team_cancelled, 0))
-+ {
-+ struct gomp_work_share *ws = team->work_shares_to_free;
-+ do
-+ {
-+ struct gomp_work_share *next_ws = gomp_ptrlock_get (&ws->next_ws);
-+ if (next_ws == NULL)
-+ gomp_ptrlock_set (&ws->next_ws, ws);
-+ gomp_fini_work_share (ws);
-+ ws = next_ws;
-+ }
-+ while (ws != NULL);
-+ }
-+ else
-+ gomp_fini_work_share (thr->ts.work_share);
-
- gomp_end_task ();
- thr->ts = team->prev_ts;
-@@ -489,9 +873,9 @@ gomp_team_end (void)
- #ifdef HAVE_SYNC_BUILTINS
- __sync_fetch_and_add (&gomp_managed_threads, 1L - team->nthreads);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
- gomp_managed_threads -= team->nthreads - 1L;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
- /* This barrier has gomp_barrier_wait_last counterparts
- and ensures the team can be safely destroyed. */
-@@ -532,8 +916,6 @@ gomp_team_end (void)
- static void __attribute__((constructor))
- initialize_team (void)
- {
-- struct gomp_thread *thr;
--
- #ifndef HAVE_TLS
- static struct gomp_thread initial_thread_tls_data;
-
-@@ -543,13 +925,6 @@ initialize_team (void)
-
- if (pthread_key_create (&gomp_thread_destructor, gomp_free_thread) != 0)
- gomp_fatal ("could not create thread pool destructor.");
--
--#ifdef HAVE_TLS
-- thr = &gomp_tls_data;
--#else
-- thr = &initial_thread_tls_data;
--#endif
-- gomp_sem_init (&thr->release, 0);
- }
-
- static void __attribute__((destructor))
---- libgomp/sections.c (revision 210461)
-+++ libgomp/sections.c (revision 210462)
-@@ -139,11 +139,27 @@ GOMP_parallel_sections_start (void (*fn)
- num_threads = gomp_resolve_num_threads (num_threads, count);
- team = gomp_new_team (num_threads);
- gomp_sections_init (&team->work_shares[0], count);
-- gomp_team_start (fn, data, num_threads, team);
-+ gomp_team_start (fn, data, num_threads, 0, team);
-+}
-+
-+ialias_redirect (GOMP_parallel_end)
-+
-+void
-+GOMP_parallel_sections (void (*fn) (void *), void *data,
-+ unsigned num_threads, unsigned count, unsigned flags)
-+{
-+ struct gomp_team *team;
-+
-+ num_threads = gomp_resolve_num_threads (num_threads, count);
-+ team = gomp_new_team (num_threads);
-+ gomp_sections_init (&team->work_shares[0], count);
-+ gomp_team_start (fn, data, num_threads, flags, team);
-+ fn (data);
-+ GOMP_parallel_end ();
- }
-
- /* The GOMP_section_end* routines are called after the thread is told
-- that all sections are complete. This first version synchronizes
-+ that all sections are complete. The first two versions synchronize
- all threads; the nowait version does not. */
-
- void
-@@ -152,6 +168,12 @@ GOMP_sections_end (void)
- gomp_work_share_end ();
- }
-
-+bool
-+GOMP_sections_end_cancel (void)
-+{
-+ return gomp_work_share_end_cancel ();
-+}
-+
- void
- GOMP_sections_end_nowait (void)
- {
---- libgomp/env.c (revision 210461)
-+++ libgomp/env.c (revision 210462)
-@@ -29,6 +29,10 @@
- #include "libgomp_f.h"
- #include
- #include
-+#include
-+#ifdef HAVE_INTTYPES_H
-+# include /* For PRIu64. */
-+#endif
- #ifdef STRING_WITH_STRINGS
- # include
- # include
-@@ -50,23 +54,28 @@
-
- struct gomp_task_icv gomp_global_icv = {
- .nthreads_var = 1,
-+ .thread_limit_var = UINT_MAX,
- .run_sched_var = GFS_DYNAMIC,
- .run_sched_modifier = 1,
-+ .default_device_var = 0,
- .dyn_var = false,
-- .nest_var = false
-+ .nest_var = false,
-+ .bind_var = omp_proc_bind_false,
-+ .target_data = NULL
- };
-
--unsigned short *gomp_cpu_affinity;
--size_t gomp_cpu_affinity_len;
- unsigned long gomp_max_active_levels_var = INT_MAX;
--unsigned long gomp_thread_limit_var = ULONG_MAX;
--unsigned long gomp_remaining_threads_count;
-+bool gomp_cancel_var = false;
- #ifndef HAVE_SYNC_BUILTINS
--gomp_mutex_t gomp_remaining_threads_lock;
-+gomp_mutex_t gomp_managed_threads_lock;
- #endif
- unsigned long gomp_available_cpus = 1, gomp_managed_threads = 1;
- unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
- unsigned long *gomp_nthreads_var_list, gomp_nthreads_var_list_len;
-+char *gomp_bind_var_list;
-+unsigned long gomp_bind_var_list_len;
-+void **gomp_places_list;
-+unsigned long gomp_places_list_len;
-
- /* Parse the OMP_SCHEDULE environment variable. */
-
-@@ -184,6 +193,24 @@ parse_unsigned_long (const char *name, u
- return false;
- }
-
-+/* Parse a positive int environment variable. Return true if one was
-+ present and it was successfully parsed. */
-+
-+static bool
-+parse_int (const char *name, int *pvalue, bool allow_zero)
-+{
-+ unsigned long value;
-+ if (!parse_unsigned_long (name, &value, allow_zero))
-+ return false;
-+ if (value > INT_MAX)
-+ {
-+ gomp_error ("Invalid value for environment variable %s", name);
-+ return false;
-+ }
-+ *pvalue = (int) value;
-+ return true;
-+}
-+
- /* Parse an unsigned long list environment variable. Return true if one was
- present and it was successfully parsed. */
-
-@@ -273,6 +300,416 @@ parse_unsigned_long_list (const char *na
- return false;
- }
-
-+/* Parse environment variable set to a boolean or list of omp_proc_bind_t
-+ enum values. Return true if one was present and it was successfully
-+ parsed. */
-+
-+static bool
-+parse_bind_var (const char *name, char *p1stvalue,
-+ char **pvalues, unsigned long *pnvalues)
-+{
-+ char *env;
-+ char value = omp_proc_bind_false, *values = NULL;
-+ int i;
-+ static struct proc_bind_kinds
-+ {
-+ const char name[7];
-+ const char len;
-+ omp_proc_bind_t kind;
-+ } kinds[] =
-+ {
-+ { "false", 5, omp_proc_bind_false },
-+ { "true", 4, omp_proc_bind_true },
-+ { "master", 6, omp_proc_bind_master },
-+ { "close", 5, omp_proc_bind_close },
-+ { "spread", 6, omp_proc_bind_spread }
-+ };
-+
-+ env = getenv (name);
-+ if (env == NULL)
-+ return false;
-+
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == '\0')
-+ goto invalid;
-+
-+ for (i = 0; i < 5; i++)
-+ if (strncasecmp (env, kinds[i].name, kinds[i].len) == 0)
-+ {
-+ value = kinds[i].kind;
-+ env += kinds[i].len;
-+ break;
-+ }
-+ if (i == 5)
-+ goto invalid;
-+
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env != '\0')
-+ {
-+ if (*env == ',')
-+ {
-+ unsigned long nvalues = 0, nalloced = 0;
-+
-+ if (value == omp_proc_bind_false
-+ || value == omp_proc_bind_true)
-+ goto invalid;
-+
-+ do
-+ {
-+ env++;
-+ if (nvalues == nalloced)
-+ {
-+ char *n;
-+ nalloced = nalloced ? nalloced * 2 : 16;
-+ n = realloc (values, nalloced);
-+ if (n == NULL)
-+ {
-+ free (values);
-+ gomp_error ("Out of memory while trying to parse"
-+ " environment variable %s", name);
-+ return false;
-+ }
-+ values = n;
-+ if (nvalues == 0)
-+ values[nvalues++] = value;
-+ }
-+
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == '\0')
-+ goto invalid;
-+
-+ for (i = 2; i < 5; i++)
-+ if (strncasecmp (env, kinds[i].name, kinds[i].len) == 0)
-+ {
-+ value = kinds[i].kind;
-+ env += kinds[i].len;
-+ break;
-+ }
-+ if (i == 5)
-+ goto invalid;
-+
-+ values[nvalues++] = value;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == '\0')
-+ break;
-+ if (*env != ',')
-+ goto invalid;
-+ }
-+ while (1);
-+ *p1stvalue = values[0];
-+ *pvalues = values;
-+ *pnvalues = nvalues;
-+ return true;
-+ }
-+ goto invalid;
-+ }
-+
-+ *p1stvalue = value;
-+ return true;
-+
-+ invalid:
-+ free (values);
-+ gomp_error ("Invalid value for environment variable %s", name);
-+ return false;
-+}
-+
-+static bool
-+parse_one_place (char **envp, bool *negatep, unsigned long *lenp,
-+ long *stridep)
-+{
-+ char *env = *envp, *start;
-+ void *p = gomp_places_list ? gomp_places_list[gomp_places_list_len] : NULL;
-+ unsigned long len = 1;
-+ long stride = 1;
-+ int pass;
-+ bool any_negate = false;
-+ *negatep = false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == '!')
-+ {
-+ *negatep = true;
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ }
-+ if (*env != '{')
-+ return false;
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ start = env;
-+ for (pass = 0; pass < (any_negate ? 2 : 1); pass++)
-+ {
-+ env = start;
-+ do
-+ {
-+ unsigned long this_num, this_len = 1;
-+ long this_stride = 1;
-+ bool this_negate = (*env == '!');
-+ if (this_negate)
-+ {
-+ if (gomp_places_list)
-+ any_negate = true;
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ }
-+
-+ errno = 0;
-+ this_num = strtoul (env, &env, 10);
-+ if (errno)
-+ return false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == ':')
-+ {
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ errno = 0;
-+ this_len = strtoul (env, &env, 10);
-+ if (errno || this_len == 0)
-+ return false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == ':')
-+ {
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ errno = 0;
-+ this_stride = strtol (env, &env, 10);
-+ if (errno)
-+ return false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ }
-+ }
-+ if (this_negate && this_len != 1)
-+ return false;
-+ if (gomp_places_list && pass == this_negate)
-+ {
-+ if (this_negate)
-+ {
-+ if (!gomp_affinity_remove_cpu (p, this_num))
-+ return false;
-+ }
-+ else if (!gomp_affinity_add_cpus (p, this_num, this_len,
-+ this_stride, false))
-+ return false;
-+ }
-+ if (*env == '}')
-+ break;
-+ if (*env != ',')
-+ return false;
-+ ++env;
-+ }
-+ while (1);
-+ }
-+
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == ':')
-+ {
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ errno = 0;
-+ len = strtoul (env, &env, 10);
-+ if (errno || len == 0 || len >= 65536)
-+ return false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == ':')
-+ {
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ errno = 0;
-+ stride = strtol (env, &env, 10);
-+ if (errno)
-+ return false;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ }
-+ }
-+ if (*negatep && len != 1)
-+ return false;
-+ *envp = env;
-+ *lenp = len;
-+ *stridep = stride;
-+ return true;
-+}
-+
-+static bool
-+parse_places_var (const char *name, bool ignore)
-+{
-+ char *env = getenv (name), *end;
-+ bool any_negate = false;
-+ int level = 0;
-+ unsigned long count = 0;
-+ if (env == NULL)
-+ return false;
-+
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env == '\0')
-+ goto invalid;
-+
-+ if (strncasecmp (env, "threads", 7) == 0)
-+ {
-+ env += 7;
-+ level = 1;
-+ }
-+ else if (strncasecmp (env, "cores", 5) == 0)
-+ {
-+ env += 5;
-+ level = 2;
-+ }
-+ else if (strncasecmp (env, "sockets", 7) == 0)
-+ {
-+ env += 7;
-+ level = 3;
-+ }
-+ if (level)
-+ {
-+ count = ULONG_MAX;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env != '\0')
-+ {
-+ if (*env++ != '(')
-+ goto invalid;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+
-+ errno = 0;
-+ count = strtoul (env, &end, 10);
-+ if (errno)
-+ goto invalid;
-+ env = end;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env != ')')
-+ goto invalid;
-+ ++env;
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env != '\0')
-+ goto invalid;
-+ }
-+
-+ if (ignore)
-+ return false;
-+
-+ return gomp_affinity_init_level (level, count, false);
-+ }
-+
-+ count = 0;
-+ end = env;
-+ do
-+ {
-+ bool negate;
-+ unsigned long len;
-+ long stride;
-+ if (!parse_one_place (&end, &negate, &len, &stride))
-+ goto invalid;
-+ if (negate)
-+ {
-+ if (!any_negate)
-+ count++;
-+ any_negate = true;
-+ }
-+ else
-+ count += len;
-+ if (count > 65536)
-+ goto invalid;
-+ if (*end == '\0')
-+ break;
-+ if (*end != ',')
-+ goto invalid;
-+ end++;
-+ }
-+ while (1);
-+
-+ if (ignore)
-+ return false;
-+
-+ gomp_places_list_len = 0;
-+ gomp_places_list = gomp_affinity_alloc (count, false);
-+ if (gomp_places_list == NULL)
-+ return false;
-+
-+ do
-+ {
-+ bool negate;
-+ unsigned long len;
-+ long stride;
-+ gomp_affinity_init_place (gomp_places_list[gomp_places_list_len]);
-+ if (!parse_one_place (&env, &negate, &len, &stride))
-+ goto invalid;
-+ if (negate)
-+ {
-+ void *p;
-+ for (count = 0; count < gomp_places_list_len; count++)
-+ if (gomp_affinity_same_place
-+ (gomp_places_list[count],
-+ gomp_places_list[gomp_places_list_len]))
-+ break;
-+ if (count == gomp_places_list_len)
-+ {
-+ gomp_error ("Trying to remove a non-existing place from list "
-+ "of places");
-+ goto invalid;
-+ }
-+ p = gomp_places_list[count];
-+ memmove (&gomp_places_list[count],
-+ &gomp_places_list[count + 1],
-+ (gomp_places_list_len - count - 1) * sizeof (void *));
-+ --gomp_places_list_len;
-+ gomp_places_list[gomp_places_list_len] = p;
-+ }
-+ else if (len == 1)
-+ ++gomp_places_list_len;
-+ else
-+ {
-+ for (count = 0; count < len - 1; count++)
-+ if (!gomp_affinity_copy_place
-+ (gomp_places_list[gomp_places_list_len + count + 1],
-+ gomp_places_list[gomp_places_list_len + count],
-+ stride))
-+ goto invalid;
-+ gomp_places_list_len += len;
-+ }
-+ if (*env == '\0')
-+ break;
-+ env++;
-+ }
-+ while (1);
-+
-+ if (gomp_places_list_len == 0)
-+ {
-+ gomp_error ("All places have been removed");
-+ goto invalid;
-+ }
-+ if (!gomp_affinity_finalize_place_list (false))
-+ goto invalid;
-+ return true;
-+
-+ invalid:
-+ free (gomp_places_list);
-+ gomp_places_list = NULL;
-+ gomp_places_list_len = 0;
-+ gomp_error ("Invalid value for environment variable %s", name);
-+ return false;
-+}
-+
- /* Parse the OMP_STACKSIZE environment varible. Return true if one was
- present and it was successfully parsed. */
-
-@@ -478,86 +915,95 @@ parse_wait_policy (void)
- present and it was successfully parsed. */
-
- static bool
--parse_affinity (void)
-+parse_affinity (bool ignore)
- {
-- char *env, *end;
-+ char *env, *end, *start;
-+ int pass;
- unsigned long cpu_beg, cpu_end, cpu_stride;
-- unsigned short *cpus = NULL;
-- size_t allocated = 0, used = 0, needed;
-+ size_t count = 0, needed;
-
- env = getenv ("GOMP_CPU_AFFINITY");
- if (env == NULL)
- return false;
-
-- do
-+ start = env;
-+ for (pass = 0; pass < 2; pass++)
- {
-- while (*env == ' ' || *env == '\t')
-- env++;
--
-- cpu_beg = strtoul (env, &end, 0);
-- cpu_end = cpu_beg;
-- cpu_stride = 1;
-- if (env == end || cpu_beg >= 65536)
-- goto invalid;
-+ env = start;
-+ if (pass == 1)
-+ {
-+ if (ignore)
-+ return false;
-
-- env = end;
-- if (*env == '-')
-+ gomp_places_list_len = 0;
-+ gomp_places_list = gomp_affinity_alloc (count, true);
-+ if (gomp_places_list == NULL)
-+ return false;
-+ }
-+ do
- {
-- cpu_end = strtoul (++env, &end, 0);
-- if (env == end || cpu_end >= 65536 || cpu_end < cpu_beg)
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+
-+ errno = 0;
-+ cpu_beg = strtoul (env, &end, 0);
-+ if (errno || cpu_beg >= 65536)
- goto invalid;
-+ cpu_end = cpu_beg;
-+ cpu_stride = 1;
-
- env = end;
-- if (*env == ':')
-+ if (*env == '-')
- {
-- cpu_stride = strtoul (++env, &end, 0);
-- if (env == end || cpu_stride == 0 || cpu_stride >= 65536)
-+ errno = 0;
-+ cpu_end = strtoul (++env, &end, 0);
-+ if (errno || cpu_end >= 65536 || cpu_end < cpu_beg)
- goto invalid;
-
- env = end;
-- }
-- }
-+ if (*env == ':')
-+ {
-+ errno = 0;
-+ cpu_stride = strtoul (++env, &end, 0);
-+ if (errno || cpu_stride == 0 || cpu_stride >= 65536)
-+ goto invalid;
-
-- needed = (cpu_end - cpu_beg) / cpu_stride + 1;
-- if (used + needed >= allocated)
-- {
-- unsigned short *new_cpus;
-+ env = end;
-+ }
-+ }
-
-- if (allocated < 64)
-- allocated = 64;
-- if (allocated > needed)
-- allocated <<= 1;
-+ needed = (cpu_end - cpu_beg) / cpu_stride + 1;
-+ if (pass == 0)
-+ count += needed;
- else
-- allocated += 2 * needed;
-- new_cpus = realloc (cpus, allocated * sizeof (unsigned short));
-- if (new_cpus == NULL)
- {
-- free (cpus);
-- gomp_error ("not enough memory to store GOMP_CPU_AFFINITY list");
-- return false;
-+ while (needed--)
-+ {
-+ void *p = gomp_places_list[gomp_places_list_len];
-+ gomp_affinity_init_place (p);
-+ if (gomp_affinity_add_cpus (p, cpu_beg, 1, 0, true))
-+ ++gomp_places_list_len;
-+ cpu_beg += cpu_stride;
-+ }
- }
-
-- cpus = new_cpus;
-- }
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-
-- while (needed--)
-- {
-- cpus[used++] = cpu_beg;
-- cpu_beg += cpu_stride;
-+ if (*env == ',')
-+ env++;
-+ else if (*env == '\0')
-+ break;
- }
--
-- while (*env == ' ' || *env == '\t')
-- env++;
--
-- if (*env == ',')
-- env++;
-- else if (*env == '\0')
-- break;
-+ while (1);
- }
-- while (1);
-
-- gomp_cpu_affinity = cpus;
-- gomp_cpu_affinity_len = used;
-+ if (gomp_places_list_len == 0)
-+ {
-+ free (gomp_places_list);
-+ gomp_places_list = NULL;
-+ return false;
-+ }
- return true;
-
- invalid:
-@@ -565,12 +1011,160 @@ parse_affinity (void)
- return false;
- }
-
-+
-+static void
-+handle_omp_display_env (unsigned long stacksize, int wait_policy)
-+{
-+ const char *env;
-+ bool display = false;
-+ bool verbose = false;
-+ int i;
-+
-+ env = getenv ("OMP_DISPLAY_ENV");
-+ if (env == NULL)
-+ return;
-+
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (strncasecmp (env, "true", 4) == 0)
-+ {
-+ display = true;
-+ env += 4;
-+ }
-+ else if (strncasecmp (env, "false", 5) == 0)
-+ {
-+ display = false;
-+ env += 5;
-+ }
-+ else if (strncasecmp (env, "verbose", 7) == 0)
-+ {
-+ display = true;
-+ verbose = true;
-+ env += 7;
-+ }
-+ else
-+ env = "X";
-+ while (isspace ((unsigned char) *env))
-+ ++env;
-+ if (*env != '\0')
-+ gomp_error ("Invalid value for environment variable OMP_DISPLAY_ENV");
-+
-+ if (!display)
-+ return;
-+
-+ fputs ("\nOPENMP DISPLAY ENVIRONMENT BEGIN\n", stderr);
-+
-+ fputs (" _OPENMP = '201307'\n", stderr);
-+ fprintf (stderr, " OMP_DYNAMIC = '%s'\n",
-+ gomp_global_icv.dyn_var ? "TRUE" : "FALSE");
-+ fprintf (stderr, " OMP_NESTED = '%s'\n",
-+ gomp_global_icv.nest_var ? "TRUE" : "FALSE");
-+
-+ fprintf (stderr, " OMP_NUM_THREADS = '%lu", gomp_global_icv.nthreads_var);
-+ for (i = 1; i < gomp_nthreads_var_list_len; i++)
-+ fprintf (stderr, ",%lu", gomp_nthreads_var_list[i]);
-+ fputs ("'\n", stderr);
-+
-+ fprintf (stderr, " OMP_SCHEDULE = '");
-+ switch (gomp_global_icv.run_sched_var)
-+ {
-+ case GFS_RUNTIME:
-+ fputs ("RUNTIME", stderr);
-+ break;
-+ case GFS_STATIC:
-+ fputs ("STATIC", stderr);
-+ break;
-+ case GFS_DYNAMIC:
-+ fputs ("DYNAMIC", stderr);
-+ break;
-+ case GFS_GUIDED:
-+ fputs ("GUIDED", stderr);
-+ break;
-+ case GFS_AUTO:
-+ fputs ("AUTO", stderr);
-+ break;
-+ }
-+ fputs ("'\n", stderr);
-+
-+ fputs (" OMP_PROC_BIND = '", stderr);
-+ switch (gomp_global_icv.bind_var)
-+ {
-+ case omp_proc_bind_false:
-+ fputs ("FALSE", stderr);
-+ break;
-+ case omp_proc_bind_true:
-+ fputs ("TRUE", stderr);
-+ break;
-+ case omp_proc_bind_master:
-+ fputs ("MASTER", stderr);
-+ break;
-+ case omp_proc_bind_close:
-+ fputs ("CLOSE", stderr);
-+ break;
-+ case omp_proc_bind_spread:
-+ fputs ("SPREAD", stderr);
-+ break;
-+ }
-+ for (i = 1; i < gomp_bind_var_list_len; i++)
-+ switch (gomp_bind_var_list[i])
-+ {
-+ case omp_proc_bind_master:
-+ fputs (",MASTER", stderr);
-+ break;
-+ case omp_proc_bind_close:
-+ fputs (",CLOSE", stderr);
-+ break;
-+ case omp_proc_bind_spread:
-+ fputs (",SPREAD", stderr);
-+ break;
-+ }
-+ fputs ("'\n", stderr);
-+ fputs (" OMP_PLACES = '", stderr);
-+ for (i = 0; i < gomp_places_list_len; i++)
-+ {
-+ fputs ("{", stderr);
-+ gomp_affinity_print_place (gomp_places_list[i]);
-+ fputs (i + 1 == gomp_places_list_len ? "}" : "},", stderr);
-+ }
-+ fputs ("'\n", stderr);
-+
-+ fprintf (stderr, " OMP_STACKSIZE = '%lu'\n", stacksize);
-+
-+ /* GOMP's default value is actually neither active nor passive. */
-+ fprintf (stderr, " OMP_WAIT_POLICY = '%s'\n",
-+ wait_policy > 0 ? "ACTIVE" : "PASSIVE");
-+ fprintf (stderr, " OMP_THREAD_LIMIT = '%u'\n",
-+ gomp_global_icv.thread_limit_var);
-+ fprintf (stderr, " OMP_MAX_ACTIVE_LEVELS = '%lu'\n",
-+ gomp_max_active_levels_var);
-+
-+ fprintf (stderr, " OMP_CANCELLATION = '%s'\n",
-+ gomp_cancel_var ? "TRUE" : "FALSE");
-+ fprintf (stderr, " OMP_DEFAULT_DEVICE = '%d'\n",
-+ gomp_global_icv.default_device_var);
-+
-+ if (verbose)
-+ {
-+ fputs (" GOMP_CPU_AFFINITY = ''\n", stderr);
-+ fprintf (stderr, " GOMP_STACKSIZE = '%lu'\n", stacksize);
-+#ifdef HAVE_INTTYPES_H
-+ fprintf (stderr, " GOMP_SPINCOUNT = '%"PRIu64"'\n",
-+ (uint64_t) gomp_spin_count_var);
-+#else
-+ fprintf (stderr, " GOMP_SPINCOUNT = '%lu'\n",
-+ (unsigned long) gomp_spin_count_var);
-+#endif
-+ }
-+
-+ fputs ("OPENMP DISPLAY ENVIRONMENT END\n", stderr);
-+}
-+
-+
- static void __attribute__((constructor))
- initialize_env (void)
- {
-- unsigned long stacksize;
-+ unsigned long thread_limit_var, stacksize;
- int wait_policy;
-- bool bind_var = false;
-
- /* Do a compile time check that mkomp_h.pl did good job. */
- omp_check_defines ();
-@@ -578,14 +1172,17 @@ initialize_env (void)
- parse_schedule ();
- parse_boolean ("OMP_DYNAMIC", &gomp_global_icv.dyn_var);
- parse_boolean ("OMP_NESTED", &gomp_global_icv.nest_var);
-- parse_boolean ("OMP_PROC_BIND", &bind_var);
-+ parse_boolean ("OMP_CANCELLATION", &gomp_cancel_var);
-+ parse_int ("OMP_DEFAULT_DEVICE", &gomp_global_icv.default_device_var, true);
- parse_unsigned_long ("OMP_MAX_ACTIVE_LEVELS", &gomp_max_active_levels_var,
- true);
-- parse_unsigned_long ("OMP_THREAD_LIMIT", &gomp_thread_limit_var, false);
-- if (gomp_thread_limit_var != ULONG_MAX)
-- gomp_remaining_threads_count = gomp_thread_limit_var - 1;
-+ if (parse_unsigned_long ("OMP_THREAD_LIMIT", &thread_limit_var, false))
-+ {
-+ gomp_global_icv.thread_limit_var
-+ = thread_limit_var > INT_MAX ? UINT_MAX : thread_limit_var;
-+ }
- #ifndef HAVE_SYNC_BUILTINS
-- gomp_mutex_init (&gomp_remaining_threads_lock);
-+ gomp_mutex_init (&gomp_managed_threads_lock);
- #endif
- gomp_init_num_threads ();
- gomp_available_cpus = gomp_global_icv.nthreads_var;
-@@ -594,7 +1191,34 @@ initialize_env (void)
- &gomp_nthreads_var_list,
- &gomp_nthreads_var_list_len))
- gomp_global_icv.nthreads_var = gomp_available_cpus;
-- if (parse_affinity () || bind_var)
-+ bool ignore = false;
-+ if (parse_bind_var ("OMP_PROC_BIND",
-+ &gomp_global_icv.bind_var,
-+ &gomp_bind_var_list,
-+ &gomp_bind_var_list_len)
-+ && gomp_global_icv.bind_var == omp_proc_bind_false)
-+ ignore = true;
-+ /* Make sure OMP_PLACES and GOMP_CPU_AFFINITY env vars are always
-+ parsed if present in the environment. If OMP_PROC_BIND was set
-+ explictly to false, don't populate places list though. If places
-+ list was successfully set from OMP_PLACES, only parse but don't process
-+ GOMP_CPU_AFFINITY. If OMP_PROC_BIND was not set in the environment,
-+ default to OMP_PROC_BIND=true if OMP_PLACES or GOMP_CPU_AFFINITY
-+ was successfully parsed into a places list, otherwise to
-+ OMP_PROC_BIND=false. */
-+ if (parse_places_var ("OMP_PLACES", ignore))
-+ {
-+ if (gomp_global_icv.bind_var == omp_proc_bind_false)
-+ gomp_global_icv.bind_var = true;
-+ ignore = true;
-+ }
-+ if (parse_affinity (ignore))
-+ {
-+ if (gomp_global_icv.bind_var == omp_proc_bind_false)
-+ gomp_global_icv.bind_var = true;
-+ ignore = true;
-+ }
-+ if (gomp_global_icv.bind_var != omp_proc_bind_false)
- gomp_init_affinity ();
- wait_policy = parse_wait_policy ();
- if (!parse_spincount ("GOMP_SPINCOUNT", &gomp_spin_count_var))
-@@ -645,6 +1269,8 @@ initialize_env (void)
- if (err != 0)
- gomp_error ("Stack size change failed: %s", strerror (err));
- }
-+
-+ handle_omp_display_env (stacksize, wait_policy);
- }
-
-
-@@ -728,7 +1354,8 @@ omp_get_max_threads (void)
- int
- omp_get_thread_limit (void)
- {
-- return gomp_thread_limit_var > INT_MAX ? INT_MAX : gomp_thread_limit_var;
-+ struct gomp_task_icv *icv = gomp_icv (false);
-+ return icv->thread_limit_var > INT_MAX ? INT_MAX : icv->thread_limit_var;
- }
-
- void
-@@ -744,6 +1371,60 @@ omp_get_max_active_levels (void)
- return gomp_max_active_levels_var;
- }
-
-+int
-+omp_get_cancellation (void)
-+{
-+ return gomp_cancel_var;
-+}
-+
-+omp_proc_bind_t
-+omp_get_proc_bind (void)
-+{
-+ struct gomp_task_icv *icv = gomp_icv (false);
-+ return icv->bind_var;
-+}
-+
-+void
-+omp_set_default_device (int device_num)
-+{
-+ struct gomp_task_icv *icv = gomp_icv (true);
-+ icv->default_device_var = device_num >= 0 ? device_num : 0;
-+}
-+
-+int
-+omp_get_default_device (void)
-+{
-+ struct gomp_task_icv *icv = gomp_icv (false);
-+ return icv->default_device_var;
-+}
-+
-+int
-+omp_get_num_devices (void)
-+{
-+ return gomp_get_num_devices ();
-+}
-+
-+int
-+omp_get_num_teams (void)
-+{
-+ /* Hardcoded to 1 on host, MIC, HSAIL? Maybe variable on PTX. */
-+ return 1;
-+}
-+
-+int
-+omp_get_team_num (void)
-+{
-+ /* Hardcoded to 0 on host, MIC, HSAIL? Maybe variable on PTX. */
-+ return 0;
-+}
-+
-+int
-+omp_is_initial_device (void)
-+{
-+ /* Hardcoded to 1 on host, should be 0 on MIC, HSAIL, PTX. */
-+ return 1;
-+}
-+
- ialias (omp_set_dynamic)
- ialias (omp_set_nested)
- ialias (omp_set_num_threads)
-@@ -755,3 +1436,11 @@ ialias (omp_get_max_threads)
- ialias (omp_get_thread_limit)
- ialias (omp_set_max_active_levels)
- ialias (omp_get_max_active_levels)
-+ialias (omp_get_cancellation)
-+ialias (omp_get_proc_bind)
-+ialias (omp_set_default_device)
-+ialias (omp_get_default_device)
-+ialias (omp_get_num_devices)
-+ialias (omp_get_num_teams)
-+ialias (omp_get_team_num)
-+ialias (omp_is_initial_device)
---- libgomp/libgomp.h (revision 210461)
-+++ libgomp/libgomp.h (revision 213654)
-@@ -1,4 +1,4 @@
--/* Copyright (C) 2005-2013 Free Software Foundation, Inc.
-+/* Copyright (C) 2005-2014 Free Software Foundation, Inc.
- Contributed by Richard Henderson .
-
- This file is part of the GNU OpenMP Library (libgomp).
-@@ -39,6 +39,7 @@
-
- #include
- #include
-+#include
-
- #ifdef HAVE_ATTRIBUTE_VISIBILITY
- # pragma GCC visibility push(hidden)
-@@ -201,6 +202,10 @@ struct gomp_team_state
- /* Active nesting level. Only active parallel regions are counted. */
- unsigned active_level;
-
-+ /* Place-partition-var, offset and length into gomp_places_list array. */
-+ unsigned place_partition_off;
-+ unsigned place_partition_len;
-+
- #ifdef HAVE_SYNC_BUILTINS
- /* Number of single stmts encountered. */
- unsigned long single_count;
-@@ -214,30 +219,40 @@ struct gomp_team_state
- unsigned long static_trip;
- };
-
--/* These are the OpenMP 3.0 Internal Control Variables described in
-+struct target_mem_desc;
-+
-+/* These are the OpenMP 4.0 Internal Control Variables described in
- section 2.3.1. Those described as having one copy per task are
- stored within the structure; those described as having one copy
- for the whole program are (naturally) global variables. */
--
-+
- struct gomp_task_icv
- {
- unsigned long nthreads_var;
- enum gomp_schedule_type run_sched_var;
- int run_sched_modifier;
-+ int default_device_var;
-+ unsigned int thread_limit_var;
- bool dyn_var;
- bool nest_var;
-+ char bind_var;
-+ /* Internal ICV. */
-+ struct target_mem_desc *target_data;
- };
-
- extern struct gomp_task_icv gomp_global_icv;
--extern unsigned long gomp_thread_limit_var;
--extern unsigned long gomp_remaining_threads_count;
- #ifndef HAVE_SYNC_BUILTINS
--extern gomp_mutex_t gomp_remaining_threads_lock;
-+extern gomp_mutex_t gomp_managed_threads_lock;
- #endif
- extern unsigned long gomp_max_active_levels_var;
-+extern bool gomp_cancel_var;
- extern unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
- extern unsigned long gomp_available_cpus, gomp_managed_threads;
- extern unsigned long *gomp_nthreads_var_list, gomp_nthreads_var_list_len;
-+extern char *gomp_bind_var_list;
-+extern unsigned long gomp_bind_var_list_len;
-+extern void **gomp_places_list;
-+extern unsigned long gomp_places_list_len;
-
- enum gomp_task_kind
- {
-@@ -247,6 +262,39 @@ enum gomp_task_kind
- GOMP_TASK_TIED
- };
-
-+struct gomp_task;
-+struct gomp_taskgroup;
-+struct htab;
-+
-+struct gomp_task_depend_entry
-+{
-+ void *addr;
-+ struct gomp_task_depend_entry *next;
-+ struct gomp_task_depend_entry *prev;
-+ struct gomp_task *task;
-+ bool is_in;
-+ bool redundant;
-+ bool redundant_out;
-+};
-+
-+struct gomp_dependers_vec
-+{
-+ size_t n_elem;
-+ size_t allocated;
-+ struct gomp_task *elem[];
-+};
-+
-+/* Used when in GOMP_taskwait or in gomp_task_maybe_wait_for_dependencies. */
-+
-+struct gomp_taskwait
-+{
-+ bool in_taskwait;
-+ bool in_depend_wait;
-+ size_t n_depend;
-+ struct gomp_task *last_parent_depends_on;
-+ gomp_sem_t taskwait_sem;
-+};
-+
- /* This structure describes a "task" to be run by a thread. */
-
- struct gomp_task
-@@ -257,14 +305,33 @@ struct gomp_task
- struct gomp_task *prev_child;
- struct gomp_task *next_queue;
- struct gomp_task *prev_queue;
-+ struct gomp_task *next_taskgroup;
-+ struct gomp_task *prev_taskgroup;
-+ struct gomp_taskgroup *taskgroup;
-+ struct gomp_dependers_vec *dependers;
-+ struct htab *depend_hash;
-+ struct gomp_taskwait *taskwait;
-+ size_t depend_count;
-+ size_t num_dependees;
- struct gomp_task_icv icv;
- void (*fn) (void *);
- void *fn_data;
- enum gomp_task_kind kind;
-- bool in_taskwait;
- bool in_tied_task;
- bool final_task;
-- gomp_sem_t taskwait_sem;
-+ bool copy_ctors_done;
-+ bool parent_depends_on;
-+ struct gomp_task_depend_entry depend[];
-+};
-+
-+struct gomp_taskgroup
-+{
-+ struct gomp_taskgroup *prev;
-+ struct gomp_task *children;
-+ bool in_taskgroup_wait;
-+ bool cancelled;
-+ gomp_sem_t taskgroup_sem;
-+ size_t num_children;
- };
-
- /* This structure describes a "team" of threads. These are the threads
-@@ -293,6 +360,12 @@ struct gomp_team
- of the threads in the team. */
- gomp_sem_t **ordered_release;
-
-+ /* List of work shares on which gomp_fini_work_share hasn't been
-+ called yet. If the team hasn't been cancelled, this should be
-+ equal to each thr->ts.work_share, but otherwise it can be a possibly
-+ long list of workshares. */
-+ struct gomp_work_share *work_shares_to_free;
-+
- /* List of gomp_work_share structs chained through next_free fields.
- This is populated and taken off only by the first thread in the
- team encountering a new work sharing construct, in a critical
-@@ -324,8 +397,20 @@ struct gomp_team
-
- gomp_mutex_t task_lock;
- struct gomp_task *task_queue;
-- int task_count;
-- int task_running_count;
-+ /* Number of all GOMP_TASK_{WAITING,TIED} tasks in the team. */
-+ unsigned int task_count;
-+ /* Number of GOMP_TASK_WAITING tasks currently waiting to be scheduled. */
-+ unsigned int task_queued_count;
-+ /* Number of GOMP_TASK_{WAITING,TIED} tasks currently running
-+ directly in gomp_barrier_handle_tasks; tasks spawned
-+ from e.g. GOMP_taskwait or GOMP_taskgroup_end don't count, even when
-+ that is called from a task run from gomp_barrier_handle_tasks.
-+ task_running_count should be always <= team->nthreads,
-+ and if current task isn't in_tied_task, then it will be
-+ even < team->nthreads. */
-+ unsigned int task_running_count;
-+ int work_share_cancelled;
-+ int team_cancelled;
-
- /* This array contains structures for implicit tasks. */
- struct gomp_task implicit_task[];
-@@ -350,7 +435,11 @@ struct gomp_thread
- /* This semaphore is used for ordered loops. */
- gomp_sem_t release;
-
-- /* user pthread thread pool */
-+ /* Place this thread is bound to plus one, or zero if not bound
-+ to any place. */
-+ unsigned int place;
-+
-+ /* User pthread thread pool */
- struct gomp_thread_pool *thread_pool;
- };
-
-@@ -363,11 +452,23 @@ struct gomp_thread_pool
- unsigned threads_size;
- unsigned threads_used;
- struct gomp_team *last_team;
-+ /* Number of threads running in this contention group. */
-+ unsigned long threads_busy;
-
- /* This barrier holds and releases threads waiting in threads. */
- gomp_barrier_t threads_dock;
- };
-
-+enum gomp_cancel_kind
-+{
-+ GOMP_CANCEL_PARALLEL = 1,
-+ GOMP_CANCEL_LOOP = 2,
-+ GOMP_CANCEL_FOR = GOMP_CANCEL_LOOP,
-+ GOMP_CANCEL_DO = GOMP_CANCEL_LOOP,
-+ GOMP_CANCEL_SECTIONS = 4,
-+ GOMP_CANCEL_TASKGROUP = 8
-+};
-+
- /* ... and here is that TLS data. */
-
- #ifdef HAVE_TLS
-@@ -402,17 +503,22 @@ static inline struct gomp_task_icv *gomp
- /* The attributes to be used during thread creation. */
- extern pthread_attr_t gomp_thread_attr;
-
--/* Other variables. */
--
--extern unsigned short *gomp_cpu_affinity;
--extern size_t gomp_cpu_affinity_len;
--
- /* Function prototypes. */
-
- /* affinity.c */
-
- extern void gomp_init_affinity (void);
--extern void gomp_init_thread_affinity (pthread_attr_t *);
-+extern void gomp_init_thread_affinity (pthread_attr_t *, unsigned int);
-+extern void **gomp_affinity_alloc (unsigned long, bool);
-+extern void gomp_affinity_init_place (void *);
-+extern bool gomp_affinity_add_cpus (void *, unsigned long, unsigned long,
-+ long, bool);
-+extern bool gomp_affinity_remove_cpu (void *, unsigned long);
-+extern bool gomp_affinity_copy_place (void *, void *, long);
-+extern bool gomp_affinity_same_place (void *, void *);
-+extern bool gomp_affinity_finalize_place_list (bool);
-+extern bool gomp_affinity_init_level (int, unsigned long, bool);
-+extern void gomp_affinity_print_place (void *);
-
- /* alloc.c */
-
-@@ -486,15 +592,21 @@ extern void gomp_barrier_handle_tasks (g
- static void inline
- gomp_finish_task (struct gomp_task *task)
- {
-- gomp_sem_destroy (&task->taskwait_sem);
-+ if (__builtin_expect (task->depend_hash != NULL, 0))
-+ free (task->depend_hash);
- }
-
- /* team.c */
-
- extern struct gomp_team *gomp_new_team (unsigned);
- extern void gomp_team_start (void (*) (void *), void *, unsigned,
-- struct gomp_team *);
-+ unsigned, struct gomp_team *);
- extern void gomp_team_end (void);
-+extern void gomp_free_thread (void *);
-+
-+/* target.c */
-+
-+extern int gomp_get_num_devices (void);
-
- /* work.c */
-
-@@ -502,6 +614,7 @@ extern void gomp_init_work_share (struct
- extern void gomp_fini_work_share (struct gomp_work_share *);
- extern bool gomp_work_share_start (bool);
- extern void gomp_work_share_end (void);
-+extern bool gomp_work_share_end_cancel (void);
- extern void gomp_work_share_end_nowait (void);
-
- static inline void
-@@ -524,6 +637,26 @@ gomp_work_share_init_done (void)
- #define _LIBGOMP_OMP_LOCK_DEFINED 1
- #include "omp.h.in"
-
-+typedef enum omp_proc_bind_t
-+{
-+ omp_proc_bind_false = 0,
-+ omp_proc_bind_true = 1,
-+ omp_proc_bind_master = 2,
-+ omp_proc_bind_close = 3,
-+ omp_proc_bind_spread = 4
-+} omp_proc_bind_t;
-+
-+extern int omp_get_cancellation (void) __GOMP_NOTHROW;
-+extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW;
-+
-+extern void omp_set_default_device (int) __GOMP_NOTHROW;
-+extern int omp_get_default_device (void) __GOMP_NOTHROW;
-+extern int omp_get_num_devices (void) __GOMP_NOTHROW;
-+extern int omp_get_num_teams (void) __GOMP_NOTHROW;
-+extern int omp_get_team_num (void) __GOMP_NOTHROW;
-+
-+extern int omp_is_initial_device (void) __GOMP_NOTHROW;
-+
- #if !defined (HAVE_ATTRIBUTE_VISIBILITY) \
- || !defined (HAVE_ATTRIBUTE_ALIAS) \
- || !defined (HAVE_AS_SYMVER_DIRECTIVE) \
-@@ -580,11 +713,19 @@ extern int gomp_test_nest_lock_25 (omp_n
- #endif
-
- #ifdef HAVE_ATTRIBUTE_ALIAS
-+# define ialias_ulp ialias_str1(__USER_LABEL_PREFIX__)
-+# define ialias_str1(x) ialias_str2(x)
-+# define ialias_str2(x) #x
- # define ialias(fn) \
- extern __typeof (fn) gomp_ialias_##fn \
- __attribute__ ((alias (#fn))) attribute_hidden;
-+# define ialias_redirect(fn) \
-+ extern __typeof (fn) fn __asm__ (ialias_ulp "gomp_ialias_" #fn) attribute_hidden;
-+# define ialias_call(fn) gomp_ialias_ ## fn
- #else
- # define ialias(fn)
-+# define ialias_redirect(fn)
-+# define ialias_call(fn) fn
- #endif
-
- #endif /* LIBGOMP_H */
---- libgomp/task.c (revision 210461)
-+++ libgomp/task.c (revision 213654)
-@@ -1,4 +1,4 @@
--/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
-+/* Copyright (C) 2007-2014 Free Software Foundation, Inc.
- Contributed by Richard Henderson .
-
- This file is part of the GNU OpenMP Library (libgomp).
-@@ -29,6 +29,33 @@
- #include
- #include
-
-+typedef struct gomp_task_depend_entry *hash_entry_type;
-+
-+static inline void *
-+htab_alloc (size_t size)
-+{
-+ return gomp_malloc (size);
-+}
-+
-+static inline void
-+htab_free (void *ptr)
-+{
-+ free (ptr);
-+}
-+
-+#include "hashtab.h"
-+
-+static inline hashval_t
-+htab_hash (hash_entry_type element)
-+{
-+ return hash_pointer (element->addr);
-+}
-+
-+static inline bool
-+htab_eq (hash_entry_type x, hash_entry_type y)
-+{
-+ return x->addr == y->addr;
-+}
-
- /* Create a new task data structure. */
-
-@@ -39,11 +66,16 @@ gomp_init_task (struct gomp_task *task,
- task->parent = parent_task;
- task->icv = *prev_icv;
- task->kind = GOMP_TASK_IMPLICIT;
-- task->in_taskwait = false;
-+ task->taskwait = NULL;
- task->in_tied_task = false;
- task->final_task = false;
-+ task->copy_ctors_done = false;
-+ task->parent_depends_on = false;
- task->children = NULL;
-- gomp_sem_init (&task->taskwait_sem, 0);
-+ task->taskgroup = NULL;
-+ task->dependers = NULL;
-+ task->depend_hash = NULL;
-+ task->depend_count = 0;
- }
-
- /* Clean up a task, after completing it. */
-@@ -72,13 +104,16 @@ gomp_clear_parent (struct gomp_task *chi
- while (task != children);
- }
-
-+static void gomp_task_maybe_wait_for_dependencies (void **depend);
-+
- /* Called when encountering an explicit task directive. If IF_CLAUSE is
- false, then we must not delay in executing the task. If UNTIED is true,
- then the task may be executed by any member of the team. */
-
- void
- GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *),
-- long arg_size, long arg_align, bool if_clause, unsigned flags)
-+ long arg_size, long arg_align, bool if_clause, unsigned flags,
-+ void **depend)
- {
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-@@ -94,17 +129,35 @@ GOMP_task (void (*fn) (void *), void *da
- flags &= ~1;
- #endif
-
-+ /* If parallel or taskgroup has been cancelled, don't start new tasks. */
-+ if (team
-+ && (gomp_team_barrier_cancelled (&team->barrier)
-+ || (thr->task->taskgroup && thr->task->taskgroup->cancelled)))
-+ return;
-+
- if (!if_clause || team == NULL
- || (thr->task && thr->task->final_task)
- || team->task_count > 64 * team->nthreads)
- {
- struct gomp_task task;
-
-+ /* If there are depend clauses and earlier deferred sibling tasks
-+ with depend clauses, check if there isn't a dependency. If there
-+ is, we need to wait for them. There is no need to handle
-+ depend clauses for non-deferred tasks other than this, because
-+ the parent task is suspended until the child task finishes and thus
-+ it can't start further child tasks. */
-+ if ((flags & 8) && thr->task && thr->task->depend_hash)
-+ gomp_task_maybe_wait_for_dependencies (depend);
-+
- gomp_init_task (&task, thr->task, gomp_icv (false));
- task.kind = GOMP_TASK_IFFALSE;
- task.final_task = (thr->task && thr->task->final_task) || (flags & 2);
- if (thr->task)
-- task.in_tied_task = thr->task->in_tied_task;
-+ {
-+ task.in_tied_task = thr->task->in_tied_task;
-+ task.taskgroup = thr->task->taskgroup;
-+ }
- thr->task = &task;
- if (__builtin_expect (cpyfn != NULL, 0))
- {
-@@ -137,27 +190,174 @@ GOMP_task (void (*fn) (void *), void *da
- {
- struct gomp_task *task;
- struct gomp_task *parent = thr->task;
-+ struct gomp_taskgroup *taskgroup = parent->taskgroup;
- char *arg;
- bool do_wake;
-+ size_t depend_size = 0;
-
-- task = gomp_malloc (sizeof (*task) + arg_size + arg_align - 1);
-- arg = (char *) (((uintptr_t) (task + 1) + arg_align - 1)
-+ if (flags & 8)
-+ depend_size = ((uintptr_t) depend[0]
-+ * sizeof (struct gomp_task_depend_entry));
-+ task = gomp_malloc (sizeof (*task) + depend_size
-+ + arg_size + arg_align - 1);
-+ arg = (char *) (((uintptr_t) (task + 1) + depend_size + arg_align - 1)
- & ~(uintptr_t) (arg_align - 1));
- gomp_init_task (task, parent, gomp_icv (false));
- task->kind = GOMP_TASK_IFFALSE;
- task->in_tied_task = parent->in_tied_task;
-+ task->taskgroup = taskgroup;
- thr->task = task;
- if (cpyfn)
-- cpyfn (arg, data);
-+ {
-+ cpyfn (arg, data);
-+ task->copy_ctors_done = true;
-+ }
- else
- memcpy (arg, data, arg_size);
- thr->task = parent;
- task->kind = GOMP_TASK_WAITING;
- task->fn = fn;
- task->fn_data = arg;
-- task->in_tied_task = true;
- task->final_task = (flags & 2) >> 1;
- gomp_mutex_lock (&team->task_lock);
-+ /* If parallel or taskgroup has been cancelled, don't start new
-+ tasks. */
-+ if (__builtin_expect ((gomp_team_barrier_cancelled (&team->barrier)
-+ || (taskgroup && taskgroup->cancelled))
-+ && !task->copy_ctors_done, 0))
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ gomp_finish_task (task);
-+ free (task);
-+ return;
-+ }
-+ if (taskgroup)
-+ taskgroup->num_children++;
-+ if (depend_size)
-+ {
-+ size_t ndepend = (uintptr_t) depend[0];
-+ size_t nout = (uintptr_t) depend[1];
-+ size_t i;
-+ hash_entry_type ent;
-+
-+ task->depend_count = ndepend;
-+ task->num_dependees = 0;
-+ if (parent->depend_hash == NULL)
-+ parent->depend_hash
-+ = htab_create (2 * ndepend > 12 ? 2 * ndepend : 12);
-+ for (i = 0; i < ndepend; i++)
-+ {
-+ task->depend[i].addr = depend[2 + i];
-+ task->depend[i].next = NULL;
-+ task->depend[i].prev = NULL;
-+ task->depend[i].task = task;
-+ task->depend[i].is_in = i >= nout;
-+ task->depend[i].redundant = false;
-+ task->depend[i].redundant_out = false;
-+
-+ hash_entry_type *slot
-+ = htab_find_slot (&parent->depend_hash, &task->depend[i],
-+ INSERT);
-+ hash_entry_type out = NULL, last = NULL;
-+ if (*slot)
-+ {
-+ /* If multiple depends on the same task are the
-+ same, all but the first one are redundant.
-+ As inout/out come first, if any of them is
-+ inout/out, it will win, which is the right
-+ semantics. */
-+ if ((*slot)->task == task)
-+ {
-+ task->depend[i].redundant = true;
-+ continue;
-+ }
-+ for (ent = *slot; ent; ent = ent->next)
-+ {
-+ if (ent->redundant_out)
-+ break;
-+
-+ last = ent;
-+
-+ /* depend(in:...) doesn't depend on earlier
-+ depend(in:...). */
-+ if (i >= nout && ent->is_in)
-+ continue;
-+
-+ if (!ent->is_in)
-+ out = ent;
-+
-+ struct gomp_task *tsk = ent->task;
-+ if (tsk->dependers == NULL)
-+ {
-+ tsk->dependers
-+ = gomp_malloc (sizeof (struct gomp_dependers_vec)
-+ + 6 * sizeof (struct gomp_task *));
-+ tsk->dependers->n_elem = 1;
-+ tsk->dependers->allocated = 6;
-+ tsk->dependers->elem[0] = task;
-+ task->num_dependees++;
-+ continue;
-+ }
-+ /* We already have some other dependency on tsk
-+ from earlier depend clause. */
-+ else if (tsk->dependers->n_elem
-+ && (tsk->dependers->elem[tsk->dependers->n_elem
-+ - 1]
-+ == task))
-+ continue;
-+ else if (tsk->dependers->n_elem
-+ == tsk->dependers->allocated)
-+ {
-+ tsk->dependers->allocated
-+ = tsk->dependers->allocated * 2 + 2;
-+ tsk->dependers
-+ = gomp_realloc (tsk->dependers,
-+ sizeof (struct gomp_dependers_vec)
-+ + (tsk->dependers->allocated
-+ * sizeof (struct gomp_task *)));
-+ }
-+ tsk->dependers->elem[tsk->dependers->n_elem++] = task;
-+ task->num_dependees++;
-+ }
-+ task->depend[i].next = *slot;
-+ (*slot)->prev = &task->depend[i];
-+ }
-+ *slot = &task->depend[i];
-+
-+ /* There is no need to store more than one depend({,in}out:)
-+ task per address in the hash table chain for the purpose
-+ of creation of deferred tasks, because each out
-+ depends on all earlier outs, thus it is enough to record
-+ just the last depend({,in}out:). For depend(in:), we need
-+ to keep all of the previous ones not terminated yet, because
-+ a later depend({,in}out:) might need to depend on all of
-+ them. So, if the new task's clause is depend({,in}out:),
-+ we know there is at most one other depend({,in}out:) clause
-+ in the list (out). For non-deferred tasks we want to see
-+ all outs, so they are moved to the end of the chain,
-+ after first redundant_out entry all following entries
-+ should be redundant_out. */
-+ if (!task->depend[i].is_in && out)
-+ {
-+ if (out != last)
-+ {
-+ out->next->prev = out->prev;
-+ out->prev->next = out->next;
-+ out->next = last->next;
-+ out->prev = last;
-+ last->next = out;
-+ if (out->next)
-+ out->next->prev = out;
-+ }
-+ out->redundant_out = true;
-+ }
-+ }
-+ if (task->num_dependees)
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ return;
-+ }
-+ }
- if (parent->children)
- {
- task->next_child = parent->children;
-@@ -171,6 +371,22 @@ GOMP_task (void (*fn) (void *), void *da
- task->prev_child = task;
- }
- parent->children = task;
-+ if (taskgroup)
-+ {
-+ if (taskgroup->children)
-+ {
-+ task->next_taskgroup = taskgroup->children;
-+ task->prev_taskgroup = taskgroup->children->prev_taskgroup;
-+ task->next_taskgroup->prev_taskgroup = task;
-+ task->prev_taskgroup->next_taskgroup = task;
-+ }
-+ else
-+ {
-+ task->next_taskgroup = task;
-+ task->prev_taskgroup = task;
-+ }
-+ taskgroup->children = task;
-+ }
- if (team->task_queue)
- {
- task->next_queue = team->task_queue;
-@@ -185,6 +401,7 @@ GOMP_task (void (*fn) (void *), void *da
- team->task_queue = task;
- }
- ++team->task_count;
-+ ++team->task_queued_count;
- gomp_team_barrier_set_task_pending (&team->barrier);
- do_wake = team->task_running_count + !parent->in_tied_task
- < team->nthreads;
-@@ -194,6 +411,265 @@ GOMP_task (void (*fn) (void *), void *da
- }
- }
-
-+static inline bool
-+gomp_task_run_pre (struct gomp_task *child_task, struct gomp_task *parent,
-+ struct gomp_taskgroup *taskgroup, struct gomp_team *team)
-+{
-+ if (parent)
-+ {
-+ if (parent->children == child_task)
-+ parent->children = child_task->next_child;
-+ if (__builtin_expect (child_task->parent_depends_on, 0)
-+ && parent->taskwait->last_parent_depends_on == child_task)
-+ {
-+ if (child_task->prev_child->kind == GOMP_TASK_WAITING
-+ && child_task->prev_child->parent_depends_on)
-+ parent->taskwait->last_parent_depends_on = child_task->prev_child;
-+ else
-+ parent->taskwait->last_parent_depends_on = NULL;
-+ }
-+ }
-+ if (taskgroup && taskgroup->children == child_task)
-+ taskgroup->children = child_task->next_taskgroup;
-+ child_task->prev_queue->next_queue = child_task->next_queue;
-+ child_task->next_queue->prev_queue = child_task->prev_queue;
-+ if (team->task_queue == child_task)
-+ {
-+ if (child_task->next_queue != child_task)
-+ team->task_queue = child_task->next_queue;
-+ else
-+ team->task_queue = NULL;
-+ }
-+ child_task->kind = GOMP_TASK_TIED;
-+ if (--team->task_queued_count == 0)
-+ gomp_team_barrier_clear_task_pending (&team->barrier);
-+ if ((gomp_team_barrier_cancelled (&team->barrier)
-+ || (taskgroup && taskgroup->cancelled))
-+ && !child_task->copy_ctors_done)
-+ return true;
-+ return false;
-+}
-+
-+static void
-+gomp_task_run_post_handle_depend_hash (struct gomp_task *child_task)
-+{
-+ struct gomp_task *parent = child_task->parent;
-+ size_t i;
-+
-+ for (i = 0; i < child_task->depend_count; i++)
-+ if (!child_task->depend[i].redundant)
-+ {
-+ if (child_task->depend[i].next)
-+ child_task->depend[i].next->prev = child_task->depend[i].prev;
-+ if (child_task->depend[i].prev)
-+ child_task->depend[i].prev->next = child_task->depend[i].next;
-+ else
-+ {
-+ hash_entry_type *slot
-+ = htab_find_slot (&parent->depend_hash, &child_task->depend[i],
-+ NO_INSERT);
-+ if (*slot != &child_task->depend[i])
-+ abort ();
-+ if (child_task->depend[i].next)
-+ *slot = child_task->depend[i].next;
-+ else
-+ htab_clear_slot (parent->depend_hash, slot);
-+ }
-+ }
-+}
-+
-+static size_t
-+gomp_task_run_post_handle_dependers (struct gomp_task *child_task,
-+ struct gomp_team *team)
-+{
-+ struct gomp_task *parent = child_task->parent;
-+ size_t i, count = child_task->dependers->n_elem, ret = 0;
-+ for (i = 0; i < count; i++)
-+ {
-+ struct gomp_task *task = child_task->dependers->elem[i];
-+ if (--task->num_dependees != 0)
-+ continue;
-+
-+ struct gomp_taskgroup *taskgroup = task->taskgroup;
-+ if (parent)
-+ {
-+ if (parent->children)
-+ {
-+ /* If parent is in gomp_task_maybe_wait_for_dependencies
-+ and it doesn't need to wait for this task, put it after
-+ all ready to run tasks it needs to wait for. */
-+ if (parent->taskwait && parent->taskwait->last_parent_depends_on
-+ && !task->parent_depends_on)
-+ {
-+ struct gomp_task *last_parent_depends_on
-+ = parent->taskwait->last_parent_depends_on;
-+ task->next_child = last_parent_depends_on->next_child;
-+ task->prev_child = last_parent_depends_on;
-+ }
-+ else
-+ {
-+ task->next_child = parent->children;
-+ task->prev_child = parent->children->prev_child;
-+ parent->children = task;
-+ }
-+ task->next_child->prev_child = task;
-+ task->prev_child->next_child = task;
-+ }
-+ else
-+ {
-+ task->next_child = task;
-+ task->prev_child = task;
-+ parent->children = task;
-+ }
-+ if (parent->taskwait)
-+ {
-+ if (parent->taskwait->in_taskwait)
-+ {
-+ parent->taskwait->in_taskwait = false;
-+ gomp_sem_post (&parent->taskwait->taskwait_sem);
-+ }
-+ else if (parent->taskwait->in_depend_wait)
-+ {
-+ parent->taskwait->in_depend_wait = false;
-+ gomp_sem_post (&parent->taskwait->taskwait_sem);
-+ }
-+ if (parent->taskwait->last_parent_depends_on == NULL
-+ && task->parent_depends_on)
-+ parent->taskwait->last_parent_depends_on = task;
-+ }
-+ }
-+ if (taskgroup)
-+ {
-+ if (taskgroup->children)
-+ {
-+ task->next_taskgroup = taskgroup->children;
-+ task->prev_taskgroup = taskgroup->children->prev_taskgroup;
-+ task->next_taskgroup->prev_taskgroup = task;
-+ task->prev_taskgroup->next_taskgroup = task;
-+ }
-+ else
-+ {
-+ task->next_taskgroup = task;
-+ task->prev_taskgroup = task;
-+ }
-+ taskgroup->children = task;
-+ if (taskgroup->in_taskgroup_wait)
-+ {
-+ taskgroup->in_taskgroup_wait = false;
-+ gomp_sem_post (&taskgroup->taskgroup_sem);
-+ }
-+ }
-+ if (team->task_queue)
-+ {
-+ task->next_queue = team->task_queue;
-+ task->prev_queue = team->task_queue->prev_queue;
-+ task->next_queue->prev_queue = task;
-+ task->prev_queue->next_queue = task;
-+ }
-+ else
-+ {
-+ task->next_queue = task;
-+ task->prev_queue = task;
-+ team->task_queue = task;
-+ }
-+ ++team->task_count;
-+ ++team->task_queued_count;
-+ ++ret;
-+ }
-+ free (child_task->dependers);
-+ child_task->dependers = NULL;
-+ if (ret > 1)
-+ gomp_team_barrier_set_task_pending (&team->barrier);
-+ return ret;
-+}
-+
-+static inline size_t
-+gomp_task_run_post_handle_depend (struct gomp_task *child_task,
-+ struct gomp_team *team)
-+{
-+ if (child_task->depend_count == 0)
-+ return 0;
-+
-+ /* If parent is gone already, the hash table is freed and nothing
-+ will use the hash table anymore, no need to remove anything from it. */
-+ if (child_task->parent != NULL)
-+ gomp_task_run_post_handle_depend_hash (child_task);
-+
-+ if (child_task->dependers == NULL)
-+ return 0;
-+
-+ return gomp_task_run_post_handle_dependers (child_task, team);
-+}
-+
-+static inline void
-+gomp_task_run_post_remove_parent (struct gomp_task *child_task)
-+{
-+ struct gomp_task *parent = child_task->parent;
-+ if (parent == NULL)
-+ return;
-+ if (__builtin_expect (child_task->parent_depends_on, 0)
-+ && --parent->taskwait->n_depend == 0
-+ && parent->taskwait->in_depend_wait)
-+ {
-+ parent->taskwait->in_depend_wait = false;
-+ gomp_sem_post (&parent->taskwait->taskwait_sem);
-+ }
-+ child_task->prev_child->next_child = child_task->next_child;
-+ child_task->next_child->prev_child = child_task->prev_child;
-+ if (parent->children != child_task)
-+ return;
-+ if (child_task->next_child != child_task)
-+ parent->children = child_task->next_child;
-+ else
-+ {
-+ /* We access task->children in GOMP_taskwait
-+ outside of the task lock mutex region, so
-+ need a release barrier here to ensure memory
-+ written by child_task->fn above is flushed
-+ before the NULL is written. */
-+ __atomic_store_n (&parent->children, NULL, MEMMODEL_RELEASE);
-+ if (parent->taskwait && parent->taskwait->in_taskwait)
-+ {
-+ parent->taskwait->in_taskwait = false;
-+ gomp_sem_post (&parent->taskwait->taskwait_sem);
-+ }
-+ }
-+}
-+
-+static inline void
-+gomp_task_run_post_remove_taskgroup (struct gomp_task *child_task)
-+{
-+ struct gomp_taskgroup *taskgroup = child_task->taskgroup;
-+ if (taskgroup == NULL)
-+ return;
-+ child_task->prev_taskgroup->next_taskgroup = child_task->next_taskgroup;
-+ child_task->next_taskgroup->prev_taskgroup = child_task->prev_taskgroup;
-+ if (taskgroup->num_children > 1)
-+ --taskgroup->num_children;
-+ else
-+ {
-+ /* We access taskgroup->num_children in GOMP_taskgroup_end
-+ outside of the task lock mutex region, so
-+ need a release barrier here to ensure memory
-+ written by child_task->fn above is flushed
-+ before the NULL is written. */
-+ __atomic_store_n (&taskgroup->num_children, 0, MEMMODEL_RELEASE);
-+ }
-+ if (taskgroup->children != child_task)
-+ return;
-+ if (child_task->next_taskgroup != child_task)
-+ taskgroup->children = child_task->next_taskgroup;
-+ else
-+ {
-+ taskgroup->children = NULL;
-+ if (taskgroup->in_taskgroup_wait)
-+ {
-+ taskgroup->in_taskgroup_wait = false;
-+ gomp_sem_post (&taskgroup->taskgroup_sem);
-+ }
-+ }
-+}
-+
- void
- gomp_barrier_handle_tasks (gomp_barrier_state_t state)
- {
-@@ -202,6 +678,7 @@ gomp_barrier_handle_tasks (gomp_barrier_
- struct gomp_task *task = thr->task;
- struct gomp_task *child_task = NULL;
- struct gomp_task *to_free = NULL;
-+ int do_wake = 0;
-
- gomp_mutex_lock (&team->task_lock);
- if (gomp_barrier_last_thread (state))
-@@ -218,26 +695,31 @@ gomp_barrier_handle_tasks (gomp_barrier_
-
- while (1)
- {
-+ bool cancelled = false;
- if (team->task_queue != NULL)
- {
-- struct gomp_task *parent;
--
- child_task = team->task_queue;
-- parent = child_task->parent;
-- if (parent && parent->children == child_task)
-- parent->children = child_task->next_child;
-- child_task->prev_queue->next_queue = child_task->next_queue;
-- child_task->next_queue->prev_queue = child_task->prev_queue;
-- if (child_task->next_queue != child_task)
-- team->task_queue = child_task->next_queue;
-- else
-- team->task_queue = NULL;
-- child_task->kind = GOMP_TASK_TIED;
-+ cancelled = gomp_task_run_pre (child_task, child_task->parent,
-+ child_task->taskgroup, team);
-+ if (__builtin_expect (cancelled, 0))
-+ {
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ goto finish_cancelled;
-+ }
- team->task_running_count++;
-- if (team->task_count == team->task_running_count)
-- gomp_team_barrier_clear_task_pending (&team->barrier);
-+ child_task->in_tied_task = true;
- }
- gomp_mutex_unlock (&team->task_lock);
-+ if (do_wake)
-+ {
-+ gomp_team_barrier_wake (&team->barrier, do_wake);
-+ do_wake = 0;
-+ }
- if (to_free)
- {
- gomp_finish_task (to_free);
-@@ -255,33 +737,22 @@ gomp_barrier_handle_tasks (gomp_barrier_
- gomp_mutex_lock (&team->task_lock);
- if (child_task)
- {
-- struct gomp_task *parent = child_task->parent;
-- if (parent)
-- {
-- child_task->prev_child->next_child = child_task->next_child;
-- child_task->next_child->prev_child = child_task->prev_child;
-- if (parent->children == child_task)
-- {
-- if (child_task->next_child != child_task)
-- parent->children = child_task->next_child;
-- else
-- {
-- /* We access task->children in GOMP_taskwait
-- outside of the task lock mutex region, so
-- need a release barrier here to ensure memory
-- written by child_task->fn above is flushed
-- before the NULL is written. */
-- __atomic_store_n (&parent->children, NULL,
-- MEMMODEL_RELEASE);
-- if (parent->in_taskwait)
-- gomp_sem_post (&parent->taskwait_sem);
-- }
-- }
-- }
-+ finish_cancelled:;
-+ size_t new_tasks
-+ = gomp_task_run_post_handle_depend (child_task, team);
-+ gomp_task_run_post_remove_parent (child_task);
- gomp_clear_parent (child_task->children);
-+ gomp_task_run_post_remove_taskgroup (child_task);
- to_free = child_task;
- child_task = NULL;
-- team->task_running_count--;
-+ if (!cancelled)
-+ team->task_running_count--;
-+ if (new_tasks > 1)
-+ {
-+ do_wake = team->nthreads - team->task_running_count;
-+ if (do_wake > new_tasks)
-+ do_wake = new_tasks;
-+ }
- if (--team->task_count == 0
- && gomp_team_barrier_waiting_for_tasks (&team->barrier))
- {
-@@ -304,9 +775,11 @@ GOMP_taskwait (void)
- struct gomp_task *task = thr->task;
- struct gomp_task *child_task = NULL;
- struct gomp_task *to_free = NULL;
-+ struct gomp_taskwait taskwait;
-+ int do_wake = 0;
-
- /* The acquire barrier on load of task->children here synchronizes
-- with the write of a NULL in gomp_barrier_handle_tasks. It is
-+ with the write of a NULL in gomp_task_run_post_remove_parent. It is
- not necessary that we synchronize with other non-NULL writes at
- this point, but we must ensure that all writes to memory by a
- child thread task work function are seen before we exit from
-@@ -315,42 +788,60 @@ GOMP_taskwait (void)
- || __atomic_load_n (&task->children, MEMMODEL_ACQUIRE) == NULL)
- return;
-
-+ memset (&taskwait, 0, sizeof (taskwait));
- gomp_mutex_lock (&team->task_lock);
- while (1)
- {
-+ bool cancelled = false;
- if (task->children == NULL)
- {
-+ bool destroy_taskwait = task->taskwait != NULL;
-+ task->taskwait = NULL;
- gomp_mutex_unlock (&team->task_lock);
- if (to_free)
- {
- gomp_finish_task (to_free);
- free (to_free);
- }
-+ if (destroy_taskwait)
-+ gomp_sem_destroy (&taskwait.taskwait_sem);
- return;
- }
- if (task->children->kind == GOMP_TASK_WAITING)
- {
- child_task = task->children;
-- task->children = child_task->next_child;
-- child_task->prev_queue->next_queue = child_task->next_queue;
-- child_task->next_queue->prev_queue = child_task->prev_queue;
-- if (team->task_queue == child_task)
-+ cancelled
-+ = gomp_task_run_pre (child_task, task, child_task->taskgroup,
-+ team);
-+ if (__builtin_expect (cancelled, 0))
- {
-- if (child_task->next_queue != child_task)
-- team->task_queue = child_task->next_queue;
-- else
-- team->task_queue = NULL;
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ goto finish_cancelled;
- }
-- child_task->kind = GOMP_TASK_TIED;
-- team->task_running_count++;
-- if (team->task_count == team->task_running_count)
-- gomp_team_barrier_clear_task_pending (&team->barrier);
- }
- else
-- /* All tasks we are waiting for are already running
-- in other threads. Wait for them. */
-- task->in_taskwait = true;
-+ {
-+ /* All tasks we are waiting for are already running
-+ in other threads. Wait for them. */
-+ if (task->taskwait == NULL)
-+ {
-+ taskwait.in_depend_wait = false;
-+ gomp_sem_init (&taskwait.taskwait_sem, 0);
-+ task->taskwait = &taskwait;
-+ }
-+ taskwait.in_taskwait = true;
-+ }
- gomp_mutex_unlock (&team->task_lock);
-+ if (do_wake)
-+ {
-+ gomp_team_barrier_wake (&team->barrier, do_wake);
-+ do_wake = 0;
-+ }
- if (to_free)
- {
- gomp_finish_task (to_free);
-@@ -364,14 +855,178 @@ GOMP_taskwait (void)
- thr->task = task;
- }
- else
-+ gomp_sem_wait (&taskwait.taskwait_sem);
-+ gomp_mutex_lock (&team->task_lock);
-+ if (child_task)
- {
-- gomp_sem_wait (&task->taskwait_sem);
-- task->in_taskwait = false;
-+ finish_cancelled:;
-+ size_t new_tasks
-+ = gomp_task_run_post_handle_depend (child_task, team);
-+ child_task->prev_child->next_child = child_task->next_child;
-+ child_task->next_child->prev_child = child_task->prev_child;
-+ if (task->children == child_task)
-+ {
-+ if (child_task->next_child != child_task)
-+ task->children = child_task->next_child;
-+ else
-+ task->children = NULL;
-+ }
-+ gomp_clear_parent (child_task->children);
-+ gomp_task_run_post_remove_taskgroup (child_task);
-+ to_free = child_task;
-+ child_task = NULL;
-+ team->task_count--;
-+ if (new_tasks > 1)
-+ {
-+ do_wake = team->nthreads - team->task_running_count
-+ - !task->in_tied_task;
-+ if (do_wake > new_tasks)
-+ do_wake = new_tasks;
-+ }
-+ }
-+ }
-+}
-+
-+/* This is like GOMP_taskwait, but we only wait for tasks that the
-+ upcoming task depends on. */
-+
-+static void
-+gomp_task_maybe_wait_for_dependencies (void **depend)
-+{
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_task *task = thr->task;
-+ struct gomp_team *team = thr->ts.team;
-+ struct gomp_task_depend_entry elem, *ent = NULL;
-+ struct gomp_taskwait taskwait;
-+ struct gomp_task *last_parent_depends_on = NULL;
-+ size_t ndepend = (uintptr_t) depend[0];
-+ size_t nout = (uintptr_t) depend[1];
-+ size_t i;
-+ size_t num_awaited = 0;
-+ struct gomp_task *child_task = NULL;
-+ struct gomp_task *to_free = NULL;
-+ int do_wake = 0;
-+
-+ gomp_mutex_lock (&team->task_lock);
-+ for (i = 0; i < ndepend; i++)
-+ {
-+ elem.addr = depend[i + 2];
-+ ent = htab_find (task->depend_hash, &elem);
-+ for (; ent; ent = ent->next)
-+ if (i >= nout && ent->is_in)
-+ continue;
-+ else
-+ {
-+ struct gomp_task *tsk = ent->task;
-+ if (!tsk->parent_depends_on)
-+ {
-+ tsk->parent_depends_on = true;
-+ ++num_awaited;
-+ if (tsk->num_dependees == 0 && tsk->kind == GOMP_TASK_WAITING)
-+ {
-+ /* If a task we need to wait for is not already
-+ running and is ready to be scheduled, move it
-+ to front, so that we run it as soon as possible. */
-+ if (last_parent_depends_on)
-+ {
-+ tsk->prev_child->next_child = tsk->next_child;
-+ tsk->next_child->prev_child = tsk->prev_child;
-+ tsk->prev_child = last_parent_depends_on;
-+ tsk->next_child = last_parent_depends_on->next_child;
-+ tsk->prev_child->next_child = tsk;
-+ tsk->next_child->prev_child = tsk;
-+ }
-+ else if (tsk != task->children)
-+ {
-+ tsk->prev_child->next_child = tsk->next_child;
-+ tsk->next_child->prev_child = tsk->prev_child;
-+ tsk->prev_child = task->children;
-+ tsk->next_child = task->children->next_child;
-+ task->children = tsk;
-+ tsk->prev_child->next_child = tsk;
-+ tsk->next_child->prev_child = tsk;
-+ }
-+ last_parent_depends_on = tsk;
-+ }
-+ }
-+ }
-+ }
-+ if (num_awaited == 0)
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ return;
-+ }
-+
-+ memset (&taskwait, 0, sizeof (taskwait));
-+ taskwait.n_depend = num_awaited;
-+ taskwait.last_parent_depends_on = last_parent_depends_on;
-+ gomp_sem_init (&taskwait.taskwait_sem, 0);
-+ task->taskwait = &taskwait;
-+
-+ while (1)
-+ {
-+ bool cancelled = false;
-+ if (taskwait.n_depend == 0)
-+ {
-+ task->taskwait = NULL;
-+ gomp_mutex_unlock (&team->task_lock);
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ }
-+ gomp_sem_destroy (&taskwait.taskwait_sem);
- return;
- }
-+ if (task->children->kind == GOMP_TASK_WAITING)
-+ {
-+ child_task = task->children;
-+ cancelled
-+ = gomp_task_run_pre (child_task, task, child_task->taskgroup,
-+ team);
-+ if (__builtin_expect (cancelled, 0))
-+ {
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ goto finish_cancelled;
-+ }
-+ }
-+ else
-+ /* All tasks we are waiting for are already running
-+ in other threads. Wait for them. */
-+ taskwait.in_depend_wait = true;
-+ gomp_mutex_unlock (&team->task_lock);
-+ if (do_wake)
-+ {
-+ gomp_team_barrier_wake (&team->barrier, do_wake);
-+ do_wake = 0;
-+ }
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ if (child_task)
-+ {
-+ thr->task = child_task;
-+ child_task->fn (child_task->fn_data);
-+ thr->task = task;
-+ }
-+ else
-+ gomp_sem_wait (&taskwait.taskwait_sem);
- gomp_mutex_lock (&team->task_lock);
- if (child_task)
- {
-+ finish_cancelled:;
-+ size_t new_tasks
-+ = gomp_task_run_post_handle_depend (child_task, team);
-+ if (child_task->parent_depends_on)
-+ --taskwait.n_depend;
- child_task->prev_child->next_child = child_task->next_child;
- child_task->next_child->prev_child = child_task->prev_child;
- if (task->children == child_task)
-@@ -382,10 +1037,17 @@ GOMP_taskwait (void)
- task->children = NULL;
- }
- gomp_clear_parent (child_task->children);
-+ gomp_task_run_post_remove_taskgroup (child_task);
- to_free = child_task;
- child_task = NULL;
- team->task_count--;
-- team->task_running_count--;
-+ if (new_tasks > 1)
-+ {
-+ do_wake = team->nthreads - team->task_running_count
-+ - !task->in_tied_task;
-+ if (do_wake > new_tasks)
-+ do_wake = new_tasks;
-+ }
- }
- }
- }
-@@ -398,6 +1060,151 @@ GOMP_taskyield (void)
- /* Nothing at the moment. */
- }
-
-+void
-+GOMP_taskgroup_start (void)
-+{
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+ struct gomp_task *task = thr->task;
-+ struct gomp_taskgroup *taskgroup;
-+
-+ /* If team is NULL, all tasks are executed as
-+ GOMP_TASK_IFFALSE tasks and thus all children tasks of
-+ taskgroup and their descendant tasks will be finished
-+ by the time GOMP_taskgroup_end is called. */
-+ if (team == NULL)
-+ return;
-+ taskgroup = gomp_malloc (sizeof (struct gomp_taskgroup));
-+ taskgroup->prev = task->taskgroup;
-+ taskgroup->children = NULL;
-+ taskgroup->in_taskgroup_wait = false;
-+ taskgroup->cancelled = false;
-+ taskgroup->num_children = 0;
-+ gomp_sem_init (&taskgroup->taskgroup_sem, 0);
-+ task->taskgroup = taskgroup;
-+}
-+
-+void
-+GOMP_taskgroup_end (void)
-+{
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+ struct gomp_task *task = thr->task;
-+ struct gomp_taskgroup *taskgroup;
-+ struct gomp_task *child_task = NULL;
-+ struct gomp_task *to_free = NULL;
-+ int do_wake = 0;
-+
-+ if (team == NULL)
-+ return;
-+ taskgroup = task->taskgroup;
-+
-+ /* The acquire barrier on load of taskgroup->num_children here
-+ synchronizes with the write of 0 in gomp_task_run_post_remove_taskgroup.
-+ It is not necessary that we synchronize with other non-0 writes at
-+ this point, but we must ensure that all writes to memory by a
-+ child thread task work function are seen before we exit from
-+ GOMP_taskgroup_end. */
-+ if (__atomic_load_n (&taskgroup->num_children, MEMMODEL_ACQUIRE) == 0)
-+ goto finish;
-+
-+ gomp_mutex_lock (&team->task_lock);
-+ while (1)
-+ {
-+ bool cancelled = false;
-+ if (taskgroup->children == NULL)
-+ {
-+ if (taskgroup->num_children)
-+ {
-+ if (task->children == NULL)
-+ goto do_wait;
-+ child_task = task->children;
-+ }
-+ else
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ }
-+ goto finish;
-+ }
-+ }
-+ else
-+ child_task = taskgroup->children;
-+ if (child_task->kind == GOMP_TASK_WAITING)
-+ {
-+ cancelled
-+ = gomp_task_run_pre (child_task, child_task->parent, taskgroup,
-+ team);
-+ if (__builtin_expect (cancelled, 0))
-+ {
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ goto finish_cancelled;
-+ }
-+ }
-+ else
-+ {
-+ child_task = NULL;
-+ do_wait:
-+ /* All tasks we are waiting for are already running
-+ in other threads. Wait for them. */
-+ taskgroup->in_taskgroup_wait = true;
-+ }
-+ gomp_mutex_unlock (&team->task_lock);
-+ if (do_wake)
-+ {
-+ gomp_team_barrier_wake (&team->barrier, do_wake);
-+ do_wake = 0;
-+ }
-+ if (to_free)
-+ {
-+ gomp_finish_task (to_free);
-+ free (to_free);
-+ to_free = NULL;
-+ }
-+ if (child_task)
-+ {
-+ thr->task = child_task;
-+ child_task->fn (child_task->fn_data);
-+ thr->task = task;
-+ }
-+ else
-+ gomp_sem_wait (&taskgroup->taskgroup_sem);
-+ gomp_mutex_lock (&team->task_lock);
-+ if (child_task)
-+ {
-+ finish_cancelled:;
-+ size_t new_tasks
-+ = gomp_task_run_post_handle_depend (child_task, team);
-+ gomp_task_run_post_remove_parent (child_task);
-+ gomp_clear_parent (child_task->children);
-+ gomp_task_run_post_remove_taskgroup (child_task);
-+ to_free = child_task;
-+ child_task = NULL;
-+ team->task_count--;
-+ if (new_tasks > 1)
-+ {
-+ do_wake = team->nthreads - team->task_running_count
-+ - !task->in_tied_task;
-+ if (do_wake > new_tasks)
-+ do_wake = new_tasks;
-+ }
-+ }
-+ }
-+
-+ finish:
-+ task->taskgroup = taskgroup->prev;
-+ gomp_sem_destroy (&taskgroup->taskgroup_sem);
-+ free (taskgroup);
-+}
-+
- int
- omp_in_final (void)
- {
---- libgomp/testsuite/libgomp.fortran/lib3.f (revision 210461)
-+++ libgomp/testsuite/libgomp.fortran/lib3.f (revision 210462)
-@@ -66,6 +66,7 @@ C$OMP END PARALLEL
- C$OMP PARALLEL REDUCTION (.OR.:L) IF (.TRUE.)
- L = .NOT. OMP_IN_PARALLEL ()
- C$OMP END PARALLEL
-+ IF (L) CALL ABORT
-
- E = OMP_GET_WTIME ()
- IF (D .GT. E) CALL ABORT
---- libgomp/testsuite/libgomp.fortran/lib1.f90 (revision 210461)
-+++ libgomp/testsuite/libgomp.fortran/lib1.f90 (revision 210462)
-@@ -66,6 +66,7 @@
- !$omp parallel reduction (.or.:l) if (.true.)
- l = .not. omp_in_parallel ()
- !$omp end parallel
-+ if (l) call abort
-
- e = omp_get_wtime ()
- if (d .gt. e) call abort
---- libgomp/testsuite/libgomp.fortran/lib2.f (revision 210461)
-+++ libgomp/testsuite/libgomp.fortran/lib2.f (revision 210462)
-@@ -66,6 +66,7 @@ C$OMP END PARALLEL
- C$OMP PARALLEL REDUCTION (.OR.:L) IF (.TRUE.)
- L = .NOT. OMP_IN_PARALLEL ()
- C$OMP END PARALLEL
-+ IF (L) CALL ABORT
-
- E = OMP_GET_WTIME ()
- IF (D .GT. E) CALL ABORT
---- libgomp/testsuite/libgomp.c/atomic-14.c (revision 210461)
-+++ libgomp/testsuite/libgomp.c/atomic-14.c (revision 210462)
-@@ -16,7 +16,7 @@ main ()
- #pragma omp atomic update
- x = x + 7;
- #pragma omp atomic
-- x = x + 7 + 6;
-+ x = x + (7 + 6);
- #pragma omp atomic update
- x = x + 2 * 3;
- #pragma omp atomic
-@@ -65,7 +65,7 @@ main ()
- if (v != -8)
- abort ();
- #pragma omp atomic
-- x = x * -4 / 2;
-+ x = x * (-4 / 2);
- #pragma omp atomic read
- v = x;
- if (v != 16)
---- libgomp/testsuite/libgomp.c/lib-1.c (revision 210461)
-+++ libgomp/testsuite/libgomp.c/lib-1.c (revision 210462)
-@@ -85,6 +85,8 @@ main (void)
- l = ! omp_in_parallel ();
- #pragma omp parallel reduction (|:l) if (1)
- l = ! omp_in_parallel ();
-+ if (l)
-+ abort ();
-
- e = omp_get_wtime ();
- if (d > e)
---- libgomp/loop.c (revision 210461)
-+++ libgomp/loop.c (revision 210462)
-@@ -439,14 +439,14 @@ static void
- gomp_parallel_loop_start (void (*fn) (void *), void *data,
- unsigned num_threads, long start, long end,
- long incr, enum gomp_schedule_type sched,
-- long chunk_size)
-+ long chunk_size, unsigned int flags)
- {
- struct gomp_team *team;
-
- num_threads = gomp_resolve_num_threads (num_threads, 0);
- team = gomp_new_team (num_threads);
- gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
-- gomp_team_start (fn, data, num_threads, team);
-+ gomp_team_start (fn, data, num_threads, flags, team);
- }
-
- void
-@@ -455,7 +455,7 @@ GOMP_parallel_loop_static_start (void (*
- long incr, long chunk_size)
- {
- gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-- GFS_STATIC, chunk_size);
-+ GFS_STATIC, chunk_size, 0);
- }
-
- void
-@@ -464,7 +464,7 @@ GOMP_parallel_loop_dynamic_start (void (
- long incr, long chunk_size)
- {
- gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-- GFS_DYNAMIC, chunk_size);
-+ GFS_DYNAMIC, chunk_size, 0);
- }
-
- void
-@@ -473,7 +473,7 @@ GOMP_parallel_loop_guided_start (void (*
- long incr, long chunk_size)
- {
- gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-- GFS_GUIDED, chunk_size);
-+ GFS_GUIDED, chunk_size, 0);
- }
-
- void
-@@ -483,11 +483,59 @@ GOMP_parallel_loop_runtime_start (void (
- {
- struct gomp_task_icv *icv = gomp_icv (false);
- gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-- icv->run_sched_var, icv->run_sched_modifier);
-+ icv->run_sched_var, icv->run_sched_modifier, 0);
-+}
-+
-+ialias_redirect (GOMP_parallel_end)
-+
-+void
-+GOMP_parallel_loop_static (void (*fn) (void *), void *data,
-+ unsigned num_threads, long start, long end,
-+ long incr, long chunk_size, unsigned flags)
-+{
-+ gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-+ GFS_STATIC, chunk_size, flags);
-+ fn (data);
-+ GOMP_parallel_end ();
-+}
-+
-+void
-+GOMP_parallel_loop_dynamic (void (*fn) (void *), void *data,
-+ unsigned num_threads, long start, long end,
-+ long incr, long chunk_size, unsigned flags)
-+{
-+ gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-+ GFS_DYNAMIC, chunk_size, flags);
-+ fn (data);
-+ GOMP_parallel_end ();
-+}
-+
-+void
-+GOMP_parallel_loop_guided (void (*fn) (void *), void *data,
-+ unsigned num_threads, long start, long end,
-+ long incr, long chunk_size, unsigned flags)
-+{
-+ gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-+ GFS_GUIDED, chunk_size, flags);
-+ fn (data);
-+ GOMP_parallel_end ();
-+}
-+
-+void
-+GOMP_parallel_loop_runtime (void (*fn) (void *), void *data,
-+ unsigned num_threads, long start, long end,
-+ long incr, unsigned flags)
-+{
-+ struct gomp_task_icv *icv = gomp_icv (false);
-+ gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
-+ icv->run_sched_var, icv->run_sched_modifier,
-+ flags);
-+ fn (data);
-+ GOMP_parallel_end ();
- }
-
- /* The GOMP_loop_end* routines are called after the thread is told that
-- all loop iterations are complete. This first version synchronizes
-+ all loop iterations are complete. The first two versions synchronize
- all threads; the nowait version does not. */
-
- void
-@@ -496,6 +544,12 @@ GOMP_loop_end (void)
- gomp_work_share_end ();
- }
-
-+bool
-+GOMP_loop_end_cancel (void)
-+{
-+ return gomp_work_share_end_cancel ();
-+}
-+
- void
- GOMP_loop_end_nowait (void)
- {
---- libgomp/hashtab.h (revision 0)
-+++ libgomp/hashtab.h (revision 210462)
-@@ -0,0 +1,443 @@
-+/* An expandable hash tables datatype.
-+ Copyright (C) 1999-2013
-+ Free Software Foundation, Inc.
-+ Contributed by Vladimir Makarov .
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or
-+(at your option) any later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; if not, write to the Free Software
-+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-+
-+/* The hash table code copied from include/hashtab.[hc] and adjusted,
-+ so that the hash table entries are in the flexible array at the end
-+ of the control structure, no callbacks are used and the elements in the
-+ table are of the hash_entry_type type.
-+ Before including this file, define hash_entry_type type and
-+ htab_alloc and htab_free functions. After including it, define
-+ htab_hash and htab_eq inline functions. */
-+
-+/* This package implements basic hash table functionality. It is possible
-+ to search for an entry, create an entry and destroy an entry.
-+
-+ Elements in the table are generic pointers.
-+
-+ The size of the table is not fixed; if the occupancy of the table
-+ grows too high the hash table will be expanded.
-+
-+ The abstract data implementation is based on generalized Algorithm D
-+ from Knuth's book "The art of computer programming". Hash table is
-+ expanded by creation of new hash table and transferring elements from
-+ the old table to the new table. */
-+
-+/* The type for a hash code. */
-+typedef unsigned int hashval_t;
-+
-+static inline hashval_t htab_hash (hash_entry_type);
-+static inline bool htab_eq (hash_entry_type, hash_entry_type);
-+
-+/* This macro defines reserved value for empty table entry. */
-+
-+#define HTAB_EMPTY_ENTRY ((hash_entry_type) 0)
-+
-+/* This macro defines reserved value for table entry which contained
-+ a deleted element. */
-+
-+#define HTAB_DELETED_ENTRY ((hash_entry_type) 1)
-+
-+/* Hash tables are of the following type. The structure
-+ (implementation) of this type is not needed for using the hash
-+ tables. All work with hash table should be executed only through
-+ functions mentioned below. The size of this structure is subject to
-+ change. */
-+
-+struct htab {
-+ /* Current size (in entries) of the hash table. */
-+ size_t size;
-+
-+ /* Current number of elements including also deleted elements. */
-+ size_t n_elements;
-+
-+ /* Current number of deleted elements in the table. */
-+ size_t n_deleted;
-+
-+ /* Current size (in entries) of the hash table, as an index into the
-+ table of primes. */
-+ unsigned int size_prime_index;
-+
-+ /* Table itself. */
-+ hash_entry_type entries[];
-+};
-+
-+typedef struct htab *htab_t;
-+
-+/* An enum saying whether we insert into the hash table or not. */
-+enum insert_option {NO_INSERT, INSERT};
-+
-+/* Table of primes and multiplicative inverses.
-+
-+ Note that these are not minimally reduced inverses. Unlike when generating
-+ code to divide by a constant, we want to be able to use the same algorithm
-+ all the time. All of these inverses (are implied to) have bit 32 set.
-+
-+ For the record, the function that computed the table is in
-+ libiberty/hashtab.c. */
-+
-+struct prime_ent
-+{
-+ hashval_t prime;
-+ hashval_t inv;
-+ hashval_t inv_m2; /* inverse of prime-2 */
-+ hashval_t shift;
-+};
-+
-+static struct prime_ent const prime_tab[] = {
-+ { 7, 0x24924925, 0x9999999b, 2 },
-+ { 13, 0x3b13b13c, 0x745d1747, 3 },
-+ { 31, 0x08421085, 0x1a7b9612, 4 },
-+ { 61, 0x0c9714fc, 0x15b1e5f8, 5 },
-+ { 127, 0x02040811, 0x0624dd30, 6 },
-+ { 251, 0x05197f7e, 0x073260a5, 7 },
-+ { 509, 0x01824366, 0x02864fc8, 8 },
-+ { 1021, 0x00c0906d, 0x014191f7, 9 },
-+ { 2039, 0x0121456f, 0x0161e69e, 10 },
-+ { 4093, 0x00300902, 0x00501908, 11 },
-+ { 8191, 0x00080041, 0x00180241, 12 },
-+ { 16381, 0x000c0091, 0x00140191, 13 },
-+ { 32749, 0x002605a5, 0x002a06e6, 14 },
-+ { 65521, 0x000f00e2, 0x00110122, 15 },
-+ { 131071, 0x00008001, 0x00018003, 16 },
-+ { 262139, 0x00014002, 0x0001c004, 17 },
-+ { 524287, 0x00002001, 0x00006001, 18 },
-+ { 1048573, 0x00003001, 0x00005001, 19 },
-+ { 2097143, 0x00004801, 0x00005801, 20 },
-+ { 4194301, 0x00000c01, 0x00001401, 21 },
-+ { 8388593, 0x00001e01, 0x00002201, 22 },
-+ { 16777213, 0x00000301, 0x00000501, 23 },
-+ { 33554393, 0x00001381, 0x00001481, 24 },
-+ { 67108859, 0x00000141, 0x000001c1, 25 },
-+ { 134217689, 0x000004e1, 0x00000521, 26 },
-+ { 268435399, 0x00000391, 0x000003b1, 27 },
-+ { 536870909, 0x00000019, 0x00000029, 28 },
-+ { 1073741789, 0x0000008d, 0x00000095, 29 },
-+ { 2147483647, 0x00000003, 0x00000007, 30 },
-+ /* Avoid "decimal constant so large it is unsigned" for 4294967291. */
-+ { 0xfffffffb, 0x00000006, 0x00000008, 31 }
-+};
-+
-+/* The following function returns an index into the above table of the
-+ nearest prime number which is greater than N, and near a power of two. */
-+
-+static unsigned int
-+higher_prime_index (unsigned long n)
-+{
-+ unsigned int low = 0;
-+ unsigned int high = sizeof(prime_tab) / sizeof(prime_tab[0]);
-+
-+ while (low != high)
-+ {
-+ unsigned int mid = low + (high - low) / 2;
-+ if (n > prime_tab[mid].prime)
-+ low = mid + 1;
-+ else
-+ high = mid;
-+ }
-+
-+ /* If we've run out of primes, abort. */
-+ if (n > prime_tab[low].prime)
-+ abort ();
-+
-+ return low;
-+}
-+
-+/* Return the current size of given hash table. */
-+
-+static inline size_t
-+htab_size (htab_t htab)
-+{
-+ return htab->size;
-+}
-+
-+/* Return the current number of elements in given hash table. */
-+
-+static inline size_t
-+htab_elements (htab_t htab)
-+{
-+ return htab->n_elements - htab->n_deleted;
-+}
-+
-+/* Return X % Y. */
-+
-+static inline hashval_t
-+htab_mod_1 (hashval_t x, hashval_t y, hashval_t inv, int shift)
-+{
-+ /* The multiplicative inverses computed above are for 32-bit types, and
-+ requires that we be able to compute a highpart multiply. */
-+ if (sizeof (hashval_t) * __CHAR_BIT__ <= 32)
-+ {
-+ hashval_t t1, t2, t3, t4, q, r;
-+
-+ t1 = ((unsigned long long)x * inv) >> 32;
-+ t2 = x - t1;
-+ t3 = t2 >> 1;
-+ t4 = t1 + t3;
-+ q = t4 >> shift;
-+ r = x - (q * y);
-+
-+ return r;
-+ }
-+
-+ /* Otherwise just use the native division routines. */
-+ return x % y;
-+}
-+
-+/* Compute the primary hash for HASH given HTAB's current size. */
-+
-+static inline hashval_t
-+htab_mod (hashval_t hash, htab_t htab)
-+{
-+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
-+ return htab_mod_1 (hash, p->prime, p->inv, p->shift);
-+}
-+
-+/* Compute the secondary hash for HASH given HTAB's current size. */
-+
-+static inline hashval_t
-+htab_mod_m2 (hashval_t hash, htab_t htab)
-+{
-+ const struct prime_ent *p = &prime_tab[htab->size_prime_index];
-+ return 1 + htab_mod_1 (hash, p->prime - 2, p->inv_m2, p->shift);
-+}
-+
-+/* Create hash table of size SIZE. */
-+
-+static htab_t
-+htab_create (size_t size)
-+{
-+ htab_t result;
-+ unsigned int size_prime_index;
-+
-+ size_prime_index = higher_prime_index (size);
-+ size = prime_tab[size_prime_index].prime;
-+
-+ result = (htab_t) htab_alloc (sizeof (struct htab)
-+ + size * sizeof (hash_entry_type));
-+ result->size = size;
-+ result->n_elements = 0;
-+ result->n_deleted = 0;
-+ result->size_prime_index = size_prime_index;
-+ memset (result->entries, 0, size * sizeof (hash_entry_type));
-+ return result;
-+}
-+
-+/* Similar to htab_find_slot, but without several unwanted side effects:
-+ - Does not call htab_eq when it finds an existing entry.
-+ - Does not change the count of elements in the hash table.
-+ This function also assumes there are no deleted entries in the table.
-+ HASH is the hash value for the element to be inserted. */
-+
-+static hash_entry_type *
-+find_empty_slot_for_expand (htab_t htab, hashval_t hash)
-+{
-+ hashval_t index = htab_mod (hash, htab);
-+ size_t size = htab_size (htab);
-+ hash_entry_type *slot = htab->entries + index;
-+ hashval_t hash2;
-+
-+ if (*slot == HTAB_EMPTY_ENTRY)
-+ return slot;
-+ else if (*slot == HTAB_DELETED_ENTRY)
-+ abort ();
-+
-+ hash2 = htab_mod_m2 (hash, htab);
-+ for (;;)
-+ {
-+ index += hash2;
-+ if (index >= size)
-+ index -= size;
-+
-+ slot = htab->entries + index;
-+ if (*slot == HTAB_EMPTY_ENTRY)
-+ return slot;
-+ else if (*slot == HTAB_DELETED_ENTRY)
-+ abort ();
-+ }
-+}
-+
-+/* The following function changes size of memory allocated for the
-+ entries and repeatedly inserts the table elements. The occupancy
-+ of the table after the call will be about 50%. Naturally the hash
-+ table must already exist. Remember also that the place of the
-+ table entries is changed. */
-+
-+static htab_t
-+htab_expand (htab_t htab)
-+{
-+ htab_t nhtab;
-+ hash_entry_type *olimit;
-+ hash_entry_type *p;
-+ size_t osize, elts;
-+
-+ osize = htab->size;
-+ olimit = htab->entries + osize;
-+ elts = htab_elements (htab);
-+
-+ /* Resize only when table after removal of unused elements is either
-+ too full or too empty. */
-+ if (elts * 2 > osize || (elts * 8 < osize && osize > 32))
-+ nhtab = htab_create (elts * 2);
-+ else
-+ nhtab = htab_create (osize - 1);
-+ nhtab->n_elements = htab->n_elements - htab->n_deleted;
-+
-+ p = htab->entries;
-+ do
-+ {
-+ hash_entry_type x = *p;
-+
-+ if (x != HTAB_EMPTY_ENTRY && x != HTAB_DELETED_ENTRY)
-+ *find_empty_slot_for_expand (nhtab, htab_hash (x)) = x;
-+
-+ p++;
-+ }
-+ while (p < olimit);
-+
-+ htab_free (htab);
-+ return nhtab;
-+}
-+
-+/* This function searches for a hash table entry equal to the given
-+ element. It cannot be used to insert or delete an element. */
-+
-+static hash_entry_type
-+htab_find (htab_t htab, const hash_entry_type element)
-+{
-+ hashval_t index, hash2, hash = htab_hash (element);
-+ size_t size;
-+ hash_entry_type entry;
-+
-+ size = htab_size (htab);
-+ index = htab_mod (hash, htab);
-+
-+ entry = htab->entries[index];
-+ if (entry == HTAB_EMPTY_ENTRY
-+ || (entry != HTAB_DELETED_ENTRY && htab_eq (entry, element)))
-+ return entry;
-+
-+ hash2 = htab_mod_m2 (hash, htab);
-+ for (;;)
-+ {
-+ index += hash2;
-+ if (index >= size)
-+ index -= size;
-+
-+ entry = htab->entries[index];
-+ if (entry == HTAB_EMPTY_ENTRY
-+ || (entry != HTAB_DELETED_ENTRY && htab_eq (entry, element)))
-+ return entry;
-+ }
-+}
-+
-+/* This function searches for a hash table slot containing an entry
-+ equal to the given element. To delete an entry, call this with
-+ insert=NO_INSERT, then call htab_clear_slot on the slot returned
-+ (possibly after doing some checks). To insert an entry, call this
-+ with insert=INSERT, then write the value you want into the returned
-+ slot. */
-+
-+static hash_entry_type *
-+htab_find_slot (htab_t *htabp, const hash_entry_type element,
-+ enum insert_option insert)
-+{
-+ hash_entry_type *first_deleted_slot;
-+ hashval_t index, hash2, hash = htab_hash (element);
-+ size_t size;
-+ hash_entry_type entry;
-+ htab_t htab = *htabp;
-+
-+ size = htab_size (htab);
-+ if (insert == INSERT && size * 3 <= htab->n_elements * 4)
-+ {
-+ htab = *htabp = htab_expand (htab);
-+ size = htab_size (htab);
-+ }
-+
-+ index = htab_mod (hash, htab);
-+
-+ first_deleted_slot = NULL;
-+
-+ entry = htab->entries[index];
-+ if (entry == HTAB_EMPTY_ENTRY)
-+ goto empty_entry;
-+ else if (entry == HTAB_DELETED_ENTRY)
-+ first_deleted_slot = &htab->entries[index];
-+ else if (htab_eq (entry, element))
-+ return &htab->entries[index];
-+
-+ hash2 = htab_mod_m2 (hash, htab);
-+ for (;;)
-+ {
-+ index += hash2;
-+ if (index >= size)
-+ index -= size;
-+
-+ entry = htab->entries[index];
-+ if (entry == HTAB_EMPTY_ENTRY)
-+ goto empty_entry;
-+ else if (entry == HTAB_DELETED_ENTRY)
-+ {
-+ if (!first_deleted_slot)
-+ first_deleted_slot = &htab->entries[index];
-+ }
-+ else if (htab_eq (entry, element))
-+ return &htab->entries[index];
-+ }
-+
-+ empty_entry:
-+ if (insert == NO_INSERT)
-+ return NULL;
-+
-+ if (first_deleted_slot)
-+ {
-+ htab->n_deleted--;
-+ *first_deleted_slot = HTAB_EMPTY_ENTRY;
-+ return first_deleted_slot;
-+ }
-+
-+ htab->n_elements++;
-+ return &htab->entries[index];
-+}
-+
-+/* This function clears a specified slot in a hash table. It is
-+ useful when you've already done the lookup and don't want to do it
-+ again. */
-+
-+static inline void
-+htab_clear_slot (htab_t htab, hash_entry_type *slot)
-+{
-+ if (slot < htab->entries || slot >= htab->entries + htab_size (htab)
-+ || *slot == HTAB_EMPTY_ENTRY || *slot == HTAB_DELETED_ENTRY)
-+ abort ();
-+
-+ *slot = HTAB_DELETED_ENTRY;
-+ htab->n_deleted++;
-+}
-+
-+/* Returns a hash code for pointer P. Simplified version of evahash */
-+
-+static inline hashval_t
-+hash_pointer (const void *p)
-+{
-+ uintptr_t v = (uintptr_t) p;
-+ if (sizeof (v) > sizeof (hashval_t))
-+ v ^= v >> (sizeof (uintptr_t) / 2 * __CHAR_BIT__);
-+ return v;
-+}
---- libgomp/work.c (revision 210461)
-+++ libgomp/work.c (revision 210462)
-@@ -221,7 +221,10 @@ gomp_work_share_end (void)
- if (gomp_barrier_last_thread (bstate))
- {
- if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
-- free_work_share (team, thr->ts.last_work_share);
-+ {
-+ team->work_shares_to_free = thr->ts.work_share;
-+ free_work_share (team, thr->ts.last_work_share);
-+ }
- }
-
- gomp_team_barrier_wait_end (&team->barrier, bstate);
-@@ -229,6 +232,32 @@ gomp_work_share_end (void)
- }
-
- /* The current thread is done with its current work sharing construct.
-+ This version implies a cancellable barrier at the end of the work-share. */
-+
-+bool
-+gomp_work_share_end_cancel (void)
-+{
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+ gomp_barrier_state_t bstate;
-+
-+ /* Cancellable work sharing constructs cannot be orphaned. */
-+ bstate = gomp_barrier_wait_cancel_start (&team->barrier);
-+
-+ if (gomp_barrier_last_thread (bstate))
-+ {
-+ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
-+ {
-+ team->work_shares_to_free = thr->ts.work_share;
-+ free_work_share (team, thr->ts.last_work_share);
-+ }
-+ }
-+ thr->ts.last_work_share = NULL;
-+
-+ return gomp_team_barrier_wait_cancel_end (&team->barrier, bstate);
-+}
-+
-+/* The current thread is done with its current work sharing construct.
- This version does NOT imply a barrier at the end of the work-share. */
-
- void
-@@ -259,6 +288,9 @@ gomp_work_share_end_nowait (void)
- #endif
-
- if (completed == team->nthreads)
-- free_work_share (team, thr->ts.last_work_share);
-+ {
-+ team->work_shares_to_free = thr->ts.work_share;
-+ free_work_share (team, thr->ts.last_work_share);
-+ }
- thr->ts.last_work_share = NULL;
- }
---- libgomp/config/linux/proc.c (revision 210461)
-+++ libgomp/config/linux/proc.c (revision 210462)
-@@ -30,6 +30,7 @@
- #endif
- #include "libgomp.h"
- #include "proc.h"
-+#include
- #include
- #include
- #ifdef HAVE_GETLOADAVG
-@@ -39,19 +40,28 @@
- #endif
-
- #ifdef HAVE_PTHREAD_AFFINITY_NP
-+unsigned long gomp_cpuset_size;
-+static unsigned long gomp_get_cpuset_size;
-+cpu_set_t *gomp_cpusetp;
-+
- unsigned long
--gomp_cpuset_popcount (cpu_set_t *cpusetp)
-+gomp_cpuset_popcount (unsigned long cpusetsize, cpu_set_t *cpusetp)
- {
--#ifdef CPU_COUNT
-- /* glibc 2.6 and above provide a macro for this. */
-- return CPU_COUNT (cpusetp);
-+#ifdef CPU_COUNT_S
-+ /* glibc 2.7 and above provide a macro for this. */
-+ return CPU_COUNT_S (cpusetsize, cpusetp);
- #else
-+#ifdef CPU_COUNT
-+ if (cpusetsize == sizeof (cpu_set_t))
-+ /* glibc 2.6 and above provide a macro for this. */
-+ return CPU_COUNT (cpusetp);
-+#endif
- size_t i;
- unsigned long ret = 0;
-- extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int)];
-+ extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int)
-+ ? 1 : -1] __attribute__((unused));
-
-- (void) check;
-- for (i = 0; i < sizeof (*cpusetp) / sizeof (cpusetp->__bits[0]); i++)
-+ for (i = 0; i < cpusetsize / sizeof (cpusetp->__bits[0]); i++)
- {
- unsigned long int mask = cpusetp->__bits[i];
- if (mask == 0)
-@@ -70,16 +80,63 @@ void
- gomp_init_num_threads (void)
- {
- #ifdef HAVE_PTHREAD_AFFINITY_NP
-- cpu_set_t cpuset;
-+#if defined (_SC_NPROCESSORS_CONF) && defined (CPU_ALLOC_SIZE)
-+ gomp_cpuset_size = sysconf (_SC_NPROCESSORS_CONF);
-+ gomp_cpuset_size = CPU_ALLOC_SIZE (gomp_cpuset_size);
-+#else
-+ gomp_cpuset_size = sizeof (cpu_set_t);
-+#endif
-
-- if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset) == 0)
-+ gomp_cpusetp = (cpu_set_t *) gomp_malloc (gomp_cpuset_size);
-+ do
- {
-- /* Count only the CPUs this process can use. */
-- gomp_global_icv.nthreads_var = gomp_cpuset_popcount (&cpuset);
-- if (gomp_global_icv.nthreads_var == 0)
-- gomp_global_icv.nthreads_var = 1;
-- return;
-+ int ret = pthread_getaffinity_np (pthread_self (), gomp_cpuset_size,
-+ gomp_cpusetp);
-+ if (ret == 0)
-+ {
-+ /* Count only the CPUs this process can use. */
-+ gomp_global_icv.nthreads_var
-+ = gomp_cpuset_popcount (gomp_cpuset_size, gomp_cpusetp);
-+ if (gomp_global_icv.nthreads_var == 0)
-+ break;
-+ gomp_get_cpuset_size = gomp_cpuset_size;
-+#ifdef CPU_ALLOC_SIZE
-+ unsigned long i;
-+ for (i = gomp_cpuset_size * 8; i; i--)
-+ if (CPU_ISSET_S (i - 1, gomp_cpuset_size, gomp_cpusetp))
-+ break;
-+ gomp_cpuset_size = CPU_ALLOC_SIZE (i);
-+#endif
-+ return;
-+ }
-+ if (ret != EINVAL)
-+ break;
-+#ifdef CPU_ALLOC_SIZE
-+ if (gomp_cpuset_size < sizeof (cpu_set_t))
-+ gomp_cpuset_size = sizeof (cpu_set_t);
-+ else
-+ gomp_cpuset_size = gomp_cpuset_size * 2;
-+ if (gomp_cpuset_size < 8 * sizeof (cpu_set_t))
-+ gomp_cpusetp
-+ = (cpu_set_t *) gomp_realloc (gomp_cpusetp, gomp_cpuset_size);
-+ else
-+ {
-+ /* Avoid gomp_fatal if too large memory allocation would be
-+ requested, e.g. kernel returning EINVAL all the time. */
-+ void *p = realloc (gomp_cpusetp, gomp_cpuset_size);
-+ if (p == NULL)
-+ break;
-+ gomp_cpusetp = (cpu_set_t *) p;
-+ }
-+#else
-+ break;
-+#endif
- }
-+ while (1);
-+ gomp_cpuset_size = 0;
-+ gomp_global_icv.nthreads_var = 1;
-+ free (gomp_cpusetp);
-+ gomp_cpusetp = NULL;
- #endif
- #ifdef _SC_NPROCESSORS_ONLN
- gomp_global_icv.nthreads_var = sysconf (_SC_NPROCESSORS_ONLN);
-@@ -90,15 +147,14 @@ static int
- get_num_procs (void)
- {
- #ifdef HAVE_PTHREAD_AFFINITY_NP
-- cpu_set_t cpuset;
--
-- if (gomp_cpu_affinity == NULL)
-+ if (gomp_places_list == NULL)
- {
- /* Count only the CPUs this process can use. */
-- if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset),
-- &cpuset) == 0)
-+ if (gomp_cpusetp
-+ && pthread_getaffinity_np (pthread_self (), gomp_get_cpuset_size,
-+ gomp_cpusetp) == 0)
- {
-- int ret = gomp_cpuset_popcount (&cpuset);
-+ int ret = gomp_cpuset_popcount (gomp_get_cpuset_size, gomp_cpusetp);
- return ret != 0 ? ret : 1;
- }
- }
---- libgomp/config/linux/bar.c (revision 210461)
-+++ libgomp/config/linux/bar.c (revision 210462)
-@@ -33,11 +33,11 @@
- void
- gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t state)
- {
-- if (__builtin_expect ((state & 1) != 0, 0))
-+ if (__builtin_expect (state & BAR_WAS_LAST, 0))
- {
- /* Next time we'll be awaiting TOTAL threads again. */
- bar->awaited = bar->total;
-- __atomic_store_n (&bar->generation, bar->generation + 4,
-+ __atomic_store_n (&bar->generation, bar->generation + BAR_INCR,
- MEMMODEL_RELEASE);
- futex_wake ((int *) &bar->generation, INT_MAX);
- }
-@@ -66,7 +66,7 @@ void
- gomp_barrier_wait_last (gomp_barrier_t *bar)
- {
- gomp_barrier_state_t state = gomp_barrier_wait_start (bar);
-- if (state & 1)
-+ if (state & BAR_WAS_LAST)
- gomp_barrier_wait_end (bar, state);
- }
-
-@@ -81,40 +81,43 @@ gomp_team_barrier_wait_end (gomp_barrier
- {
- unsigned int generation, gen;
-
-- if (__builtin_expect ((state & 1) != 0, 0))
-+ if (__builtin_expect (state & BAR_WAS_LAST, 0))
- {
- /* Next time we'll be awaiting TOTAL threads again. */
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-
- bar->awaited = bar->total;
-+ team->work_share_cancelled = 0;
- if (__builtin_expect (team->task_count, 0))
- {
- gomp_barrier_handle_tasks (state);
-- state &= ~1;
-+ state &= ~BAR_WAS_LAST;
- }
- else
- {
-- __atomic_store_n (&bar->generation, state + 3, MEMMODEL_RELEASE);
-+ state &= ~BAR_CANCELLED;
-+ state += BAR_INCR - BAR_WAS_LAST;
-+ __atomic_store_n (&bar->generation, state, MEMMODEL_RELEASE);
- futex_wake ((int *) &bar->generation, INT_MAX);
- return;
- }
- }
-
- generation = state;
-+ state &= ~BAR_CANCELLED;
- do
- {
- do_wait ((int *) &bar->generation, generation);
- gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-- if (__builtin_expect (gen & 1, 0))
-+ if (__builtin_expect (gen & BAR_TASK_PENDING, 0))
- {
- gomp_barrier_handle_tasks (state);
- gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
- }
-- if ((gen & 2) != 0)
-- generation |= 2;
-+ generation |= gen & BAR_WAITING_FOR_TASK;
- }
-- while (gen != state + 4);
-+ while (gen != state + BAR_INCR);
- }
-
- void
-@@ -122,3 +125,86 @@ gomp_team_barrier_wait (gomp_barrier_t *
- {
- gomp_team_barrier_wait_end (bar, gomp_barrier_wait_start (bar));
- }
-+
-+void
-+gomp_team_barrier_wait_final (gomp_barrier_t *bar)
-+{
-+ gomp_barrier_state_t state = gomp_barrier_wait_final_start (bar);
-+ if (__builtin_expect (state & BAR_WAS_LAST, 0))
-+ bar->awaited_final = bar->total;
-+ gomp_team_barrier_wait_end (bar, state);
-+}
-+
-+bool
-+gomp_team_barrier_wait_cancel_end (gomp_barrier_t *bar,
-+ gomp_barrier_state_t state)
-+{
-+ unsigned int generation, gen;
-+
-+ if (__builtin_expect (state & BAR_WAS_LAST, 0))
-+ {
-+ /* Next time we'll be awaiting TOTAL threads again. */
-+ /* BAR_CANCELLED should never be set in state here, because
-+ cancellation means that at least one of the threads has been
-+ cancelled, thus on a cancellable barrier we should never see
-+ all threads to arrive. */
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+
-+ bar->awaited = bar->total;
-+ team->work_share_cancelled = 0;
-+ if (__builtin_expect (team->task_count, 0))
-+ {
-+ gomp_barrier_handle_tasks (state);
-+ state &= ~BAR_WAS_LAST;
-+ }
-+ else
-+ {
-+ state += BAR_INCR - BAR_WAS_LAST;
-+ __atomic_store_n (&bar->generation, state, MEMMODEL_RELEASE);
-+ futex_wake ((int *) &bar->generation, INT_MAX);
-+ return false;
-+ }
-+ }
-+
-+ if (__builtin_expect (state & BAR_CANCELLED, 0))
-+ return true;
-+
-+ generation = state;
-+ do
-+ {
-+ do_wait ((int *) &bar->generation, generation);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ if (__builtin_expect (gen & BAR_CANCELLED, 0))
-+ return true;
-+ if (__builtin_expect (gen & BAR_TASK_PENDING, 0))
-+ {
-+ gomp_barrier_handle_tasks (state);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ }
-+ generation |= gen & BAR_WAITING_FOR_TASK;
-+ }
-+ while (gen != state + BAR_INCR);
-+
-+ return false;
-+}
-+
-+bool
-+gomp_team_barrier_wait_cancel (gomp_barrier_t *bar)
-+{
-+ return gomp_team_barrier_wait_cancel_end (bar, gomp_barrier_wait_start (bar));
-+}
-+
-+void
-+gomp_team_barrier_cancel (struct gomp_team *team)
-+{
-+ gomp_mutex_lock (&team->task_lock);
-+ if (team->barrier.generation & BAR_CANCELLED)
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ return;
-+ }
-+ team->barrier.generation |= BAR_CANCELLED;
-+ gomp_mutex_unlock (&team->task_lock);
-+ futex_wake ((int *) &team->barrier.generation, INT_MAX);
-+}
---- libgomp/config/linux/proc.h (revision 210461)
-+++ libgomp/config/linux/proc.h (revision 210462)
-@@ -28,7 +28,10 @@
- #include
-
- #ifdef HAVE_PTHREAD_AFFINITY_NP
--extern unsigned long gomp_cpuset_popcount (cpu_set_t *);
-+extern unsigned long gomp_cpuset_size attribute_hidden;
-+extern cpu_set_t *gomp_cpusetp attribute_hidden;
-+extern unsigned long gomp_cpuset_popcount (unsigned long, cpu_set_t *)
-+ attribute_hidden;
- #endif
-
- #endif /* GOMP_PROC_H */
---- libgomp/config/linux/affinity.c (revision 210461)
-+++ libgomp/config/linux/affinity.c (revision 210462)
-@@ -29,90 +29,327 @@
- #endif
- #include "libgomp.h"
- #include "proc.h"
-+#include
- #include
-+#include
-+#include
- #include
-
- #ifdef HAVE_PTHREAD_AFFINITY_NP
-
--static unsigned int affinity_counter;
-+#ifndef CPU_ALLOC_SIZE
-+#define CPU_ISSET_S(idx, size, set) CPU_ISSET(idx, set)
-+#define CPU_ZERO_S(size, set) CPU_ZERO(set)
-+#define CPU_SET_S(idx, size, set) CPU_SET(idx, set)
-+#define CPU_CLR_S(idx, size, set) CPU_CLR(idx, set)
-+#endif
-
- void
- gomp_init_affinity (void)
- {
-- cpu_set_t cpuset, cpusetnew;
-- size_t idx, widx;
-- unsigned long cpus = 0;
--
-- if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset))
-- {
-- gomp_error ("could not get CPU affinity set");
-- free (gomp_cpu_affinity);
-- gomp_cpu_affinity = NULL;
-- gomp_cpu_affinity_len = 0;
-- return;
-- }
--
-- CPU_ZERO (&cpusetnew);
-- if (gomp_cpu_affinity_len == 0)
-- {
-- unsigned long count = gomp_cpuset_popcount (&cpuset);
-- if (count >= 65536)
-- count = 65536;
-- gomp_cpu_affinity = malloc (count * sizeof (unsigned short));
-- if (gomp_cpu_affinity == NULL)
-+ if (gomp_places_list == NULL)
-+ {
-+ if (!gomp_affinity_init_level (1, ULONG_MAX, true))
-+ return;
-+ }
-+
-+ struct gomp_thread *thr = gomp_thread ();
-+ pthread_setaffinity_np (pthread_self (), gomp_cpuset_size,
-+ (cpu_set_t *) gomp_places_list[0]);
-+ thr->place = 1;
-+ thr->ts.place_partition_off = 0;
-+ thr->ts.place_partition_len = gomp_places_list_len;
-+}
-+
-+void
-+gomp_init_thread_affinity (pthread_attr_t *attr, unsigned int place)
-+{
-+ pthread_attr_setaffinity_np (attr, gomp_cpuset_size,
-+ (cpu_set_t *) gomp_places_list[place]);
-+}
-+
-+void **
-+gomp_affinity_alloc (unsigned long count, bool quiet)
-+{
-+ unsigned long i;
-+ void **ret;
-+ char *p;
-+
-+ if (gomp_cpusetp == NULL)
-+ {
-+ if (!quiet)
-+ gomp_error ("Could not get CPU affinity set");
-+ return NULL;
-+ }
-+
-+ ret = malloc (count * sizeof (void *) + count * gomp_cpuset_size);
-+ if (ret == NULL)
-+ {
-+ if (!quiet)
-+ gomp_error ("Out of memory trying to allocate places list");
-+ return NULL;
-+ }
-+
-+ p = (char *) (ret + count);
-+ for (i = 0; i < count; i++, p += gomp_cpuset_size)
-+ ret[i] = p;
-+ return ret;
-+}
-+
-+void
-+gomp_affinity_init_place (void *p)
-+{
-+ cpu_set_t *cpusetp = (cpu_set_t *) p;
-+ CPU_ZERO_S (gomp_cpuset_size, cpusetp);
-+}
-+
-+bool
-+gomp_affinity_add_cpus (void *p, unsigned long num,
-+ unsigned long len, long stride, bool quiet)
-+{
-+ cpu_set_t *cpusetp = (cpu_set_t *) p;
-+ unsigned long max = 8 * gomp_cpuset_size;
-+ for (;;)
-+ {
-+ if (num >= max)
- {
-- gomp_error ("not enough memory to store CPU affinity list");
-- return;
-+ if (!quiet)
-+ gomp_error ("Logical CPU number %lu out of range", num);
-+ return false;
- }
-- for (widx = idx = 0; widx < count && idx < 65536; idx++)
-- if (CPU_ISSET (idx, &cpuset))
-+ CPU_SET_S (num, gomp_cpuset_size, cpusetp);
-+ if (--len == 0)
-+ return true;
-+ if ((stride < 0 && num + stride > num)
-+ || (stride > 0 && num + stride < num))
-+ {
-+ if (!quiet)
-+ gomp_error ("Logical CPU number %lu+%ld out of range",
-+ num, stride);
-+ return false;
-+ }
-+ num += stride;
-+ }
-+}
-+
-+bool
-+gomp_affinity_remove_cpu (void *p, unsigned long num)
-+{
-+ cpu_set_t *cpusetp = (cpu_set_t *) p;
-+ if (num >= 8 * gomp_cpuset_size)
-+ {
-+ gomp_error ("Logical CPU number %lu out of range", num);
-+ return false;
-+ }
-+ if (!CPU_ISSET_S (num, gomp_cpuset_size, cpusetp))
-+ {
-+ gomp_error ("Logical CPU %lu to be removed is not in the set", num);
-+ return false;
-+ }
-+ CPU_CLR_S (num, gomp_cpuset_size, cpusetp);
-+ return true;
-+}
-+
-+bool
-+gomp_affinity_copy_place (void *p, void *q, long stride)
-+{
-+ unsigned long i, max = 8 * gomp_cpuset_size;
-+ cpu_set_t *destp = (cpu_set_t *) p;
-+ cpu_set_t *srcp = (cpu_set_t *) q;
-+
-+ CPU_ZERO_S (gomp_cpuset_size, destp);
-+ for (i = 0; i < max; i++)
-+ if (CPU_ISSET_S (i, gomp_cpuset_size, srcp))
-+ {
-+ if ((stride < 0 && i + stride > i)
-+ || (stride > 0 && (i + stride < i || i + stride >= max)))
-+ {
-+ gomp_error ("Logical CPU number %lu+%ld out of range", i, stride);
-+ return false;
-+ }
-+ CPU_SET_S (i + stride, gomp_cpuset_size, destp);
-+ }
-+ return true;
-+}
-+
-+bool
-+gomp_affinity_same_place (void *p, void *q)
-+{
-+#ifdef CPU_EQUAL_S
-+ return CPU_EQUAL_S (gomp_cpuset_size, (cpu_set_t *) p, (cpu_set_t *) q);
-+#else
-+ return memcmp (p, q, gomp_cpuset_size) == 0;
-+#endif
-+}
-+
-+bool
-+gomp_affinity_finalize_place_list (bool quiet)
-+{
-+ unsigned long i, j;
-+
-+ for (i = 0, j = 0; i < gomp_places_list_len; i++)
-+ {
-+ cpu_set_t *cpusetp = (cpu_set_t *) gomp_places_list[i];
-+ bool nonempty = false;
-+#ifdef CPU_AND_S
-+ CPU_AND_S (gomp_cpuset_size, cpusetp, cpusetp, gomp_cpusetp);
-+ nonempty = gomp_cpuset_popcount (gomp_cpuset_size, cpusetp) != 0;
-+#else
-+ unsigned long k, max = gomp_cpuset_size / sizeof (cpusetp->__bits[0]);
-+ for (k = 0; k < max; k++)
-+ if ((cpusetp->__bits[k] &= gomp_cpusetp->__bits[k]) != 0)
-+ nonempty = true;
-+#endif
-+ if (nonempty)
-+ gomp_places_list[j++] = gomp_places_list[i];
-+ }
-+
-+ if (j == 0)
-+ {
-+ if (!quiet)
-+ gomp_error ("None of the places contain usable logical CPUs");
-+ return false;
-+ }
-+ else if (j < gomp_places_list_len)
-+ {
-+ if (!quiet)
-+ gomp_error ("Number of places reduced from %ld to %ld because some "
-+ "places didn't contain any usable logical CPUs",
-+ gomp_places_list_len, j);
-+ gomp_places_list_len = j;
-+ }
-+ return true;
-+}
-+
-+bool
-+gomp_affinity_init_level (int level, unsigned long count, bool quiet)
-+{
-+ unsigned long i, max = 8 * gomp_cpuset_size;
-+
-+ if (gomp_cpusetp)
-+ {
-+ unsigned long maxcount
-+ = gomp_cpuset_popcount (gomp_cpuset_size, gomp_cpusetp);
-+ if (count > maxcount)
-+ count = maxcount;
-+ }
-+ gomp_places_list = gomp_affinity_alloc (count, quiet);
-+ gomp_places_list_len = 0;
-+ if (gomp_places_list == NULL)
-+ return false;
-+ /* SMT (threads). */
-+ if (level == 1)
-+ {
-+ for (i = 0; i < max && gomp_places_list_len < count; i++)
-+ if (CPU_ISSET_S (i, gomp_cpuset_size, gomp_cpusetp))
- {
-- cpus++;
-- gomp_cpu_affinity[widx++] = idx;
-+ gomp_affinity_init_place (gomp_places_list[gomp_places_list_len]);
-+ gomp_affinity_add_cpus (gomp_places_list[gomp_places_list_len],
-+ i, 1, 0, true);
-+ ++gomp_places_list_len;
- }
-+ return true;
- }
- else
-- for (widx = idx = 0; idx < gomp_cpu_affinity_len; idx++)
-- if (gomp_cpu_affinity[idx] < CPU_SETSIZE
-- && CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
-+ {
-+ char name[sizeof ("/sys/devices/system/cpu/cpu/topology/"
-+ "thread_siblings_list") + 3 * sizeof (unsigned long)];
-+ size_t prefix_len = sizeof ("/sys/devices/system/cpu/cpu") - 1;
-+ cpu_set_t *copy = gomp_alloca (gomp_cpuset_size);
-+ FILE *f;
-+ char *line = NULL;
-+ size_t linelen = 0;
-+
-+ memcpy (name, "/sys/devices/system/cpu/cpu", prefix_len);
-+ memcpy (copy, gomp_cpusetp, gomp_cpuset_size);
-+ for (i = 0; i < max && gomp_places_list_len < count; i++)
-+ if (CPU_ISSET_S (i, gomp_cpuset_size, copy))
-+ {
-+ sprintf (name + prefix_len, "%lu/topology/%s_siblings_list",
-+ i, level == 2 ? "thread" : "core");
-+ f = fopen (name, "r");
-+ if (f != NULL)
-+ {
-+ if (getline (&line, &linelen, f) > 0)
-+ {
-+ char *p = line;
-+ bool seen_i = false;
-+ void *pl = gomp_places_list[gomp_places_list_len];
-+ gomp_affinity_init_place (pl);
-+ while (*p && *p != '\n')
-+ {
-+ unsigned long first, last;
-+ errno = 0;
-+ first = strtoul (p, &p, 10);
-+ if (errno)
-+ break;
-+ last = first;
-+ if (*p == '-')
-+ {
-+ errno = 0;
-+ last = strtoul (p + 1, &p, 10);
-+ if (errno || last < first)
-+ break;
-+ }
-+ for (; first <= last; first++)
-+ if (CPU_ISSET_S (first, gomp_cpuset_size, copy)
-+ && gomp_affinity_add_cpus (pl, first, 1, 0,
-+ true))
-+ {
-+ CPU_CLR_S (first, gomp_cpuset_size, copy);
-+ if (first == i)
-+ seen_i = true;
-+ }
-+ if (*p == ',')
-+ ++p;
-+ }
-+ if (seen_i)
-+ gomp_places_list_len++;
-+ }
-+ fclose (f);
-+ }
-+ }
-+ if (gomp_places_list_len == 0)
- {
-- if (! CPU_ISSET (gomp_cpu_affinity[idx], &cpusetnew))
-- {
-- cpus++;
-- CPU_SET (gomp_cpu_affinity[idx], &cpusetnew);
-- }
-- gomp_cpu_affinity[widx++] = gomp_cpu_affinity[idx];
-+ if (!quiet)
-+ gomp_error ("Error reading %s topology",
-+ level == 2 ? "core" : "socket");
-+ free (gomp_places_list);
-+ gomp_places_list = NULL;
-+ return false;
- }
--
-- if (widx == 0)
-- {
-- gomp_error ("no CPUs left for affinity setting");
-- free (gomp_cpu_affinity);
-- gomp_cpu_affinity = NULL;
-- gomp_cpu_affinity_len = 0;
-- return;
-- }
--
-- gomp_cpu_affinity_len = widx;
-- if (cpus < gomp_available_cpus)
-- gomp_available_cpus = cpus;
-- CPU_ZERO (&cpuset);
-- CPU_SET (gomp_cpu_affinity[0], &cpuset);
-- pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
-- affinity_counter = 1;
-+ return true;
-+ }
-+ return false;
- }
-
- void
--gomp_init_thread_affinity (pthread_attr_t *attr)
-+gomp_affinity_print_place (void *p)
- {
-- unsigned int cpu;
-- cpu_set_t cpuset;
-+ unsigned long i, max = 8 * gomp_cpuset_size, len;
-+ cpu_set_t *cpusetp = (cpu_set_t *) p;
-+ bool notfirst = false;
-
-- cpu = __atomic_fetch_add (&affinity_counter, 1, MEMMODEL_RELAXED);
-- cpu %= gomp_cpu_affinity_len;
-- CPU_ZERO (&cpuset);
-- CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
-- pthread_attr_setaffinity_np (attr, sizeof (cpu_set_t), &cpuset);
-+ for (i = 0, len = 0; i < max; i++)
-+ if (CPU_ISSET_S (i, gomp_cpuset_size, cpusetp))
-+ {
-+ if (len == 0)
-+ {
-+ if (notfirst)
-+ fputc (',', stderr);
-+ notfirst = true;
-+ fprintf (stderr, "%lu", i);
-+ }
-+ ++len;
-+ }
-+ else
-+ {
-+ if (len > 1)
-+ fprintf (stderr, ":%lu", len);
-+ len = 0;
-+ }
-+ if (len > 1)
-+ fprintf (stderr, ":%lu", len);
- }
-
- #else
---- libgomp/config/linux/bar.h (revision 210461)
-+++ libgomp/config/linux/bar.h (revision 210462)
-@@ -38,13 +38,25 @@ typedef struct
- unsigned total __attribute__((aligned (64)));
- unsigned generation;
- unsigned awaited __attribute__((aligned (64)));
-+ unsigned awaited_final;
- } gomp_barrier_t;
-+
- typedef unsigned int gomp_barrier_state_t;
-
-+/* The generation field contains a counter in the high bits, with a few
-+ low bits dedicated to flags. Note that TASK_PENDING and WAS_LAST can
-+ share space because WAS_LAST is never stored back to generation. */
-+#define BAR_TASK_PENDING 1
-+#define BAR_WAS_LAST 1
-+#define BAR_WAITING_FOR_TASK 2
-+#define BAR_CANCELLED 4
-+#define BAR_INCR 8
-+
- static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
- {
- bar->total = count;
- bar->awaited = count;
-+ bar->awaited_final = count;
- bar->generation = 0;
- }
-
-@@ -62,27 +74,55 @@ extern void gomp_barrier_wait (gomp_barr
- extern void gomp_barrier_wait_last (gomp_barrier_t *);
- extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
- extern void gomp_team_barrier_wait (gomp_barrier_t *);
-+extern void gomp_team_barrier_wait_final (gomp_barrier_t *);
- extern void gomp_team_barrier_wait_end (gomp_barrier_t *,
- gomp_barrier_state_t);
-+extern bool gomp_team_barrier_wait_cancel (gomp_barrier_t *);
-+extern bool gomp_team_barrier_wait_cancel_end (gomp_barrier_t *,
-+ gomp_barrier_state_t);
- extern void gomp_team_barrier_wake (gomp_barrier_t *, int);
-+struct gomp_team;
-+extern void gomp_team_barrier_cancel (struct gomp_team *);
-
- static inline gomp_barrier_state_t
- gomp_barrier_wait_start (gomp_barrier_t *bar)
- {
-- unsigned int ret = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE) & ~3;
-+ unsigned int ret = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ ret &= -BAR_INCR | BAR_CANCELLED;
- /* A memory barrier is needed before exiting from the various forms
- of gomp_barrier_wait, to satisfy OpenMP API version 3.1 section
- 2.8.6 flush Construct, which says there is an implicit flush during
- a barrier region. This is a convenient place to add the barrier,
- so we use MEMMODEL_ACQ_REL here rather than MEMMODEL_ACQUIRE. */
-- ret += __atomic_add_fetch (&bar->awaited, -1, MEMMODEL_ACQ_REL) == 0;
-+ if (__atomic_add_fetch (&bar->awaited, -1, MEMMODEL_ACQ_REL) == 0)
-+ ret |= BAR_WAS_LAST;
-+ return ret;
-+}
-+
-+static inline gomp_barrier_state_t
-+gomp_barrier_wait_cancel_start (gomp_barrier_t *bar)
-+{
-+ return gomp_barrier_wait_start (bar);
-+}
-+
-+/* This is like gomp_barrier_wait_start, except it decrements
-+ bar->awaited_final rather than bar->awaited and should be used
-+ for the gomp_team_end barrier only. */
-+static inline gomp_barrier_state_t
-+gomp_barrier_wait_final_start (gomp_barrier_t *bar)
-+{
-+ unsigned int ret = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ ret &= -BAR_INCR | BAR_CANCELLED;
-+ /* See above gomp_barrier_wait_start comment. */
-+ if (__atomic_add_fetch (&bar->awaited_final, -1, MEMMODEL_ACQ_REL) == 0)
-+ ret |= BAR_WAS_LAST;
- return ret;
- }
-
- static inline bool
- gomp_barrier_last_thread (gomp_barrier_state_t state)
- {
-- return state & 1;
-+ return state & BAR_WAS_LAST;
- }
-
- /* All the inlines below must be called with team->task_lock
-@@ -91,31 +131,37 @@ gomp_barrier_last_thread (gomp_barrier_s
- static inline void
- gomp_team_barrier_set_task_pending (gomp_barrier_t *bar)
- {
-- bar->generation |= 1;
-+ bar->generation |= BAR_TASK_PENDING;
- }
-
- static inline void
- gomp_team_barrier_clear_task_pending (gomp_barrier_t *bar)
- {
-- bar->generation &= ~1;
-+ bar->generation &= ~BAR_TASK_PENDING;
- }
-
- static inline void
- gomp_team_barrier_set_waiting_for_tasks (gomp_barrier_t *bar)
- {
-- bar->generation |= 2;
-+ bar->generation |= BAR_WAITING_FOR_TASK;
- }
-
- static inline bool
- gomp_team_barrier_waiting_for_tasks (gomp_barrier_t *bar)
- {
-- return (bar->generation & 2) != 0;
-+ return (bar->generation & BAR_WAITING_FOR_TASK) != 0;
-+}
-+
-+static inline bool
-+gomp_team_barrier_cancelled (gomp_barrier_t *bar)
-+{
-+ return __builtin_expect ((bar->generation & BAR_CANCELLED) != 0, 0);
- }
-
- static inline void
- gomp_team_barrier_done (gomp_barrier_t *bar, gomp_barrier_state_t state)
- {
-- bar->generation = (state & ~3) + 4;
-+ bar->generation = (state & -BAR_INCR) + BAR_INCR;
- }
-
- #endif /* GOMP_BARRIER_H */
---- libgomp/config/posix/bar.c (revision 210461)
-+++ libgomp/config/posix/bar.c (revision 210462)
-@@ -42,6 +42,7 @@ gomp_barrier_init (gomp_barrier_t *bar,
- bar->total = count;
- bar->arrived = 0;
- bar->generation = 0;
-+ bar->cancellable = false;
- }
-
- void
-@@ -72,7 +73,7 @@ gomp_barrier_wait_end (gomp_barrier_t *b
- {
- unsigned int n;
-
-- if (state & 1)
-+ if (state & BAR_WAS_LAST)
- {
- n = --bar->arrived;
- if (n > 0)
-@@ -113,12 +114,14 @@ gomp_team_barrier_wait_end (gomp_barrier
- {
- unsigned int n;
-
-- if (state & 1)
-+ state &= ~BAR_CANCELLED;
-+ if (state & BAR_WAS_LAST)
- {
- n = --bar->arrived;
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-
-+ team->work_share_cancelled = 0;
- if (team->task_count)
- {
- gomp_barrier_handle_tasks (state);
-@@ -128,7 +131,7 @@ gomp_team_barrier_wait_end (gomp_barrier
- return;
- }
-
-- bar->generation = state + 3;
-+ bar->generation = state + BAR_INCR - BAR_WAS_LAST;
- if (n > 0)
- {
- do
-@@ -141,13 +144,18 @@ gomp_team_barrier_wait_end (gomp_barrier
- else
- {
- gomp_mutex_unlock (&bar->mutex1);
-+ int gen;
- do
- {
- gomp_sem_wait (&bar->sem1);
-- if (bar->generation & 1)
-- gomp_barrier_handle_tasks (state);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ if (gen & BAR_TASK_PENDING)
-+ {
-+ gomp_barrier_handle_tasks (state);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ }
- }
-- while (bar->generation != state + 4);
-+ while (gen != state + BAR_INCR);
-
- #ifdef HAVE_SYNC_BUILTINS
- n = __sync_add_and_fetch (&bar->arrived, -1);
-@@ -162,6 +170,81 @@ gomp_team_barrier_wait_end (gomp_barrier
- }
- }
-
-+bool
-+gomp_team_barrier_wait_cancel_end (gomp_barrier_t *bar,
-+ gomp_barrier_state_t state)
-+{
-+ unsigned int n;
-+
-+ if (state & BAR_WAS_LAST)
-+ {
-+ bar->cancellable = false;
-+ n = --bar->arrived;
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+
-+ team->work_share_cancelled = 0;
-+ if (team->task_count)
-+ {
-+ gomp_barrier_handle_tasks (state);
-+ if (n > 0)
-+ gomp_sem_wait (&bar->sem2);
-+ gomp_mutex_unlock (&bar->mutex1);
-+ return false;
-+ }
-+
-+ bar->generation = state + BAR_INCR - BAR_WAS_LAST;
-+ if (n > 0)
-+ {
-+ do
-+ gomp_sem_post (&bar->sem1);
-+ while (--n != 0);
-+ gomp_sem_wait (&bar->sem2);
-+ }
-+ gomp_mutex_unlock (&bar->mutex1);
-+ }
-+ else
-+ {
-+ if (state & BAR_CANCELLED)
-+ {
-+ gomp_mutex_unlock (&bar->mutex1);
-+ return true;
-+ }
-+ bar->cancellable = true;
-+ gomp_mutex_unlock (&bar->mutex1);
-+ int gen;
-+ do
-+ {
-+ gomp_sem_wait (&bar->sem1);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ if (gen & BAR_CANCELLED)
-+ break;
-+ if (gen & BAR_TASK_PENDING)
-+ {
-+ gomp_barrier_handle_tasks (state);
-+ gen = __atomic_load_n (&bar->generation, MEMMODEL_ACQUIRE);
-+ if (gen & BAR_CANCELLED)
-+ break;
-+ }
-+ }
-+ while (gen != state + BAR_INCR);
-+
-+#ifdef HAVE_SYNC_BUILTINS
-+ n = __sync_add_and_fetch (&bar->arrived, -1);
-+#else
-+ gomp_mutex_lock (&bar->mutex2);
-+ n = --bar->arrived;
-+ gomp_mutex_unlock (&bar->mutex2);
-+#endif
-+
-+ if (n == 0)
-+ gomp_sem_post (&bar->sem2);
-+ if (gen & BAR_CANCELLED)
-+ return true;
-+ }
-+ return false;
-+}
-+
- void
- gomp_team_barrier_wait (gomp_barrier_t *barrier)
- {
-@@ -176,3 +259,40 @@ gomp_team_barrier_wake (gomp_barrier_t *
- while (count-- > 0)
- gomp_sem_post (&bar->sem1);
- }
-+
-+bool
-+gomp_team_barrier_wait_cancel (gomp_barrier_t *bar)
-+{
-+ gomp_barrier_state_t state = gomp_barrier_wait_cancel_start (bar);
-+ return gomp_team_barrier_wait_cancel_end (bar, state);
-+}
-+
-+void
-+gomp_team_barrier_cancel (struct gomp_team *team)
-+{
-+ if (team->barrier.generation & BAR_CANCELLED)
-+ return;
-+ gomp_mutex_lock (&team->barrier.mutex1);
-+ gomp_mutex_lock (&team->task_lock);
-+ if (team->barrier.generation & BAR_CANCELLED)
-+ {
-+ gomp_mutex_unlock (&team->task_lock);
-+ gomp_mutex_unlock (&team->barrier.mutex1);
-+ return;
-+ }
-+ team->barrier.generation |= BAR_CANCELLED;
-+ gomp_mutex_unlock (&team->task_lock);
-+ if (team->barrier.cancellable)
-+ {
-+ int n = team->barrier.arrived;
-+ if (n > 0)
-+ {
-+ do
-+ gomp_sem_post (&team->barrier.sem1);
-+ while (--n != 0);
-+ gomp_sem_wait (&team->barrier.sem2);
-+ }
-+ team->barrier.cancellable = false;
-+ }
-+ gomp_mutex_unlock (&team->barrier.mutex1);
-+}
---- libgomp/config/posix/affinity.c (revision 210461)
-+++ libgomp/config/posix/affinity.c (revision 210462)
-@@ -32,7 +32,84 @@ gomp_init_affinity (void)
- }
-
- void
--gomp_init_thread_affinity (pthread_attr_t *attr)
-+gomp_init_thread_affinity (pthread_attr_t *attr, unsigned int place)
- {
- (void) attr;
-+ (void) place;
-+}
-+
-+void **
-+gomp_affinity_alloc (unsigned long count, bool quiet)
-+{
-+ (void) count;
-+ if (!quiet)
-+ gomp_error ("Affinity not supported on this configuration");
-+ return NULL;
-+}
-+
-+void
-+gomp_affinity_init_place (void *p)
-+{
-+ (void) p;
-+}
-+
-+bool
-+gomp_affinity_add_cpus (void *p, unsigned long num,
-+ unsigned long len, long stride, bool quiet)
-+{
-+ (void) p;
-+ (void) num;
-+ (void) len;
-+ (void) stride;
-+ (void) quiet;
-+ return false;
-+}
-+
-+bool
-+gomp_affinity_remove_cpu (void *p, unsigned long num)
-+{
-+ (void) p;
-+ (void) num;
-+ return false;
-+}
-+
-+bool
-+gomp_affinity_copy_place (void *p, void *q, long stride)
-+{
-+ (void) p;
-+ (void) q;
-+ (void) stride;
-+ return false;
-+}
-+
-+bool
-+gomp_affinity_same_place (void *p, void *q)
-+{
-+ (void) p;
-+ (void) q;
-+ return false;
-+}
-+
-+bool
-+gomp_affinity_finalize_place_list (bool quiet)
-+{
-+ (void) quiet;
-+ return false;
-+}
-+
-+bool
-+gomp_affinity_init_level (int level, unsigned long count, bool quiet)
-+{
-+ (void) level;
-+ (void) count;
-+ (void) quiet;
-+ if (!quiet)
-+ gomp_error ("Affinity not supported on this configuration");
-+ return NULL;
-+}
-+
-+void
-+gomp_affinity_print_place (void *p)
-+{
-+ (void) p;
- }
---- libgomp/config/posix/bar.h (revision 210461)
-+++ libgomp/config/posix/bar.h (revision 210462)
-@@ -43,9 +43,20 @@ typedef struct
- unsigned total;
- unsigned arrived;
- unsigned generation;
-+ bool cancellable;
- } gomp_barrier_t;
-+
- typedef unsigned int gomp_barrier_state_t;
-
-+/* The generation field contains a counter in the high bits, with a few
-+ low bits dedicated to flags. Note that TASK_PENDING and WAS_LAST can
-+ share space because WAS_LAST is never stored back to generation. */
-+#define BAR_TASK_PENDING 1
-+#define BAR_WAS_LAST 1
-+#define BAR_WAITING_FOR_TASK 2
-+#define BAR_CANCELLED 4
-+#define BAR_INCR 8
-+
- extern void gomp_barrier_init (gomp_barrier_t *, unsigned);
- extern void gomp_barrier_reinit (gomp_barrier_t *, unsigned);
- extern void gomp_barrier_destroy (gomp_barrier_t *);
-@@ -55,22 +66,47 @@ extern void gomp_barrier_wait_end (gomp_
- extern void gomp_team_barrier_wait (gomp_barrier_t *);
- extern void gomp_team_barrier_wait_end (gomp_barrier_t *,
- gomp_barrier_state_t);
-+extern bool gomp_team_barrier_wait_cancel (gomp_barrier_t *);
-+extern bool gomp_team_barrier_wait_cancel_end (gomp_barrier_t *,
-+ gomp_barrier_state_t);
- extern void gomp_team_barrier_wake (gomp_barrier_t *, int);
-+struct gomp_team;
-+extern void gomp_team_barrier_cancel (struct gomp_team *);
-
- static inline gomp_barrier_state_t
- gomp_barrier_wait_start (gomp_barrier_t *bar)
- {
- unsigned int ret;
- gomp_mutex_lock (&bar->mutex1);
-- ret = bar->generation & ~3;
-- ret += ++bar->arrived == bar->total;
-+ ret = bar->generation & (-BAR_INCR | BAR_CANCELLED);
-+ if (++bar->arrived == bar->total)
-+ ret |= BAR_WAS_LAST;
-+ return ret;
-+}
-+
-+static inline gomp_barrier_state_t
-+gomp_barrier_wait_cancel_start (gomp_barrier_t *bar)
-+{
-+ unsigned int ret;
-+ gomp_mutex_lock (&bar->mutex1);
-+ ret = bar->generation & (-BAR_INCR | BAR_CANCELLED);
-+ if (ret & BAR_CANCELLED)
-+ return ret;
-+ if (++bar->arrived == bar->total)
-+ ret |= BAR_WAS_LAST;
- return ret;
- }
-
-+static inline void
-+gomp_team_barrier_wait_final (gomp_barrier_t *bar)
-+{
-+ gomp_team_barrier_wait (bar);
-+}
-+
- static inline bool
- gomp_barrier_last_thread (gomp_barrier_state_t state)
- {
-- return state & 1;
-+ return state & BAR_WAS_LAST;
- }
-
- static inline void
-@@ -85,31 +121,37 @@ gomp_barrier_wait_last (gomp_barrier_t *
- static inline void
- gomp_team_barrier_set_task_pending (gomp_barrier_t *bar)
- {
-- bar->generation |= 1;
-+ bar->generation |= BAR_TASK_PENDING;
- }
-
- static inline void
- gomp_team_barrier_clear_task_pending (gomp_barrier_t *bar)
- {
-- bar->generation &= ~1;
-+ bar->generation &= ~BAR_TASK_PENDING;
- }
-
- static inline void
- gomp_team_barrier_set_waiting_for_tasks (gomp_barrier_t *bar)
- {
-- bar->generation |= 2;
-+ bar->generation |= BAR_WAITING_FOR_TASK;
- }
-
- static inline bool
- gomp_team_barrier_waiting_for_tasks (gomp_barrier_t *bar)
- {
-- return (bar->generation & 2) != 0;
-+ return (bar->generation & BAR_WAITING_FOR_TASK) != 0;
-+}
-+
-+static inline bool
-+gomp_team_barrier_cancelled (gomp_barrier_t *bar)
-+{
-+ return __builtin_expect ((bar->generation & BAR_CANCELLED) != 0, 0);
- }
-
- static inline void
- gomp_team_barrier_done (gomp_barrier_t *bar, gomp_barrier_state_t state)
- {
-- bar->generation = (state & ~3) + 4;
-+ bar->generation = (state & -BAR_INCR) + BAR_INCR;
- }
-
- #endif /* GOMP_BARRIER_H */
---- libgomp/barrier.c (revision 210461)
-+++ libgomp/barrier.c (revision 210462)
-@@ -39,3 +39,15 @@ GOMP_barrier (void)
-
- gomp_team_barrier_wait (&team->barrier);
- }
-+
-+bool
-+GOMP_barrier_cancel (void)
-+{
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+
-+ /* The compiler transforms to barrier_cancel when it sees that the
-+ barrier is within a construct that can cancel. Thus we should
-+ never have an orphaned cancellable barrier. */
-+ return gomp_team_barrier_wait_cancel (&team->barrier);
-+}
---- libgomp/target.c (revision 0)
-+++ libgomp/target.c (revision 210462)
-@@ -0,0 +1,96 @@
-+/* Copyright (C) 2013 Free Software Foundation, Inc.
-+ Contributed by Jakub Jelinek .
-+
-+ This file is part of the GNU OpenMP Library (libgomp).
-+
-+ Libgomp is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3, or (at your option)
-+ any later version.
-+
-+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
-+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-+ more details.
-+
-+ Under Section 7 of GPL version 3, you are granted additional
-+ permissions described in the GCC Runtime Library Exception, version
-+ 3.1, as published by the Free Software Foundation.
-+
-+ You should have received a copy of the GNU General Public License and
-+ a copy of the GCC Runtime Library Exception along with this program;
-+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-+ . */
-+
-+/* This file handles the maintainence of threads in response to team
-+ creation and termination. */
-+
-+#include "libgomp.h"
-+#include
-+#include
-+#include
-+#include
-+
-+attribute_hidden int
-+gomp_get_num_devices (void)
-+{
-+ return 0;
-+}
-+
-+/* Called when encountering a target directive. If DEVICE
-+ is -1, it means use device-var ICV. If it is -2 (or any other value
-+ larger than last available hw device, use host fallback.
-+ FN is address of host code, OPENMP_TARGET contains value of the
-+ __OPENMP_TARGET__ symbol in the shared library or binary that invokes
-+ GOMP_target. HOSTADDRS, SIZES and KINDS are arrays
-+ with MAPNUM entries, with addresses of the host objects,
-+ sizes of the host objects (resp. for pointer kind pointer bias
-+ and assumed sizeof (void *) size) and kinds. */
-+
-+void
-+GOMP_target (int device, void (*fn) (void *), const void *openmp_target,
-+ size_t mapnum, void **hostaddrs, size_t *sizes,
-+ unsigned char *kinds)
-+{
-+ /* Host fallback. */
-+ struct gomp_thread old_thr, *thr = gomp_thread ();
-+ old_thr = *thr;
-+ memset (thr, '\0', sizeof (*thr));
-+ if (gomp_places_list)
-+ {
-+ thr->place = old_thr.place;
-+ thr->ts.place_partition_len = gomp_places_list_len;
-+ }
-+ fn (hostaddrs);
-+ gomp_free_thread (thr);
-+ *thr = old_thr;
-+}
-+
-+void
-+GOMP_target_data (int device, const void *openmp_target, size_t mapnum,
-+ void **hostaddrs, size_t *sizes, unsigned char *kinds)
-+{
-+}
-+
-+void
-+GOMP_target_end_data (void)
-+{
-+}
-+
-+void
-+GOMP_target_update (int device, const void *openmp_target, size_t mapnum,
-+ void **hostaddrs, size_t *sizes, unsigned char *kinds)
-+{
-+}
-+
-+void
-+GOMP_teams (unsigned int num_teams, unsigned int thread_limit)
-+{
-+ if (thread_limit)
-+ {
-+ struct gomp_task_icv *icv = gomp_icv (true);
-+ icv->thread_limit_var
-+ = thread_limit > INT_MAX ? UINT_MAX : thread_limit;
-+ }
-+ (void) num_teams;
-+}
---- libgomp/parallel.c (revision 210461)
-+++ libgomp/parallel.c (revision 210462)
-@@ -37,18 +37,19 @@
- unsigned
- gomp_resolve_num_threads (unsigned specified, unsigned count)
- {
-- struct gomp_thread *thread = gomp_thread();
-+ struct gomp_thread *thr = gomp_thread ();
- struct gomp_task_icv *icv;
- unsigned threads_requested, max_num_threads, num_threads;
-- unsigned long remaining;
-+ unsigned long busy;
-+ struct gomp_thread_pool *pool;
-
- icv = gomp_icv (false);
-
- if (specified == 1)
- return 1;
-- else if (thread->ts.active_level >= 1 && !icv->nest_var)
-+ else if (thr->ts.active_level >= 1 && !icv->nest_var)
- return 1;
-- else if (thread->ts.active_level >= gomp_max_active_levels_var)
-+ else if (thr->ts.active_level >= gomp_max_active_levels_var)
- return 1;
-
- /* If NUM_THREADS not specified, use nthreads_var. */
-@@ -72,30 +73,46 @@ gomp_resolve_num_threads (unsigned speci
- max_num_threads = count;
- }
-
-- /* ULONG_MAX stands for infinity. */
-- if (__builtin_expect (gomp_thread_limit_var == ULONG_MAX, 1)
-+ /* UINT_MAX stands for infinity. */
-+ if (__builtin_expect (icv->thread_limit_var == UINT_MAX, 1)
- || max_num_threads == 1)
- return max_num_threads;
-
-+ /* The threads_busy counter lives in thread_pool, if there
-+ isn't a thread_pool yet, there must be just one thread
-+ in the contention group. If thr->team is NULL, this isn't
-+ nested parallel, so there is just one thread in the
-+ contention group as well, no need to handle it atomically. */
-+ pool = thr->thread_pool;
-+ if (thr->ts.team == NULL)
-+ {
-+ num_threads = max_num_threads;
-+ if (num_threads > icv->thread_limit_var)
-+ num_threads = icv->thread_limit_var;
-+ if (pool)
-+ pool->threads_busy = num_threads;
-+ return num_threads;
-+ }
-+
- #ifdef HAVE_SYNC_BUILTINS
- do
- {
-- remaining = gomp_remaining_threads_count;
-+ busy = pool->threads_busy;
- num_threads = max_num_threads;
-- if (num_threads > remaining)
-- num_threads = remaining + 1;
-+ if (icv->thread_limit_var - busy + 1 < num_threads)
-+ num_threads = icv->thread_limit_var - busy + 1;
- }
-- while (__sync_val_compare_and_swap (&gomp_remaining_threads_count,
-- remaining, remaining - num_threads + 1)
-- != remaining);
-+ while (__sync_val_compare_and_swap (&pool->threads_busy,
-+ busy, busy + num_threads - 1)
-+ != busy);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
- num_threads = max_num_threads;
-- remaining = gomp_remaining_threads_count;
-- if (num_threads > remaining)
-- num_threads = remaining + 1;
-- gomp_remaining_threads_count -= num_threads - 1;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ busy = pool->threads_busy;
-+ if (icv->thread_limit_var - busy + 1 < num_threads)
-+ num_threads = icv->thread_limit_var - busy + 1;
-+ pool->threads_busy += num_threads - 1;
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
-
- return num_threads;
-@@ -105,13 +122,14 @@ void
- GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
- {
- num_threads = gomp_resolve_num_threads (num_threads, 0);
-- gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
-+ gomp_team_start (fn, data, num_threads, 0, gomp_new_team (num_threads));
- }
-
- void
- GOMP_parallel_end (void)
- {
-- if (__builtin_expect (gomp_thread_limit_var != ULONG_MAX, 0))
-+ struct gomp_task_icv *icv = gomp_icv (false);
-+ if (__builtin_expect (icv->thread_limit_var != UINT_MAX, 0))
- {
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-@@ -119,20 +137,98 @@ GOMP_parallel_end (void)
- gomp_team_end ();
- if (nthreads > 1)
- {
-+ /* If not nested, there is just one thread in the
-+ contention group left, no need for atomicity. */
-+ if (thr->ts.team == NULL)
-+ thr->thread_pool->threads_busy = 1;
-+ else
-+ {
- #ifdef HAVE_SYNC_BUILTINS
-- __sync_fetch_and_add (&gomp_remaining_threads_count,
-- nthreads - 1);
-+ __sync_fetch_and_add (&thr->thread_pool->threads_busy,
-+ 1UL - nthreads);
- #else
-- gomp_mutex_lock (&gomp_remaining_threads_lock);
-- gomp_remaining_threads_count += nthreads - 1;
-- gomp_mutex_unlock (&gomp_remaining_threads_lock);
-+ gomp_mutex_lock (&gomp_managed_threads_lock);
-+ thr->thread_pool->threads_busy -= nthreads - 1;
-+ gomp_mutex_unlock (&gomp_managed_threads_lock);
- #endif
-+ }
- }
- }
- else
- gomp_team_end ();
- }
-+ialias (GOMP_parallel_end)
-+
-+void
-+GOMP_parallel (void (*fn) (void *), void *data, unsigned num_threads, unsigned int flags)
-+{
-+ num_threads = gomp_resolve_num_threads (num_threads, 0);
-+ gomp_team_start (fn, data, num_threads, flags, gomp_new_team (num_threads));
-+ fn (data);
-+ ialias_call (GOMP_parallel_end) ();
-+}
-+
-+bool
-+GOMP_cancellation_point (int which)
-+{
-+ if (!gomp_cancel_var)
-+ return false;
-
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+ if (which & (GOMP_CANCEL_LOOP | GOMP_CANCEL_SECTIONS))
-+ {
-+ if (team == NULL)
-+ return false;
-+ return team->work_share_cancelled != 0;
-+ }
-+ else if (which & GOMP_CANCEL_TASKGROUP)
-+ {
-+ if (thr->task->taskgroup && thr->task->taskgroup->cancelled)
-+ return true;
-+ /* FALLTHRU into the GOMP_CANCEL_PARALLEL case,
-+ as #pragma omp cancel parallel also cancels all explicit
-+ tasks. */
-+ }
-+ if (team)
-+ return gomp_team_barrier_cancelled (&team->barrier);
-+ return false;
-+}
-+ialias (GOMP_cancellation_point)
-+
-+bool
-+GOMP_cancel (int which, bool do_cancel)
-+{
-+ if (!gomp_cancel_var)
-+ return false;
-+
-+ if (!do_cancel)
-+ return ialias_call (GOMP_cancellation_point) (which);
-+
-+ struct gomp_thread *thr = gomp_thread ();
-+ struct gomp_team *team = thr->ts.team;
-+ if (which & (GOMP_CANCEL_LOOP | GOMP_CANCEL_SECTIONS))
-+ {
-+ /* In orphaned worksharing region, all we want to cancel
-+ is current thread. */
-+ if (team != NULL)
-+ team->work_share_cancelled = 1;
-+ return true;
-+ }
-+ else if (which & GOMP_CANCEL_TASKGROUP)
-+ {
-+ if (thr->task->taskgroup && !thr->task->taskgroup->cancelled)
-+ {
-+ gomp_mutex_lock (&team->task_lock);
-+ thr->task->taskgroup->cancelled = true;
-+ gomp_mutex_unlock (&team->task_lock);
-+ }
-+ return true;
-+ }
-+ team->team_cancelled = 1;
-+ gomp_team_barrier_cancel (team);
-+ return true;
-+}
-
- /* The public OpenMP API for thread and team related inquiries. */
-
diff --git a/SOURCES/gcc48-test-compat-Wno-abi.patch b/SOURCES/gcc48-test-compat-Wno-abi.patch
new file mode 100644
index 0000000..cc2b74c
--- /dev/null
+++ b/SOURCES/gcc48-test-compat-Wno-abi.patch
@@ -0,0 +1,23 @@
+2014-09-26 Jakub Jelinek
+
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
+ to default options.
+
+--- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (revision 215636)
++++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c (revision 215637)
+@@ -1,5 +1,5 @@
+ /* Structure layout test generator.
+- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
++ Copyright (C) 2004-2014
+ Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek .
+
+@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.
+ #endif
+
+ const char *dg_options[] = {
+-"/* { dg-options \"%s-I%s\" } */\n",
++"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
+ "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
+ "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
+ "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
diff --git a/SOURCES/isl-0.11.1-ppc64le-config.patch b/SOURCES/isl-0.11.1-ppc64le-config.patch
new file mode 100644
index 0000000..b718df2
--- /dev/null
+++ b/SOURCES/isl-0.11.1-ppc64le-config.patch
@@ -0,0 +1,708 @@
+--- isl-0.11.1/configure.jj 2012-12-10 11:58:02.000000000 +0100
++++ isl-0.11.1/configure 2014-04-10 20:45:59.676625289 +0200
+@@ -7991,7 +7991,7 @@ ia64-*-hpux*)
+ rm -rf conftest*
+ ;;
+
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+@@ -8009,7 +8009,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -8028,7 +8031,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+--- isl-0.11.1/config.sub.jj 2014-04-10 20:44:52.000000000 +0200
++++ isl-0.11.1/config.sub 2014-04-10 10:38:39.203978206 +0200
+@@ -1,24 +1,18 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+-# 2011, 2012 Free Software Foundation, Inc.
+-
+-timestamp='2012-04-18'
+-
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine. It does not imply ALL GNU software can.
+-#
+-# This file is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
++# Copyright 1992-2013 Free Software Foundation, Inc.
++
++timestamp='2013-10-01'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, see .
+@@ -26,11 +20,12 @@ timestamp='2012-04-18'
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+
+
+-# Please send patches to . Submit a context
+-# diff and a properly formatted GNU ChangeLog entry.
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+@@ -73,9 +68,7 @@ Report bugs and patches to and include a ChangeLog
+-# entry.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+ #
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
++# Originally written by Per Bothner.
+ #
+ # You can get the latest version of this script from:
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++#
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
++
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -54,9 +50,7 @@ version="\
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+-Free Software Foundation, Inc.
++Copyright 1992-2013 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ ;;
++esac
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+- arm:riscos:*:*|arm:RISCOS:*:*)
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -801,6 +820,9 @@ EOF
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+@@ -852,21 +874,21 @@ EOF
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -879,59 +901,54 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo ${UNAME_MACHINE}-axis-linux-gnu
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+- LIBC=gnu
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -950,54 +967,63 @@ EOF
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
++ or1k:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
+ or32:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+- echo sparc-unknown-linux-gnu
++ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+- echo ${UNAME_MACHINE}-ibm-linux
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+@@ -1201,6 +1227,9 @@ EOF
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+@@ -1227,19 +1256,21 @@ EOF
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+- case $UNAME_PROCESSOR in
+- i386)
+- eval $set_cc_for_build
+- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+- grep IS_64BIT_ARCH >/dev/null
+- then
+- UNAME_PROCESSOR="x86_64"
+- fi
+- fi ;;
+- unknown) UNAME_PROCESSOR=powerpc ;;
+- esac
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+@@ -1330,9 +1361,6 @@ EOF
+ exit ;;
+ esac
+
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c < conftest.$ac_ext
+@@ -1282,7 +1282,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+- ppc64-*linux*|powerpc64-*linux*)
++ powerpc64le-*linux*)
++ LD="${LD-ld} -m elf32lppclinux"
++ ;;
++ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+@@ -1301,7 +1304,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+- ppc*-*linux*|powerpc*-*linux*)
++ powerpcle-*linux*)
++ LD="${LD-ld} -m elf64lppc"
++ ;;
++ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec
index 2c3f959..fa0f6e2 100644
--- a/SPECS/gcc.spec
+++ b/SPECS/gcc.spec
@@ -1,13 +1,12 @@
-%global DATE 20140120
-%global SVNREV 206854
-%global gcc_version 4.8.2
+%global DATE 20140911
+%global SVNREV 215159
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 16
+%global gcc_release 9
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
-%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64p7 alpha
+%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64le ppc64p7 alpha aarch64
%global build_ada 1
%else
%global build_ada 0
@@ -17,7 +16,7 @@
%else
%global build_java 1
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm}
%global build_go 1
%else
%global build_go 0
@@ -37,19 +36,19 @@
%else
%global build_libtsan 0
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm}
%global build_libatomic 1
%else
%global build_libatomic 0
%endif
-%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64p7 s390 s390x
+%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64
%global build_libitm 1
%else
%global build_libitm 0
%endif
%global build_cloog 1
%global build_libstdcxx_docs 1
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm} aarch64
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64
%global attr_ifunc 1
%else
%global attr_ifunc 0
@@ -74,15 +73,23 @@
%endif
Summary: Various compilers (C, C++, Objective-C, Java, ...)
Name: gcc
-Version: %{gcc_version}
-Release: %{gcc_release}.2%{?dist}
+%if 0%{?rhel} == 7
+%global gcc_version 4.8.2
+%else
+%global gcc_version 4.8.3
+%endif
+Version: 4.8.3
+Release: %{gcc_release}%{?dist}
+%if "%{version}" != "%{gcc_version}"
+%define gcc_provides %{gcc_version}-16%{?dist}
+%endif
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Group: Development/Languages
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_7-branch@%{SVNREV} gcc-%{version}-%{DATE}
+# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_8-branch@%{SVNREV} gcc-%{version}-%{DATE}
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
Source0: gcc-%{version}-%{DATE}.tar.bz2
%global isl_version 0.11.1
@@ -129,7 +136,7 @@ BuildRequires: gcc-java, libgcj
BuildRequires: glibc-devel >= 2.4.90-13
BuildRequires: elfutils-devel >= 0.147
BuildRequires: elfutils-libelf-devel >= 0.147
-%ifarch ppc ppc64 ppc64p7 s390 s390x sparc sparcv9 alpha
+%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
# Make sure glibc supports TFmode long double
BuildRequires: glibc >= 2.3.90-35
%endif
@@ -166,7 +173,7 @@ Requires: binutils >= 2.20.51.0.2-12
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
-%ifarch ppc ppc64 ppc64p7 s390 s390x sparc sparcv9 alpha
+%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
# Make sure glibc supports TFmode long double
Requires: glibc >= 2.3.90-35
%endif
@@ -185,6 +192,9 @@ Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
AutoReq: true
Provides: bundled(libiberty)
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc = %{gcc_provides}
+%endif
Patch0: gcc48-hack.patch
Patch1: gcc48-java-nomulti.patch
@@ -204,15 +214,13 @@ Patch14: gcc48-pr56493.patch
Patch15: gcc48-color-auto.patch
Patch16: gcc48-pr28865.patch
Patch17: gcc48-libgo-p224.patch
-Patch18: gcc48-pr60137.patch
-Patch19: gcc48-pr60010.patch
-Patch20: gcc48-pr60046.patch
-Patch21: gcc48-pr57896.patch
-Patch22: gcc48-pr60272.patch
-Patch23: gcc48-pr60233.patch
-Patch24: gcc48-pr60274.patch
-Patch25: gcc48-rh1121077.patch
-Patch26: gcc48-pr61801.patch
+Patch18: gcc48-pr60010.patch
+Patch19: gcc48-aarch64-ada.patch
+Patch20: gcc48-aarch64-async-unw-tables.patch
+Patch21: gcc48-aarch64-unwind-opt.patch
+Patch22: gcc48-pr63341.patch
+Patch23: gcc48-pr63284.patch
+Patch24: gcc48-test-compat-Wno-abi.patch
Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch
@@ -220,8 +228,12 @@ Patch1002: fastjar-0.97-filename0.patch
Patch1003: fastjar-CVE-2010-0831.patch
Patch1004: fastjar-man.patch
Patch1005: fastjar-0.97-aarch64-config.patch
+Patch1006: fastjar-0.97-ppc64le-config.patch
Patch1100: isl-%{isl_version}-aarch64-config.patch
+Patch1101: isl-%{isl_version}-ppc64le-config.patch
+
+Patch1200: cloog-%{cloog_version}-ppc64le-config.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -246,6 +258,9 @@ You'll need this package in order to compile C code.
Summary: GCC version 4.8 shared support library
Group: System Environment/Libraries
Autoreq: false
+%if "%{version}" != "%{gcc_version}"
+Provides: libgcc = %{gcc_provides}
+%endif
%description -n libgcc
This package contains GCC shared support library which is needed
@@ -258,6 +273,9 @@ Requires: gcc = %{version}-%{release}
Requires: libstdc++ = %{version}-%{release}
Requires: libstdc++-devel = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-c++ = %{gcc_provides}
+%endif
%description c++
This package adds C++ support to the GNU Compiler Collection.
@@ -269,6 +287,9 @@ Summary: GNU Standard C++ Library
Group: System Environment/Libraries
Autoreq: true
Requires: glibc >= 2.10.90-7
+%if "%{version}" != "%{gcc_version}"
+Provides: libstdc++ = %{gcc_provides}
+%endif
%description -n libstdc++
The libstdc++ package contains a rewritten standard compliant GCC Standard
@@ -279,6 +300,9 @@ Summary: Header files and libraries for C++ development
Group: Development/Libraries
Requires: libstdc++%{?_isa} = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libstdc++-devel = %{gcc_provides}
+%endif
%description -n libstdc++-devel
This is the GNU implementation of the standard C++ libraries. This
@@ -290,6 +314,9 @@ Summary: Static libraries for the GNU standard C++ library
Group: Development/Libraries
Requires: libstdc++-devel = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libstdc++-static = %{gcc_provides}
+%endif
%description -n libstdc++-static
Static libraries for the GNU standard C++ library.
@@ -298,6 +325,9 @@ Static libraries for the GNU standard C++ library.
Summary: Documentation for the GNU standard C++ library
Group: Development/Libraries
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libstdc++-docs = %{gcc_provides}
+%endif
%description -n libstdc++-docs
Manual, doxygen generated API information and Frequently Asked Questions
@@ -309,6 +339,9 @@ Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libobjc = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-objc = %{gcc_provides}
+%endif
%description objc
gcc-objc provides Objective-C support for the GCC.
@@ -320,6 +353,9 @@ Summary: Objective-C++ support for GCC
Group: Development/Languages
Requires: gcc-c++ = %{version}-%{release}, gcc-objc = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-objc++ = %{gcc_provides}
+%endif
%description objc++
gcc-objc++ package provides Objective-C++ support for the GCC.
@@ -328,6 +364,9 @@ gcc-objc++ package provides Objective-C++ support for the GCC.
Summary: Objective-C runtime
Group: System Environment/Libraries
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libobjc = %{gcc_provides}
+%endif
%description -n libobjc
This package contains Objective-C shared library which is needed to run
@@ -346,6 +385,9 @@ BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-gfortran = %{gcc_provides}
+%endif
%description gfortran
The gcc-gfortran package provides support for compiling Fortran
@@ -358,6 +400,9 @@ Autoreq: true
%if %{build_libquadmath}
Requires: libquadmath = %{version}-%{release}
%endif
+%if "%{version}" != "%{gcc_version}"
+Provides: libgfortran = %{gcc_provides}
+%endif
%description -n libgfortran
This package contains Fortran shared library which is needed to run
@@ -371,6 +416,9 @@ Requires: gcc = %{version}-%{release}
%if %{build_libquadmath}
Requires: libquadmath-static = %{version}-%{release}
%endif
+%if "%{version}" != "%{gcc_version}"
+Provides: libgfortran-static = %{gcc_provides}
+%endif
%description -n libgfortran-static
This package contains static Fortran libraries.
@@ -380,6 +428,9 @@ Summary: GCC OpenMP v3.0 shared support library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libgomp = %{gcc_provides}
+%endif
%description -n libgomp
This package contains GCC shared support library which is needed
@@ -388,6 +439,9 @@ for OpenMP v3.0 support.
%package -n libmudflap
Summary: GCC mudflap shared support library
Group: System Environment/Libraries
+%if "%{version}" != "%{gcc_version}"
+Provides: libmudflap = %{gcc_provides}
+%endif
%description -n libmudflap
This package contains GCC shared support library which is needed
@@ -398,6 +452,9 @@ Summary: GCC mudflap support
Group: Development/Libraries
Requires: libmudflap = %{version}-%{release}
Requires: gcc = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libmudflap-devel = %{gcc_provides}
+%endif
%description -n libmudflap-devel
This package contains headers for building mudflap-instrumented programs.
@@ -410,6 +467,9 @@ also add -fmudflapth and -lmudflapth.
Summary: Static libraries for mudflap support
Group: Development/Libraries
Requires: libmudflap-devel = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libmudflap-static = %{gcc_provides}
+%endif
%description -n libmudflap-static
This package contains static libraries for building mudflap-instrumented
@@ -420,6 +480,9 @@ Summary: GCC __float128 shared support library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libquadmath = %{gcc_provides}
+%endif
%description -n libquadmath
This package contains GCC shared support library which is needed
@@ -430,6 +493,9 @@ Summary: GCC __float128 support
Group: Development/Libraries
Requires: libquadmath = %{version}-%{release}
Requires: gcc = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libquadmath-devel = %{gcc_provides}
+%endif
%description -n libquadmath-devel
This package contains headers for building Fortran programs using
@@ -439,6 +505,9 @@ REAL*16 and programs using __float128 math.
Summary: Static libraries for __float128 support
Group: Development/Libraries
Requires: libquadmath-devel = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libquadmath-static = %{gcc_provides}
+%endif
%description -n libquadmath-static
This package contains static libraries for building Fortran programs
@@ -449,6 +518,9 @@ Summary: The GNU Transactional Memory library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libitm = %{gcc_provides}
+%endif
%description -n libitm
This package contains the GNU Transactional Memory library
@@ -459,6 +531,9 @@ Summary: The GNU Transactional Memory support
Group: Development/Libraries
Requires: libitm = %{version}-%{release}
Requires: gcc = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libitm-devel = %{gcc_provides}
+%endif
%description -n libitm-devel
This package contains headers and support files for the
@@ -468,6 +543,9 @@ GNU Transactional Memory library.
Summary: The GNU Transactional Memory static library
Group: Development/Libraries
Requires: libitm-devel = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libitm-static = %{gcc_provides}
+%endif
%description -n libitm-static
This package contains GNU Transactional Memory static libraries.
@@ -477,6 +555,9 @@ Summary: The GNU Atomic library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libatomic = %{gcc_provides}
+%endif
%description -n libatomic
This package contains the GNU Atomic library
@@ -487,6 +568,9 @@ by hardware.
Summary: The GNU Atomic static library
Group: Development/Libraries
Requires: libatomic = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libatomic-static = %{gcc_provides}
+%endif
%description -n libatomic-static
This package contains GNU Atomic static libraries.
@@ -496,6 +580,9 @@ Summary: The Address Sanitizer runtime library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libasan = %{gcc_provides}
+%endif
%description -n libasan
This package contains the Address Sanitizer library
@@ -505,6 +592,9 @@ which is used for -fsanitize=address instrumented programs.
Summary: The Address Sanitizer static library
Group: Development/Libraries
Requires: libasan = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libasan-static = %{gcc_provides}
+%endif
%description -n libasan-static
This package contains Address Sanitizer static runtime library.
@@ -514,6 +604,9 @@ Summary: The Thread Sanitizer runtime library
Group: System Environment/Libraries
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
+%if "%{version}" != "%{gcc_version}"
+Provides: libtsan = %{gcc_provides}
+%endif
%description -n libtsan
This package contains the Thread Sanitizer library
@@ -523,6 +616,9 @@ which is used for -fsanitize=thread instrumented programs.
Summary: The Thread Sanitizer static library
Group: Development/Libraries
Requires: libtsan = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libtsan-static = %{gcc_provides}
+%endif
%description -n libtsan-static
This package contains Thread Sanitizer static runtime library.
@@ -537,6 +633,9 @@ Requires: /usr/share/java/eclipse-ecj.jar
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-java = %{gcc_provides}
+%endif
%description java
This package adds support for compiling Java(tm) programs and
@@ -560,6 +659,9 @@ BuildRequires: libXtst-devel
BuildRequires: libXt-devel
%endif
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgcj = %{gcc_provides}
+%endif
%description -n libgcj
The Java(tm) runtime library. You will need this package to run your Java
@@ -573,6 +675,9 @@ Requires: zlib-devel%{?_isa}
Requires: /bin/awk
Autoreq: false
Autoprov: false
+%if "%{version}" != "%{gcc_version}"
+Provides: libgcj-devel = %{gcc_provides}
+%endif
%description -n libgcj-devel
The Java(tm) static libraries and C header files. You will need this
@@ -583,6 +688,9 @@ Summary: Java library sources from GCC4 preview
Group: System Environment/Libraries
Requires: libgcj = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgcj-src = %{gcc_provides}
+%endif
%description -n libgcj-src
The Java(tm) runtime library sources for use in Eclipse.
@@ -595,6 +703,9 @@ Provides: /lib/cpp
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: cpp = %{gcc_provides}
+%endif
%description -n cpp
Cpp is the GNU C-Compatible Compiler Preprocessor.
@@ -626,6 +737,9 @@ Requires: libgnat = %{version}-%{release}, libgnat-devel = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-gnat = %{gcc_provides}
+%endif
%description gnat
GNAT is a GNU Ada 95 front-end to GCC. This package includes development tools,
@@ -635,6 +749,9 @@ the documents and Ada 95 compiler.
Summary: GNU Ada 95 runtime shared libraries
Group: System Environment/Libraries
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgnat = %{gcc_provides}
+%endif
%description -n libgnat
GNAT is a GNU Ada 95 front-end to GCC. This package includes shared libraries,
@@ -644,6 +761,9 @@ which are required to run programs compiled with the GNAT.
Summary: GNU Ada 95 libraries
Group: Development/Languages
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgnat-devel = %{gcc_provides}
+%endif
%description -n libgnat-devel
GNAT is a GNU Ada 95 front-end to GCC. This package includes libraries,
@@ -654,6 +774,9 @@ Summary: GNU Ada 95 static libraries
Group: Development/Languages
Requires: libgnat-devel = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgnat-static = %{gcc_provides}
+%endif
%description -n libgnat-static
GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries.
@@ -667,6 +790,9 @@ Requires: libgo-devel = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-go = %{gcc_provides}
+%endif
%description go
The gcc-go package provides support for compiling Go programs
@@ -676,6 +802,9 @@ with the GNU Compiler Collection.
Summary: Go runtime
Group: System Environment/Libraries
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgo = %{gcc_provides}
+%endif
%description -n libgo
This package contains Go shared library which is needed to run
@@ -686,6 +815,9 @@ Summary: Go development libraries
Group: Development/Languages
Requires: libgo = %{version}-%{release}
Autoreq: true
+%if "%{version}" != "%{gcc_version}"
+Provides: libgo-devel = %{gcc_provides}
+%endif
%description -n libgo-devel
This package includes libraries and support files for compiling
@@ -696,6 +828,9 @@ Summary: Static Go libraries
Group: Development/Libraries
Requires: libgo = %{version}-%{release}
Requires: gcc = %{version}-%{release}
+%if "%{version}" != "%{gcc_version}"
+Provides: libgo-static = %{gcc_provides}
+%endif
%description -n libgo-static
This package contains static Go libraries.
@@ -705,6 +840,9 @@ Summary: Support for compiling GCC plugins
Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
+%if "%{version}" != "%{gcc_version}"
+Provides: gcc-plugin-devel = %{gcc_provides}
+%endif
%description plugin-devel
This package contains header files and other support files
@@ -775,15 +913,15 @@ package or when debugging this package.
%patch16 -p0 -b .pr28865~
%patch17 -p0 -b .libgo-p224~
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
-%patch18 -p0 -b .pr60137~
-%patch19 -p0 -b .pr60010~
-%patch20 -p0 -b .pr60046~
-%patch21 -p0 -b .pr57896~
-%patch22 -p0 -b .pr60272~
-%patch23 -p0 -b .pr60233~
-%patch24 -p0 -b .pr60274~
-%patch25 -p0 -b .rh1121077~
-%patch26 -p0 -b .pr61801~
+%patch18 -p0 -b .pr60010~
+%ifarch aarch64
+%patch19 -p0 -b .aarch64-ada~
+%endif
+%patch20 -p0 -b .aarch64-async-unw-tables~
+%patch21 -p0 -b .aarch64-unwind-opt~
+%patch22 -p0 -b .pr63341~
+%patch23 -p0 -b .pr63284~
+%patch24 -p0 -b .test-compat-Wno-abi~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@@ -843,14 +981,18 @@ tar xzf %{SOURCE4}
%patch1003 -p0 -b .fastjar-CVE-2010-0831~
%patch1004 -p0 -b .fastjar-man~
%patch1005 -p0 -b .fastjar-0.97-aarch64-config~
+%patch1006 -p0 -b .fastjar-0.97-ppc64le-config~
%if %{bootstrap_java}
tar xjf %{SOURCE10}
%endif
-%patch1100 -p0 -b .isl-aarch64~
+%patch1100 -p0 -b .isl-aarch64-config~
+%patch1101 -p0 -b .isl-ppc64le-config~
-sed -i -e 's/4\.8\.3/4.8.2/' gcc/BASE-VER
+%patch1200 -p0 -b .cloog-ppc64le-config~
+
+sed -i -e 's/4\.8\.4/4.8.3/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
@@ -1013,7 +1155,7 @@ EOF
chmod +x gcc64
CC=`pwd`/gcc64
%endif
-%ifarch ppc64 ppc64p7
+%ifarch ppc64 ppc64le ppc64p7
if gcc -m64 -xc -S /dev/null -o - > /dev/null 2>&1; then
cat > gcc64 <<"EOF"
#!/bin/sh
@@ -1074,12 +1216,15 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \
%ifarch %{arm}
--disable-sjlj-exceptions \
%endif
-%ifarch ppc ppc64 ppc64p7
+%ifarch ppc ppc64 ppc64le ppc64p7
--enable-secureplt \
%endif
-%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64p7 s390 s390x alpha
+%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64le ppc64p7 s390 s390x alpha
--with-long-double-128 \
%endif
+%ifarch ppc64le
+ --disable-multilib \
+%endif
%ifarch sparc
--disable-linux-futex \
%endif
@@ -1089,6 +1234,9 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \
%ifarch sparc sparcv9
--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
%endif
+%ifarch ppc64le
+ --with-cpu-64=power7 --with-tune-64=power8 \
+%endif
%ifarch ppc ppc64 ppc64p7
%if 0%{?rhel} >= 7
--with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \
@@ -1248,8 +1396,8 @@ make DESTDIR=%{buildroot} -C %{gcc_target_platform}/libjava install-src.zip
chmod 644 %{buildroot}%{_infodir}/gnat*
%endif
-FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
-FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
%if %{build_cloog}
cp -a cloog-install/lib/libcloog-isl.so.4 $FULLPATH/
@@ -1267,7 +1415,7 @@ ln -sf gcc %{buildroot}%{_prefix}/bin/gnatgcc
cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`"
for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
if ! diff -up $cxxconfig $i; then
- cat > %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h < %{buildroot}%{_prefix}/include/c++/%{version}/%{gcc_target_platform}/bits/c++config.h <
@@ -1290,7 +1438,7 @@ EOF
fi
done
-for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do
+for f in `find %{buildroot}%{_prefix}/include/c++/%{version}/%{gcc_target_platform}/ -name c++config.h`; do
for i in 1 2 4 8; do
sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\
&\
@@ -1307,7 +1455,7 @@ done
# 4) it is huge
# People can always precompile on their own whatever they want, but
# shipping this for everybody is unnecessary.
-rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/*.h.gch
+rm -rf %{buildroot}%{_prefix}/include/c++/%{version}/%{gcc_target_platform}/bits/*.h.gch
%if %{build_libstdcxx_docs}
libstdcxx_doc_builddir=%{gcc_target_platform}/libstdc++-v3/doc/doxygen
@@ -1360,9 +1508,9 @@ mv %{buildroot}%{_prefix}/%{_lib}/libitm.spec $FULLPATH/
%endif
mkdir -p %{buildroot}/%{_lib}
-mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
-chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
-ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
+mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{version}-%{DATE}.so.1
+chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{version}-%{DATE}.so.1
+ln -sf libgcc_s-%{version}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so
%ifarch sparcv9 ppc
ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
@@ -1428,7 +1576,7 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \
%{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
pushd ../libstdc++-v3/python
for i in `find . -name \*.py`; do
- touch -r $i %{buildroot}%{_prefix}/share/gcc-%{gcc_version}/python/$i
+ touch -r $i %{buildroot}%{_prefix}/share/gcc-%{version}/python/$i
done
touch -r hook.in %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc++*gdb.py
popd
@@ -1737,33 +1885,33 @@ ln -sf lib64/adalib adalib
%endif
%else
%ifarch %{multilib_64_archs}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgfortran.a 32/libgfortran.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libstdc++.a 32/libstdc++.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libsupc++.a 32/libsupc++.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libmudflap.a 32/libmudflap.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libmudflapth.a 32/libmudflapth.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libgfortran.a 32/libgfortran.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libstdc++.a 32/libstdc++.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libsupc++.a 32/libsupc++.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libmudflap.a 32/libmudflap.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libmudflapth.a 32/libmudflapth.a
%if %{build_libquadmath}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libquadmath.a 32/libquadmath.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libquadmath.a 32/libquadmath.a
%endif
%if %{build_libitm}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libitm.a 32/libitm.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libitm.a 32/libitm.a
%endif
%if %{build_libatomic}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libatomic.a 32/libatomic.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libatomic.a 32/libatomic.a
%endif
%if %{build_libasan}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libasan.a 32/libasan.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libasan.a 32/libasan.a
%endif
%if %{build_go}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgo.a 32/libgo.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgobegin.a 32/libgobegin.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libgo.a 32/libgo.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libgobegin.a 32/libgobegin.a
%endif
%if %{build_java}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libgcj_bc.so 32/libgcj_bc.so
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/libgcj_bc.so 32/libgcj_bc.so
%endif
%if %{build_ada}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/adainclude 32/adainclude
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/adalib 32/adalib
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/adainclude 32/adainclude
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{version}/adalib 32/adalib
%endif
%endif
%endif
@@ -1840,6 +1988,31 @@ exec gcc $fl ${1+"$@"}
EOF
chmod 755 %{buildroot}%{_prefix}/bin/c?9
+%if "%{version}" != "%{gcc_version}"
+mv -f $RPM_BUILD_ROOT%{_prefix}/libexec/gcc/%{gcc_target_platform}/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+mv -f $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{gcc_target_platform}/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+mv -f $RPM_BUILD_ROOT%{_prefix}/include/c++/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/include/c++/%{version}
+mv -f $RPM_BUILD_ROOT%{_prefix}/share/gcc-{%{version},%{gcc_version}}
+ln -sf gcc-%{gcc_version} $RPM_BUILD_ROOT%{_prefix}/share/gcc-%{version}
+%if %{build_java}
+mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-{%{version},%{gcc_version}}
+ln -sf gcj-%{gcc_version} $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-%{version}
+mv -f $RPM_BUILD_ROOT%{_prefix}/share/java/libgcj-{%{version},%{gcc_version}}.jar
+ln -sf libgcj-%{gcc_version}.jar $RPM_BUILD_ROOT%{_prefix}/share/java/libgcj-%{version}.jar
+mv -f $RPM_BUILD_ROOT%{_prefix}/share/java/libgcj-tools-{%{version},%{gcc_version}}.jar
+ln -sf libgcj-tools-%{gcc_version}.jar $RPM_BUILD_ROOT%{_prefix}/share/java/libgcj-tools-%{version}.jar
+mv -f $RPM_BUILD_ROOT%{_prefix}/share/java/src-{%{version},%{gcc_version}}.zip
+ln -sf src-%{gcc_version}.zip $RPM_BUILD_ROOT%{_prefix}/share/java/src-%{version}.zip
+%endif
+%if %{build_go}
+mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/go/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/%{_lib}/go/%{version}
+%endif
+%endif
+
cd ..
%find_lang %{name}
%find_lang cpplib
@@ -1865,6 +2038,10 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.so*
rm -f %{buildroot}%{_prefix}/lib/lib*.a
rm -f %{buildroot}/lib/libgcc_s*.so*
%if %{build_go}
+%if "%{version}" != "%{gcc_version}"
+mv -f $RPM_BUILD_ROOT%{_prefix}/lib/go/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/lib/go/%{version}
+%endif
rm -rf %{buildroot}%{_prefix}/lib/go/%{gcc_version}/%{gcc_target_platform}
%ifnarch sparc64 ppc64 ppc64p7
ln -sf %{multilib_32_arch}-%{_vendor}-%{_target_os} %{buildroot}%{_prefix}/lib/go/%{gcc_version}/%{gcc_target_platform}
@@ -1876,6 +2053,10 @@ rm -f %{buildroot}%{_prefix}/lib64/lib*.so*
rm -f %{buildroot}%{_prefix}/lib64/lib*.a
rm -f %{buildroot}/lib64/libgcc_s*.so*
%if %{build_go}
+%if "%{version}" != "%{gcc_version}"
+mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/go/{%{version},%{gcc_version}}
+ln -sf %{gcc_version} $RPM_BUILD_ROOT%{_prefix}/lib64/go/%{version}
+%endif
rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_version}/%{gcc_target_platform}
%endif
%endif
@@ -1883,11 +2064,11 @@ rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_version}/%{gcc_target_platform}
%if %{build_java}
mkdir -p %{buildroot}%{_prefix}/share/java/gcj-endorsed \
- %{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
+ %{buildroot}%{_prefix}/%{_lib}/gcj-%{gcc_version}/classmap.db.d
chmod 755 %{buildroot}%{_prefix}/share/java/gcj-endorsed \
- %{buildroot}%{_prefix}/%{_lib}/gcj-%{version} \
- %{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
-touch %{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db
+ %{buildroot}%{_prefix}/%{_lib}/gcj-%{gcc_version} \
+ %{buildroot}%{_prefix}/%{_lib}/gcj-%{gcc_version}/classmap.db.d
+touch %{buildroot}%{_prefix}/%{_lib}/gcj-%{gcc_version}/classmap.db
%endif
rm -f %{buildroot}%{mandir}/man3/ffi*
@@ -2143,10 +2324,16 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so*
@@ -2208,7 +2395,7 @@ fi
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ia64intrin.h
%endif
-%ifarch ppc ppc64 ppc64p7
+%ifarch ppc ppc64 ppc64le ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ppc-asm.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/altivec.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/spe.h
@@ -2364,11 +2551,14 @@ fi
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1
%files -n libgcc
%defattr(-,root,root,-)
-/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
+/%{_lib}/libgcc_s-%{version}-%{DATE}.so.1
/%{_lib}/libgcc_s.so.1
%doc gcc/COPYING* COPYING.RUNTIME
@@ -2381,9 +2571,15 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
@@ -2416,18 +2612,27 @@ fi
%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py*
%dir %{_prefix}/share/gcc-%{gcc_version}
%dir %{_prefix}/share/gcc-%{gcc_version}/python
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/share/gcc-%{version}
+%endif
%{_prefix}/share/gcc-%{gcc_version}/python/libstdcxx
%files -n libstdc++-devel
%defattr(-,root,root,-)
%dir %{_prefix}/include/c++
%dir %{_prefix}/include/c++/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/include/c++/%{version}
+%endif
%{_prefix}/include/c++/%{gcc_version}/[^gjos]*
%{_prefix}/include/c++/%{gcc_version}/os*
%{_prefix}/include/c++/%{gcc_version}/s[^u]*
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifnarch sparcv9 ppc %{multilib_64_archs}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
%endif
@@ -2438,6 +2643,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++.a
@@ -2465,9 +2673,15 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/objc
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1obj
@@ -2491,6 +2705,9 @@ fi
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1objplus
%files -n libobjc
@@ -2506,9 +2723,15 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib.f90
@@ -2547,6 +2770,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libgfortran.a
@@ -2574,9 +2800,15 @@ fi
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/jc1
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ecj1
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/jvgenmain
@@ -2640,26 +2872,35 @@ fi
%{_prefix}/%{_lib}/libgcj-tools.so.*
%{_prefix}/%{_lib}/libgcj_bc.so.*
%{_prefix}/%{_lib}/libgij.so.*
-%dir %{_prefix}/%{_lib}/gcj-%{version}
-%{_prefix}/%{_lib}/gcj-%{version}/libgtkpeer.so
-%{_prefix}/%{_lib}/gcj-%{version}/libgjsmalsa.so
-%{_prefix}/%{_lib}/gcj-%{version}/libjawt.so
-%{_prefix}/%{_lib}/gcj-%{version}/libjvm.so
-%{_prefix}/%{_lib}/gcj-%{version}/libjavamath.so
+%dir %{_prefix}/%{_lib}/gcj-%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/%{_lib}/gcj-%{version}
+%endif
+%{_prefix}/%{_lib}/gcj-%{gcc_version}/libgtkpeer.so
+%{_prefix}/%{_lib}/gcj-%{gcc_version}/libgjsmalsa.so
+%{_prefix}/%{_lib}/gcj-%{gcc_version}/libjawt.so
+%{_prefix}/%{_lib}/gcj-%{gcc_version}/libjvm.so
+%{_prefix}/%{_lib}/gcj-%{gcc_version}/libjavamath.so
%dir %{_prefix}/share/java
%{_prefix}/share/java/[^sl]*
+%{_prefix}/share/java/libgcj-%{gcc_version}.jar
+%if "%{version}" != "%{gcc_version}"
%{_prefix}/share/java/libgcj-%{version}.jar
+%endif
%dir %{_prefix}/%{_lib}/security
%config(noreplace) %{_prefix}/%{_lib}/security/classpath.security
%{_prefix}/%{_lib}/logging.properties
-%dir %{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
-%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_prefix}/%{_lib}/gcj-%{version}/classmap.db
+%dir %{_prefix}/%{_lib}/gcj-%{gcc_version}/classmap.db.d
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_prefix}/%{_lib}/gcj-%{gcc_version}/classmap.db
%files -n libgcj-devel
%defattr(-,root,root,-)
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/gcj
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/jawt.h
@@ -2681,6 +2922,9 @@ fi
%endif
%dir %{_prefix}/include/c++
%dir %{_prefix}/include/c++/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/include/c++/%{version}
+%endif
%{_prefix}/include/c++/%{gcc_version}/[gj]*
%{_prefix}/include/c++/%{gcc_version}/org
%{_prefix}/include/c++/%{gcc_version}/sun
@@ -2692,8 +2936,11 @@ fi
%defattr(-,root,root,-)
%dir %{_prefix}/share/java
%{_prefix}/share/java/src*.zip
+%{_prefix}/share/java/libgcj-tools-%{gcc_version}.jar
+%if "%{version}" != "%{gcc_version}"
%{_prefix}/share/java/libgcj-tools-%{version}.jar
%endif
+%endif
%if %{build_ada}
%files gnat
@@ -2704,9 +2951,15 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/adainclude
@@ -2734,6 +2987,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adainclude
@@ -2760,6 +3016,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib
@@ -2795,6 +3054,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mf-runtime.h
%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
@@ -2808,6 +3070,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libmudflap.a
@@ -2835,6 +3100,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h
@@ -2848,6 +3116,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libquadmath.a
@@ -2872,6 +3143,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
#%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/itm.h
#%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/itm_weak.h
@@ -2885,6 +3159,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libitm.a
@@ -2908,6 +3185,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libatomic.a
@@ -2932,6 +3212,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libasan.a
@@ -2956,6 +3239,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a
%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
%endif
@@ -2968,9 +3254,15 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/go1
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
@@ -3005,11 +3297,17 @@ fi
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/%{_lib}/go
%dir %{_prefix}/%{_lib}/go/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/%{_lib}/go/%{version}
+%endif
%{_prefix}/%{_lib}/go/%{gcc_version}/%{gcc_target_platform}
%ifarch %{multilib_64_archs}
%ifnarch sparc64 ppc64 ppc64p7
%dir %{_prefix}/lib/go
%dir %{_prefix}/lib/go/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/go/%{version}
+%endif
%{_prefix}/lib/go/%{gcc_version}/%{gcc_target_platform}
%endif
%endif
@@ -3031,6 +3329,9 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libgo.a
@@ -3049,21 +3350,133 @@ fi
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
+%if "%{version}" != "%{gcc_version}"
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{version}
+%endif
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
-* Wed Aug 6 2014 Jakub Jelinek 4.8.2-16.2
-- backport two further OpenMP 4.0 libgomp tasking fixes (#1121077)
-- fix scheduler wrong-code with DEBUG_INSNs containing volatile ASM_OPERANDS
- (#1127120, PR rtl-optimization/61801)
-
-* Fri Jul 18 2014 Jakub Jelinek 4.8.2-16.1
-- backport OpenMP 4.0 support to libgomp (library only; #1121077,
- PR libgomp/58691)
+* Fri Nov 14 2014 Richard Henderson 4.8.3-9
+- Enable Ada for ppc64le (#1162196)
+
+* Fri Sep 26 2014 Jakub Jelinek 4.8.3-8
+- fix PowerPC unaligned vectorization bug (#1146871,
+ PR tree-optimization/63341)
+- fix another -fcompare-debug issue (PR debug/63284)
+
+* Thu Sep 11 2014 Jakub Jelinek 4.8.3-7
+- update from the 4.8 branch
+ - fix ppc32 libgo.so.4 to avoid RWE PT_GNU_STACK
+
+* Wed Sep 10 2014 Jakub Jelinek 4.8.3-6
+- update from the 4.8 branch (#1140019)
+ - PRs c++/58714, c++/59823, c++/59956, c++/60241, c++/60361, c++/61959,
+ c/61271, debug/55794, debug/60655, debug/61923, fortran/61999,
+ fortran/62214, fortran/62270, ipa/61986, ipa/62015, libgfortran/62188,
+ libstdc++/58962, libstdc++/61946, middle-end/61010, middle-end/61045,
+ middle-end/62103, rtl-optimization/62004, rtl-optimization/62030,
+ target/61996, target/62038, target/62195, testsuite/56194,
+ tree-optimization/60196, tree-optimization/60707,
+ tree-optimization/61452, tree-optimization/62073,
+ tree-optimization/62075, tree-optimization/63189
+
+* Thu Aug 21 2014 Richard Henderson 4.8.3-5
+- backport aarch64 unwind info improvements (#1132636)
+
+* Fri Aug 1 2014 Jakub Jelinek 4.8.3-4
+- update from the 4.8 branch
+ - PRs fortran/61780, libobjc/61920, target/47230, tree-optimization/61375,
+ tree-optimization/61964
+ - fix libgfortran overflows on allocation (CVE-2014-5044)
+- backport ibm-ldouble performance improvements (#1090620)
+
+* Wed Jul 30 2014 Jakub Jelinek 4.8.3-3
+- on ppc64le use -mtune=power8 by default (#1123484)
+
+* Thu Jul 17 2014 Jakub Jelinek 4.8.3-2
+- update from the 4.8 branch
+ - PRs c++/61500, c++/61539, c++/61647, fortran/58883, fortran/61459,
+ middle-end/53590, rtl-optimization/61801, target/61542, target/61586,
+ tree-optimization/61306, tree-optimization/61684
+- for rhel 7.1 keep the old 4.8.2 pathnames and use 4.8.3 symlinks
+- merge in aarch64 support (#1070290)
+- small improvements on s390x for z196 and later (#1088542)
+- make sure OpenMP outlined artificial functions have DW_AT_name (#844959)
+
+* Tue Jun 24 2014 Jakub Jelinek 4.8.3-1
+- update from the 4.8 branch
+ - GCC 4.8.3 release
+ - PRs c++/60605, c++/60731, c++/61134, fortran/45187, ipa/61393,
+ libfortran/61187, libfortran/61310, libstdc++/60734, libstdc++/60966,
+ rtl-optimization/60866, rtl-optimization/60901, rtl-optimization/61094,
+ rtl-optimization/61446, target/61044, target/61193, target/61202,
+ target/61208, target/61231, target/61239, target/61249, target/61300,
+ target/61415, target/61423, target/61431, target/61443, target/61483,
+ target/61545, target/61570, tree-optimization/61383
+
+* Thu May 15 2014 Jakub Jelinek 4.8.2-18
+- update from the 4.8 branch
+ - PRs c++/60367, c++/60628, c++/60689, c++/60708, c++/60713, debug/60603,
+ driver/61106, libfortran/56919, libfortran/60810, libstdc++/60497,
+ libstdc++/60594, libstdc++/61117, middle-end/36282, middle-end/55022,
+ middle-end/60635, middle-end/60729, middle-end/60750,
+ middle-end/60849, middle-end/60895, rtl-optimization/60769,
+ target/57589, target/58595, target/59952, target/60516, target/60609,
+ target/60672, target/60693, target/60839, target/60909, target/60941,
+ target/60991, target/61026, target/61055, tree-optimization/57864,
+ tree-optimization/59817, tree-optimization/60453,
+ tree-optimization/60502, tree-optimization/60740,
+ tree-optimization/60766, tree-optimization/60836,
+ tree-optimization/60903, tree-optimization/60930,
+ tree-optimization/60960
+- backport OpenMP 4.0 support to libgomp (library only; PR libgomp/58691)
+
+* Fri Apr 11 2014 Jakub Jelinek 4.8.2-17
+- update from the 4.8 branch
+ - PRs ada/51483, ada/60703, c/37743, c/59891, c/60101, c++/37140, c++/41174,
+ c++/54652, c++/55800, c++/57043, c++/57524, c++/57899, c++/58466,
+ c++/58504, c++/58606, c++/58632, c++/58639, c++/58672, c++/58812,
+ c++/58814, c++/58835, c++/58837, c++/58845, c++/58873, c++/58965,
+ c++/59097, c++/59224, c++/59646, c++/59989, c++/60108, c++/60146,
+ c++/60182, c++/60187, c++/60216, c++/60219, c++/60248, debug/59776,
+ fortran/49397, fortran/52370, fortran/55907, fortran/57033,
+ fortran/58007, fortran/58803, fortran/59395, fortran/59414,
+ fortran/59599, fortran/59700, fortran/59906, fortran/60231,
+ fortran/60283, fortran/60341, fortran/60450, fortran/60522,
+ fortran/60543, fortran/60576, fortran/60677, ipa/55260, ipa/60026,
+ ipa/60419, ipa/60640, libfortran/38199, libfortran/58324,
+ libfortran/59700, libfortran/59764, libfortran/59771,
+ libfortran/59774, libfortran/59836, libfortran/60128, libgcc/60166,
+ libgcj/55637, libstdc++/59215, libstdc++/59392, libstdc++/59548,
+ libstdc++/59680, libstdc++/59738, libstdc++/60564, libstdc++/60658,
+ middle-end/57499, middle-end/58809, middle-end/60004,
+ middle-end/60221, middle-end/60291, objc/56870, other/56653,
+ preprocessor/56824, preprocessor/58844, preprocessor/60400,
+ rtl-optimization/56356, rtl-optimization/57422,
+ rtl-optimization/57425, rtl-optimization/57569,
+ rtl-optimization/57637, rtl-optimization/60116,
+ rtl-optimization/60452, rtl-optimization/60601,
+ rtl-optimization/60700, target/43546, target/48094, target/54083,
+ target/54407, target/55426, target/56843, target/57052, target/57935,
+ target/57949, target/58675, target/58710, target/59054, target/59379,
+ target/59396, target/59462, target/59718, target/59777, target/59844,
+ target/59880, target/59909, target/59929, target/60017, target/60032,
+ target/60039, target/60062, target/60151, target/60193, target/60203,
+ target/60207, target/60486, target/60568, target/60735,
+ tree-optimization/56490, tree-optimization/59903,
+ tree-optimization/60115, tree-optimization/60183,
+ tree-optimization/60276, tree-optimization/60382,
+ tree-optimization/60429, tree-optimization/60454,
+ tree-optimization/60485
+ - powerpc64 little endian support
+- enable ppc64le in the spec file
* Mon Mar 3 2014 Jakub Jelinek 4.8.2-16
- fix up compare_exchange_* in libatomic too (PR c++/60272)