From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20586 invoked by alias); 2 Oct 2014 07:47:53 -0000 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org Received: (qmail 20389 invoked by uid 89); 2 Oct 2014 07:47:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Oct 2014 07:47:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 09F49A89567 for ; Thu, 2 Oct 2014 08:47:42 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s3CCsaDQkzcn; Thu, 2 Oct 2014 08:47:40 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@sourceware.org Subject: Patch_or_Contribution granted: [Bug 1002013] [PATCH] gcc 4.7 breaks the synth Date: Thu, 02 Oct 2014 07:47:00 -0000 X-Bugzilla-Type: request Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg00000.txt.bz2 Ross Younger has granted Patch_or_Contribution: Bug 1002013: [PATCH] gcc 4.7 breaks the synth http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002013 ------- Additional Comments from Ross Younger (Have discussed with jifl.) Perhaps foolhardily, I upgraded my desktop from Ubuntu 12.04 to 14.04. Long story short: * Ubuntu 14.04 ships with gcc 4.8 out of the box. * On an image for the synthetic target compiled with 4.8, __CTOR_LIST__ =3D= =3D __CTOR_END__. * In other words, none of our static constructors run, leaving a badly brok= en universe. (Simple example: The kernel test thread1 (amongst others) crashes with a segfault when it attempts to resume a thread.) * Compiling the same test code with gcc 4.6 on the same system works just f= ine. On further investigation, the relevant change was made in gcc 4.7, which wa= s to rename the .ctors section of the ELF image to .init_array (and to present i= ts members in the opposite order). Patch attached; tested with both gcc 4.6 and 4.8. This looks for both .ctors and .init_array sections and iterates through them both; it's very similar = to the code in the ARM HAL which incurred this issue on the change to EABI. Bu= t I think that autodetecting on the synth is a better answer than a CDL option = to switch between the two (cf. EABI); it is not exactly a resource-constrained target so the extra code size is harmless. I suspect the i386 HAL will require a similar patch, but I do not have acce= ss to a suitable test rig at the present time.