From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27397 invoked by alias); 7 Nov 2012 22:15:53 -0000 Received: (qmail 27286 invoked by uid 48); 7 Nov 2012 22:15:26 -0000 From: "dje at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54791] AIX-only: Constructors are not called in main program. Date: Wed, 07 Nov 2012 22:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: dje at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Depends on Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00662.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54791 David Edelsohn changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33704 --- Comment #19 from David Edelsohn 2012-11-07 22:15:23 UTC --- > Can you tell me a more elegant solution to this ?(if there is). If not at least how can I do this more automatically? Now I do some steps manually(like going to /tmp and modify that file and recompile it and relink). For the shared library dependency order see PR 33704. The PR includes a patch, but we never reached a final resolution and copyright assignment to include the patch. > I wonder how this has worked with xlC. There we used the -p flag when linking the shared libraries with makeCCSharedLibs, and I think (not 100% sure )the library got first initialized. xlC now uses a program instead of a script. It generates some code to explicitly run constructors in the right order and does not rely on AIX semantics.