From patchwork Sat Oct 31 19:12:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 538684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id C26AF14138D for ; Sun, 1 Nov 2015 06:12:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=i1PfdLOu; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B20E87634; Sat, 31 Oct 2015 19:12:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RhmMRHV0HG6h; Sat, 31 Oct 2015 19:12:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0D0C787645; Sat, 31 Oct 2015 19:12:22 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 88FDF1C0B41 for ; Sat, 31 Oct 2015 19:12:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8321588540 for ; Sat, 31 Oct 2015 19:12:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bwgwou-67amb for ; Sat, 31 Oct 2015 19:12:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by whitealder.osuosl.org (Postfix) with ESMTPS id C3D6C88530 for ; Sat, 31 Oct 2015 19:12:19 +0000 (UTC) Received: by padhy1 with SMTP id hy1so99578888pad.0 for ; Sat, 31 Oct 2015 12:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=PsJenqSAoBKZkaNYrY7XtMA4ES5D/IcDjevR3QC8fLI=; b=i1PfdLOuWwNRlWynKGKL9wRE5uApEO0PCIaj73wNOd95LPrXsOpNUQmVq4O3GMac5j Km271R7dWR855bKoy7m5oqrjChJ7Der57njrFVv8DuUnWzrxEbI17g8xOPGKW3d4psXv IISy0KTfn2+MLqk7ShJ2FdtvzJbllp0+m+voekZ9af0wpvKKVEMEpd3KPbbYjR++AnMk eeyoiy24QeiE3bkAdvo8j986mL1t3SG2ZC5MR8iHAREeUCD8Vc2+iO4eH+nw1GliCJ31 Ud7wZuZMigd8z2K8a+ETT3Iiw3L18gQzyd5tgdKYdttSH8eyzZvR4OrLDjacB3l/8UP6 EWZA== X-Received: by 10.66.191.169 with SMTP id gz9mr16429407pac.135.1446318739528; Sat, 31 Oct 2015 12:12:19 -0700 (PDT) Received: from haswell.localdomain ([2601:646:8601:4580:baca:3aff:fe80:aa8f]) by smtp.gmail.com with ESMTPSA id fl1sm11115116pab.10.2015.10.31.12.12.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Oct 2015 12:12:18 -0700 (PDT) From: Khem Raj To: uclibc@uclibc.org Subject: [PATCH 10/10] gcc5 optimizes away the write only static functions and we end up with Date: Sat, 31 Oct 2015 12:12:13 -0700 Message-Id: <1446318733-11592-1-git-send-email-raj.khem@gmail.com> X-Mailer: git-send-email 2.6.2 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume': rt-unwind-resume.c:(.text+0x3c): undefined reference to `libgcc_s_resume' collect2: error: ld returned 1 exit status make[2]: *** [lib/librt.so] Error 1 marking these functions explicitly used with __attribute_used__ avoids that optimization. Signed-off-by: Khem Raj --- libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 2 +- libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c index f4d6f41..0c2edd7 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c @@ -27,7 +27,7 @@ #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} 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/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c index f9a4ffb..f0c3047 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c @@ -25,7 +25,7 @@ #define __libc_dlclose dlclose #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} -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 *);