From patchwork Wed Dec 31 16:44:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 424806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5593E1400EA for ; Thu, 1 Jan 2015 03:44:38 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=Th3gLyGEN+JV3rW3iAefpbCiENKVp+Vr+QgJn9tEaU2 mUgyZ+4YU+Z20LjQpxOrP+WdggQRO7cQ2F8V30rHgitUiTRF+o3jJyJBKwfHyD9B +KHAIQ6YEj6NEZYbrNqTOqRYClZNCS0G0Cx1COQoTCImrUAMbkj3U7KP/oXn5UDY = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=q/3CwpwnKBY2TeyYptgtRr2bdsA=; b=i6EJrlzHUwtlarr5i Td78d5aQD536gQbdNRHGSr0Itqj/OauSui0TNJT0qlhvpfmwe809KZTWN35SKInH DUcGziOgvh/QFMvmsc/HZ1p6k4B7v62Za9oJv6ktcBEDtH4xol4U232RzvWZUlsL CtVslNGgsmuY9kqHZwmb9WM78I= Received: (qmail 12736 invoked by alias); 31 Dec 2014 16:44:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 12721 invoked by uid 89); 31 Dec 2014 16:44:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f52.google.com Received: from mail-wg0-f52.google.com (HELO mail-wg0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 31 Dec 2014 16:44:26 +0000 Received: by mail-wg0-f52.google.com with SMTP id x12so22189837wgg.11 for ; Wed, 31 Dec 2014 08:44:23 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.62.235 with SMTP id b11mr53838494wjs.73.1420044263560; Wed, 31 Dec 2014 08:44:23 -0800 (PST) Received: by 10.194.167.3 with HTTP; Wed, 31 Dec 2014 08:44:23 -0800 (PST) Date: Wed, 31 Dec 2014 11:44:23 -0500 Message-ID: Subject: [PATCH] Dejagnu fixes for TLS on AIX From: David Edelsohn To: GCC Patches Cc: Mike Stump On AIX, GCC needs to build a multilib for AIX. When testing in tree, the Dejagnu infrastructure adds linking options for the default, non-pthread multilib. This causes failures for the G++ TLS tests. The following patch uses the existing add_options_for_tls infrastructure to adjust the flags to prepend the pthread multilib before the other options. The patch also XFAILs three assembler tests on AIX. This fixes all of the TLS tests on AIX. Is the Dejagnu library change okay? Bootstrapped on powerpc-ibm-aix7.1.2.0 Thanks, David * lib/target-support.exp (add_options_for_tls): Prepend pthread link flags. * g++.dg/tls/thread_local1.C: XFAIL on AIX. * g++.dg/tls/thread_local7.C: Same. * g++.dg/tls/thread_local7g.C: Same. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 219126) +++ lib/target-supports.exp (working copy) @@ -596,7 +596,7 @@ int f (void) { return i; } void g (int j) { i = j; } }] } { - return "$flags -pthread" + return "-pthread [g++_link_flags [get_multilibs "-pthread"] ] $flags " } return $flags } Index: g++.dg/tls/thread_local1.C =================================================================== --- g++.dg/tls/thread_local1.C (revision 219126) +++ g++.dg/tls/thread_local1.C (working copy) @@ -7,7 +7,7 @@ // simultaneous execution. // { dg-final { scan-assembler-not "cxa_guard" } } // The guard should be TLS, not local common. -// { dg-final { scan-assembler-not "\.comm" } } +// { dg-final { scan-assembler-not "\.comm" { xfail powerpc-*-aix* } } } struct A { Index: g++.dg/tls/thread_local7.C =================================================================== --- g++.dg/tls/thread_local7.C (revision 219126) +++ g++.dg/tls/thread_local7.C (working copy) @@ -2,7 +2,7 @@ // { dg-require-effective-target tls } // The reference temp should be TLS, not normal data. -// { dg-final { scan-assembler-not "\\.data" { target tls_native } } } +// { dg-final { scan-assembler-not "\\.data" { target tls_native xfail powerpc-*-aix* } } } void f() { Index: g++.dg/tls/thread_local7g.C =================================================================== --- g++.dg/tls/thread_local7g.C (revision 219126) +++ g++.dg/tls/thread_local7g.C (working copy) @@ -2,7 +2,7 @@ // { dg-require-effective-target tls } // The reference temp should be TLS, not normal data. -// { dg-final { scan-assembler-not "\\.data" { target tls_native } } } +// { dg-final { scan-assembler-not "\\.data" { target tls_native xfail powerpc-*-aix* } } } thread_local int&& ir = 42;