From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11124 invoked by alias); 8 Aug 2002 07:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 11105 invoked by uid 71); 8 Aug 2002 07:06:01 -0000 Resent-Date: 8 Aug 2002 07:06:01 -0000 Resent-Message-ID: <20020808070601.11104.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, grigory@stl.sarov.ru Received: (qmail 22620 invoked by uid 61); 8 Aug 2002 06:56:21 -0000 Message-Id: <20020808065621.22619.qmail@sources.redhat.com> Date: Thu, 08 Aug 2002 00:46:00 -0000 From: grigory@stl.sarov.ru Reply-To: grigory@stl.sarov.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/7535: GCC configuration problem: failed to correctly detect hidden attribute support X-SW-Source: 2002-08/txt/msg00154.txt.bz2 List-Id: >Number: 7535 >Category: other >Synopsis: GCC configuration problem: failed to correctly detect hidden attribute support >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Aug 08 00:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Grigory Zagorodnev >Release: 3.1.1 >Organization: >Environment: host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu Configured with: ./configure --prefix=/usr/local --program-suffix=-3.1.1 --enable-threads Thread model: posix gcc version 3.1.1 >Description: The issuue ---------- G++ 3.1.1 compiler configuration script failed to detect assembler's hidden attribute support. However, the 'as' installed on my box actually does support this feature. So, we should consider this bahaviour as erroneous. Config command line is: ./configure --prefix=/usr/local --program-suffix=-3.1.1 --enable-threads Config output: ... checking assembler hidden support... no ... Environment ----------- The environment is: ia-32 Red Hat Linux 7.1 GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 2.10.91.0.2 Further investigation showed that configure script fails either on ia-32 Red Hat 7.2 and 7.3. Where higher versions of binutils are used. GNU assembler version 2.11.93.0.2 (i386-redhat-linux) using BFD version 2.11.93.0.2 20020207 The impact ---------- According to the C++ ABI, __cxa_atexit/__cxa_finalize should be used to perform file-scope C++ objects destruction. Both these routines uses special identifier __dso_handle which should has unique value for each loadable module within the process. That requires __dso_handle be local for each particular SO or executable. Attribute hidden should be used to make it local. However, wrongly detected hidden attribute feature support, makes impossible to use C++ ABI conformant object destruction mechanism, since __dso_handle becomes visible outside the loadable module. See declaration of __dso_handle in file "gcc/crtstuff.c": #ifdef HAVE_GAS_HIDDEN asm (".hidden\t__dso_handle"); #endif #ifdef CRTSTUFFS_O void *__dso_handle = &__dso_handle; ... Note that C++ ABI conformant destruction mechanism is not enabled in the compiler by default yet. Special option -fuse-cxa-atexit turns this on. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: