From patchwork Tue May 20 21:28:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 350890 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EBF5D140086 for ; Wed, 21 May 2014 07:28:27 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=GrnJzO0bTu16gKYEtICD/BJ3B/VZ8 nQCn4FIupCtZLL0ZWytdvRcrSjG8mVBD3l/OpxZdiPfO7pW8P/gf97RwhCfqNYRB XO5GowLw7NsaftbGWv4Cfy84yzG17/lebcSLiBRzaneBfwCYmfgre5GDaE+eOfHL vtKuCnHfJlry20= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=eBcRb1KJec9pN/UbyuM7aPGQdhw=; b=F3C SHEip0f/hygcflalc23WZJv0D1h+vE49ikSDOXLRI1ZassgqDs8v+jHT0g/mBwcv G6uDnTiTmMKV5DATmhncanF/PqSAW03g/e75Evg3SPjUvp4DthNjkRLte5QuDMGB fF/ZHEGzab9MVaOgNgnENgM4TlYWvEoW0J4+nvAs= Received: (qmail 22534 invoked by alias); 20 May 2014 21:28:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22398 invoked by uid 89); 20 May 2014 21:28:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_20 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Tue, 20 May 2014 21:28:01 +0000 From: "Joseph S. Myers" To: Subject: Fix ARM build with GCC trunk Message-ID: MIME-Version: 1.0 sysdeps/unix/sysv/linux/arm/unwind-resume.c and sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static variables that are written in C code but only read from toplevel asms. Current GCC trunk now optimizes away such apparently write-only static variables, so causing a build failure. This patch marks those variables with __attribute_used__ to avoid that optimization. Tested that this fixes the build for ARM and committed. 2014-05-20 Joseph Myers * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c (libgcc_s_resume): Use __attribute_used__. * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): Likewise. diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c index 6ccd9b4..660d148 100644 --- a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +++ b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c @@ -22,7 +22,8 @@ #include static void *libgcc_s_handle; -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) + __attribute_used__; static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 --- a/sysdeps/unix/sysv/linux/arm/unwind-resume.c +++ b/sysdeps/unix/sysv/linux/arm/unwind-resume.c @@ -20,7 +20,8 @@ #include #include -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); +static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) + __attribute_used__; static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);