summaryrefslogtreecommitdiff
path: root/lang/gcc-aux
diff options
context:
space:
mode:
authormarino <marino@pkgsrc.org>2012-08-03 08:53:57 +0000
committermarino <marino@pkgsrc.org>2012-08-03 08:53:57 +0000
commit75006b6a58f776dbedc5f0902383f354b3d7a3de (patch)
tree9e2d89976a7671777bbac710b8505a185db77f29 /lang/gcc-aux
parentc72f835600d017dedb51104ebdc1eee3eca4bc91 (diff)
downloadpkgsrc-75006b6a58f776dbedc5f0902383f354b3d7a3de.tar.gz
lang/gcc-aux: add gcc-aux/lib runpath to LINK_SPEC
The libraries of gcc-aux are not located on standard search paths for the runtime linker to find. Moreover, libraries from other versions of gcc may be and in that case rtld will link the wrong library. To fix this, an rpath to ${PREFIX}/gcc-aux/lib will be inserted into every dynamic binary created by gcc-aux. Other changes include: 1) simpler and more robust detection of an existing gcc-aux compiler to be used rather than the older bootstrap compiler. 2) Fixed FreeBSD support. FreeBSD bootstraps are available but not yet listed due to lack of testing (however, it should work out of the box) 3) Fixed some c++ testsuite directives for dejagnu
Diffstat (limited to 'lang/gcc-aux')
-rw-r--r--lang/gcc-aux/Makefile28
-rw-r--r--lang/gcc-aux/files/diff-core209
-rw-r--r--lang/gcc-aux/files/diff-cxx-testsuite110
3 files changed, 256 insertions, 91 deletions
diff --git a/lang/gcc-aux/Makefile b/lang/gcc-aux/Makefile
index ae494ff31c8..925b20f928a 100644
--- a/lang/gcc-aux/Makefile
+++ b/lang/gcc-aux/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2012/07/14 21:53:05 marino Exp $
+# $NetBSD: Makefile,v 1.3 2012/08/03 08:53:57 marino Exp $
#
PKGNAME= gcc-aux-${SNAPSHOT}
DISTNAME= gcc-${GCC_VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
DISTFILES= ${DISTNAME}.tar.bz2
@@ -122,17 +122,11 @@ BASELIB= ${PREFIX}/lib
-# testing if gcc-aux, gnatlink, gnatbind and gnatmake are in standard location
-# exists function will NOT expand any variable, so it has to be hard-coded
-.if exists(/usr/pkg/gcc-aux/bin/ada) || exists(/opt/ipp/pkg/gcc-aux/bin/ada)
-.if exists(/usr/pkg/gcc-aux/bin/gnatbind) || exists(/opt/ipp/pkg/gcc-aux/bin/gnatbind)
-.if exists(/usr/pkg/gcc-aux/bin/gnatlink) || exists(/opt/ipp/pkg/gcc-aux/bin/gnatlink)
-.if exists(/usr/pkg/gcc-aux/bin/gnatmake) || exists(/opt/ipp/pkg/gcc-aux/bin/gnatmake)
-FULL_GNATGCC=${PREFIX}/gcc-aux/bin/ada
-.endif #gnatmake
-.endif #gnatlink
-.endif #gnatbind
-.endif #gnatgcc
+# testing if gcc-aux is already installed - if so, use this compiler along with
+# its gnatlink, gnatbind, and gnatmake rather than the older bootstrap versions
+.if exists(${LOCALBASE}/gcc-aux/bin/ada)
+FULL_GNATGCC=${LOCALBASE}/gcc-aux/bin/ada
+.endif
.if ${FULL_GNATGCC} == "NOT SET"
@@ -206,6 +200,14 @@ post-extract:
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
.endfor
+ # Update LINK_SPEC to add gcc-aux lib runpath in every binary
+ @${ECHO} "Configuring LINK_SPEC runpath"
+ @perl -pi -e 's;\@PREFIX\@;${PREFIX};' \
+ ${WRKSRC}/gcc/config/dragonfly.h \
+ ${WRKSRC}/gcc/config/i386/freebsd.h \
+ ${WRKSRC}/gcc/config/i386/netbsd-elf.h
+
+ # Handle static option
.if !empty(PKG_OPTIONS:Mstatic) || ${OPSYS} == "NetBSD"
@${ECHO} "Reconfiguring GCC Makefile to build compiler statically"
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-static-version
diff --git a/lang/gcc-aux/files/diff-core b/lang/gcc-aux/files/diff-core
index 6040d6cb1a0..b5422f86925 100644
--- a/lang/gcc-aux/files/diff-core
+++ b/lang/gcc-aux/files/diff-core
@@ -95,7 +95,7 @@
arm*-*-rtemseabi*)
tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
-@@ -1196,6 +1240,14 @@
+@@ -1196,19 +1240,31 @@
x86_64-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
;;
@@ -109,9 +109,11 @@
+ ;;
i[34567]86-*-freebsd*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
++ tmake_file="${tmake_file} i386/t-crtstuff"
;;
-@@ -1203,12 +1255,14 @@
+ x86_64-*-freebsd*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
++ tmake_file="${tmake_file} i386/t-crtstuff"
;;
i[34567]86-*-netbsdelf*)
- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
@@ -127,7 +129,7 @@
;;
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
-@@ -3530,6 +3584,8 @@
+@@ -3530,6 +3586,8 @@
;;
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
@@ -197,7 +199,7 @@
+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? UINT64_TYPE : UINT32_TYPE)
--- /dev/null
+++ gcc/config/dragonfly.h
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,136 @@
+/* Base configuration file for all DragonFly targets.
+ Copyright (C) 1999, 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
+
@@ -284,8 +286,9 @@
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker %(dfbsd_dynamic_linker) \
+ } \
-+ %{static:-Bstatic}} \
-+ %{!static:--hash-style=both} \
++ %{static:-Bstatic} \
++ } \
++ %{!static:--hash-style=both -rpath @PREFIX@/gcc-aux/lib} \
+ %{symbolic:-Bsymbolic}"
+
+#undef LINK_SPEC
@@ -570,44 +573,33 @@
+
--- gcc/config/i386/freebsd.h.orig
+++ gcc/config/i386/freebsd.h
-@@ -148,3 +148,34 @@
+@@ -102,6 +102,7 @@
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker %(fbsd_dynamic_linker) } \
+ %{static:-Bstatic}} \
++ %{!static:--hash-style=both -rpath @PREFIX@/gcc-aux/lib} \
+ %{symbolic:-Bsymbolic}"
+
+ /* A C statement to output to the stdio stream FILE an assembler
+@@ -148,3 +149,5 @@
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-+/* Through FreeBSD 8.2 at least, stack is denied execution rights by libthr
-+ This only affects AMD64 since i386 ignores the nx bit (non-PAE)
-+ However, it's still included in i386 because it's possible an AMD64
-+ machine will be required to run a binary generated by i386 GNAT.
-+ perms = PROT_READ | PROT_WRITE | PROT_EXEC;
-+*/
-+#define ENABLE_EXECUTE_STACK \
-+extern void __enable_execute_stack (void *); \
-+void \
-+__enable_execute_stack (void *addr) \
-+{ \
-+ extern int getpagesize (void); \
-+ extern int mprotect (void *, size_t, int); \
-+ \
-+ static int size; \
-+ long mask; \
-+ char *page, *ends; \
-+ long page_addr = (long) addr; \
-+ long ends_addr = (long) (addr + TRAMPOLINE_SIZE); \
-+ int perms = 7; \
-+ \
-+ if (size == 0) \
-+ { \
-+ size = getpagesize(); \
-+ } \
-+ mask = ~((long) size - 1); \
-+ page = (char *) (page_addr & mask); \
-+ ends = (char *) ((ends_addr & mask) + size); \
-+ (void) mprotect (page, ends - page, perms); \
-+}
-+
++/* Compile in __enable_execute_stack (void *) (see config.host) */
++#define HAVE_ENABLE_EXECUTE_STACK
--- gcc/config/i386/netbsd-elf.h.orig
+++ gcc/config/i386/netbsd-elf.h
-@@ -119,3 +119,9 @@
+@@ -38,7 +38,8 @@
+ /* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC NETBSD_LINK_SPEC_ELF
++#define LINK_SPEC NETBSD_LINK_SPEC_ELF \
++"%{!static:-rpath @PREFIX@/gcc-aux/lib}"
+
+ #define NETBSD_ENTRY_POINT "__start"
+
+@@ -119,3 +120,9 @@
#define DEFAULT_PCC_STRUCT_RETURN 1
#define HAVE_ENABLE_EXECUTE_STACK
@@ -742,15 +734,20 @@
# NetBSD 1.7 and later are set up to use GCC's crtstuff for
# ELF configurations. We will clear extra_parts in the
# a.out configurations.
-@@ -267,6 +279,7 @@
+@@ -266,8 +278,10 @@
+ esac
case ${host} in
- *-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2* | \
-+ *-*-dragonfly* | \
- alpha*-dec-osf5.1*)
+-*-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2* | \
+- alpha*-dec-osf5.1*)
++*-*-freebsd* | *-*-dragonfly* | *-*-netbsd* | *-*-openbsd*)
++ enable_execute_stack=enable-execute-stack-freebsd.c
++ ;;
++*-*-darwin* | *-*-solaris2* | alpha*-dec-osf5.1*)
enable_execute_stack=enable-execute-stack-mprotect.c
;;
-@@ -354,11 +367,11 @@
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
+@@ -354,11 +368,11 @@
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
@@ -764,7 +761,7 @@
tmake_file="${tmake_file} arm/t-bpabi"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
-@@ -523,16 +536,29 @@
+@@ -523,16 +537,29 @@
x86_64-*-elf*)
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
@@ -794,7 +791,7 @@
;;
i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
;;
-@@ -1160,6 +1186,7 @@
+@@ -1160,6 +1187,7 @@
i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
@@ -825,6 +822,67 @@
#include <link.h>
# define USE_PT_GNU_EH_FRAME
#endif
+--- /dev/null
++++ libgcc/enable-execute-stack-freebsd.c
+@@ -0,0 +1,58 @@
++/* Implement __enable_execute_stack using mprotect(2).
++ Copyright (C) 2011, 2012 Free Software Foundation, Inc.
++
++ This file is part of GCC.
++
++ GCC 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.
++
++ GCC 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
++ <http://www.gnu.org/licenses/>. */
++
++#include <sys/mman.h>
++#include <unistd.h>
++#include <stdlib.h>
++
++#define STACK_PROT_RWX (PROT_READ | PROT_WRITE | PROT_EXEC)
++
++extern void __enable_execute_stack (void *);
++
++void
++__enable_execute_stack (void *addr)
++{
++ static int size;
++ static long mask;
++ char *page, *ends;
++ long page_addr, ends_addr;
++
++ if (size == 0)
++ {
++ size = getpagesize ();
++ mask = ~((long) size - 1);
++ }
++ page_addr = (long) addr;
++ ends_addr = (long) (addr + __LIBGCC_TRAMPOLINE_SIZE__);
++
++ page = (char *) (page_addr & mask);
++ ends = (char *) ((ends_addr & mask) + size);
++
++ /*
++ * Note that no errors should be emitted by mprotect; it is considered
++ * dangerous for library calls to send messages to stdout/stderr.
++ */
++ if (mprotect (page, ends - page, STACK_PROT_RWX) < 0)
++ abort ();
++}
--- libgcc/unwind-dw2-fde-dip.c.orig
+++ libgcc/unwind-dw2-fde-dip.c
@@ -54,11 +54,19 @@
@@ -1011,52 +1069,25 @@
+#endif /* ifdef __x86_64__ */
--- /dev/null
+++ libgcc/config/i386/freebsd-unwind.h
-@@ -0,0 +1,184 @@
+@@ -0,0 +1,179 @@
+/* DWARF2 EH unwinding support for FreeBSD: AMD x86-64 and x86.
-+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
-+ Copyright (C) 2010 John Marino <draco@marino.st>
-+
-+This file is part of GCC.
-+
-+GCC 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, or (at your option)
-+any later version.
-+
-+In addition to the permissions in the GNU General Public License, the
-+Free Software Foundation gives you unlimited permission to link the
-+compiled version of this file with other programs, and to distribute
-+those programs without any restriction coming from the use of this
-+file. (The General Public License restrictions do apply in other
-+respects; for example, they cover modification of the file, and
-+distribution when not linked into another program.)
-+
-+GCC 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 GCC; see the file COPYING. If not, write to
-+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-+Boston, MA 02110-1301, USA. */
++ Copyright (C) 2010, 2012 John Marino <draco@marino.st>
+
+/* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
+#include <sys/types.h>
-+#include <sys/sysctl.h>
+#include <signal.h>
+#include <sys/ucontext.h>
+#include <machine/sigframe.h>
+
-+
+#define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg
+
+#ifdef __x86_64__
+#define MD_FALLBACK_FRAME_STATE_FOR x86_64_freebsd_fallback_frame_state
+
-+
++#if (__FreeBSD__ < 9)
++#include <sys/sysctl.h>
+static void
+x86_64_sigtramp_range (unsigned char **start, unsigned char **end)
+{
@@ -1072,6 +1103,7 @@
+ *start = (unsigned char *)ps_strings - 32;
+ *end = (unsigned char *)ps_strings;
+}
++#endif
+
+
+static _Unwind_Reason_Code
@@ -1083,9 +1115,30 @@
+ struct sigframe *sf;
+ long new_cfa;
+
++#if (__FreeBSD__ < 9)
+ x86_64_sigtramp_range(&sigtramp_start, &sigtramp_end);
+ if (pc >= sigtramp_end || pc < sigtramp_start)
+ return _URC_END_OF_STACK;
++#else
++ /* Prior to FreeBSD 9, the signal trampoline was located immediately
++ before the ps_strings. To support non-executable stacks on AMD64,
++ the sigtramp was moved to a shared page for FreeBSD 9. We are
++ stuck looking for frame patterns again (sys/amd64/amd64/sigtramp.S):
++
++ <pc + 00>: lea 0x10(%rsp),%rdi
++ <pc + 05>: pushq $0x0
++ <pc + 17>: mov $0x1a1,%rax
++ <pc + 14>: syscall
++
++ If we can't find this pattern, we're at the end of the stack.
++ */
++
++ if (!( *(unsigned int *)(context->ra) == 0x247c8d48
++ && *(unsigned int *)(context->ra + 4) == 0x48006a10
++ && *(unsigned int *)(context->ra + 8) == 0x01a1c0c7
++ && *(unsigned int *)(context->ra + 12) == 0x050f0000 ))
++ return _URC_END_OF_STACK;
++#endif
+
+ sf = (struct sigframe *) context->cfa;
+ new_cfa = sf->REG_NAME(rsp);
@@ -1136,7 +1189,7 @@
+
+#define MD_FALLBACK_FRAME_STATE_FOR x86_freebsd_fallback_frame_state
+
-+
++#include <sys/sysctl.h>
+static void
+x86_sigtramp_range (unsigned char **start, unsigned char **end)
+{
diff --git a/lang/gcc-aux/files/diff-cxx-testsuite b/lang/gcc-aux/files/diff-cxx-testsuite
index fb1ee2a247b..2cfcf6980a9 100644
--- a/lang/gcc-aux/files/diff-cxx-testsuite
+++ b/lang/gcc-aux/files/diff-cxx-testsuite
@@ -1717,6 +1717,116 @@
// { dg-options "-pthreads" { target *-*-solaris* } }
#include <tr1/memory>
+--- libstdc++-v3/testsuite/30_threads/async/49668.cc.orig
++++ libstdc++-v3/testsuite/30_threads/async/49668.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/async/launch.cc.orig
++++ libstdc++-v3/testsuite/30_threads/async/launch.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/call_once/49668.cc.orig
++++ libstdc++-v3/testsuite/30_threads/call_once/49668.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc.orig
++++ libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/future/members/share.cc.orig
++++ libstdc++-v3/testsuite/30_threads/future/members/share.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc.orig
++++ libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc.orig
++++ libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/this_thread/2.cc.orig
++++ libstdc++-v3/testsuite/30_threads/this_thread/2.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/this_thread/3.cc.orig
++++ libstdc++-v3/testsuite/30_threads/this_thread/3.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/this_thread/4.cc.orig
++++ libstdc++-v3/testsuite/30_threads/this_thread/4.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
+--- libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc.orig
++++ libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc
+@@ -1,5 +1,5 @@
+-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-do run { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
++// { dg-options " -std=gnu++0x -pthread" { target *-*-dragonfly* *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } }
+ // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+ // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+ // { dg-require-cstdint "" }
--- libstdc++-v3/testsuite/lib/libstdc++.exp.orig
+++ libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -864,17 +864,18 @@