From patchwork Mon Oct 10 10:33:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 118688 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]) by ozlabs.org (Postfix) with SMTP id C237AB6FAF for ; Mon, 10 Oct 2011 21:34:38 +1100 (EST) Received: (qmail 26871 invoked by alias); 10 Oct 2011 10:34:36 -0000 Received: (qmail 26673 invoked by uid 22791); 10 Oct 2011 10:34:35 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 10:34:11 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by smtp.strato.de (jimi mo31) (RZmta 26.10 AUTH) with ESMTPA id e05a53n9A9WJko ; Mon, 10 Oct 2011 12:33:57 +0200 (MEST) Message-ID: <4E92CA15.5070503@gjlay.de> Date: Mon, 10 Oct 2011 12:33:57 +0200 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Denis Chertykov , Mike Stump Subject: [Patch, testsuite, AVR]: target-supports.exp: AVR does not support TLS X-IsSubscribed: yes 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 The auto-detect machinery fails to correctly detect that TLS is not supported on AVR. This leads to gross noise of several hundreds of FAILs in testsuite. This patch explicitly tells that AVR doesn't support TLS. Lightly tested with testsuite run on avr-unknown-none where tests like gcc.dg/debug/tls-1.c ran into ICE are UNSUPPORTED now. Okay for trunk? testsuite/ * lib/target-supports.exp (check_effective_target_tls): AVR has no support for TLS. (check_effective_target_tls_native): Ditto. (check_effective_target_tls_emulated): Ditto. (check_effective_target_tls_runtime): Ditto. Index: testsuite/lib/target-supports.exp =================================================================== --- testsuite/lib/target-supports.exp (revision 179738) +++ testsuite/lib/target-supports.exp (working copy) @@ -607,6 +607,11 @@ proc add_options_for_tls { flags } { # Return 1 if thread local storage (TLS) is supported, 0 otherwise. proc check_effective_target_tls {} { + # AVR has no support for TLS. Auto-detect fails here. + if { [istarget avr-*-*] } { + return 0 + } + return [check_no_compiler_messages tls assembly { __thread int i; int f (void) { return i; } @@ -623,6 +628,11 @@ proc check_effective_target_tls_native { return 0 } + # AVR has no support for TLS. Auto-detect fails here. + if { [istarget avr-*-*] } { + return 0 + } + return [check_no_messages_and_pattern tls_native "!emutls" assembly { __thread int i; int f (void) { return i; } @@ -639,6 +649,11 @@ proc check_effective_target_tls_emulated return 1 } + # AVR has no support for TLS. Auto-detect fails here. + if { [istarget avr-*-*] } { + return 0 + } + return [check_no_messages_and_pattern tls_emulated "emutls" assembly { __thread int i; int f (void) { return i; } @@ -649,6 +664,11 @@ proc check_effective_target_tls_emulated # Return 1 if TLS executables can run correctly, 0 otherwise. proc check_effective_target_tls_runtime {} { + # AVR has no support for TLS. Auto-detect fails here. + if { [istarget avr-*-*] } { + return 0 + } + return [check_runtime tls_runtime { __thread int thr = 0; int main (void) { return thr; }