libc/glibc: add patch to fix build for PowerPC64.
For a PowerPC64 build, avoid erroneous inline optimization of initfini.s
Signed-off-by: "Frederic R. ROUSSEL" <fr.frasc@gmail.com>
Message-Id: <7585f649ad60b23c4a31.1360185227@x58>
Patchwork-Id: 218755
1 http://bugs.gentoo.org/196245
2 http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html
4 Attached is a patch to add __attribute__ ((noinline)) to
7 Without this patch, the sec script that processed initfini.s removes a
8 part of inlined call_gmon_start, causing undefined label errors.
10 This patch solves the problem by forcing gcc not to inline
11 call_gmon_start with __attribute__ ((noinline)).
13 Tested by building for arm-none-lixux-gnueabi. OK to apply?
17 2006-05-07 Kazu Hirata <kazu@codesourcery.com>
19 * sysdeps/generic/initfini.c (call_gmon_start): Add
20 __attribute__ ((noinline)).
22 Index: sysdeps/generic/initfini.c
23 ===================================================================
25 diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c
26 --- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200
27 +++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100
29 /* The beginning of _init: */
30 asm ("\n/*@_init_PROLOG_BEGINS*/");
33 +static void __attribute__ ((noinline))
36 extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/