From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16381 invoked by alias); 22 Sep 2011 17:34:53 -0000 Received: (qmail 16122 invoked by uid 22791); 22 Sep 2011 17:34:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Sep 2011 17:34:35 +0000 Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p8MHYYY0009225 for ; Thu, 22 Sep 2011 10:34:34 -0700 Received: from iaby26 (iaby26.prod.google.com [10.12.101.26]) by hpaq1.eem.corp.google.com with ESMTP id p8MHXmna028767 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 22 Sep 2011 10:34:32 -0700 Received: by iaby26 with SMTP id y26so5166945iab.17 for ; Thu, 22 Sep 2011 10:34:32 -0700 (PDT) Received: by 10.43.53.66 with SMTP id vp2mr2681329icb.92.1316712872532; Thu, 22 Sep 2011 10:34:32 -0700 (PDT) Received: by 10.43.53.66 with SMTP id vp2mr2681323icb.92.1316712872388; Thu, 22 Sep 2011 10:34:32 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id j2sm11974347ibx.11.2011.09.22.10.34.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Sep 2011 10:34:31 -0700 (PDT) From: Ian Lance Taylor To: Terry Guo Cc: gcc@gcc.gnu.org Subject: Re: I cannot disable GCC TLS support thoroughly. References: Date: Thu, 22 Sep 2011 17:34:00 -0000 In-Reply-To: (Terry Guo's message of "Thu, 22 Sep 2011 18:05:34 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00231.txt.bz2 Terry Guo writes: > I configured my gcc with "--disable-tls" for arm-none-eabi. But it can > still successfully compile the below case: > > __thread int i; > int f (void) { return i; } > void main (int j) { i = j; } > > The "dg-require-effective-target tls" use this case to check whether > target supports tls. So how to configure GCC to let it fail to compile > this case, and then let the dg test framework thinks the tls is > unsupported? Thanks in advance. When the assembler and/or linker do not support TLS, gcc will emulate it using pthread_key_create. So as far as I know there is no way to thoroughly disable it. Ian