Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 158341 Details for
Bug 229269
dev-libs/elfutils-0.127 with gcc-4.3.1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to make the inline functions in elfutils-0.127 conform to ISO C99.
elfutils-0.127-c99_inline_functions-1.patch (text/plain), 3.87 KB, created by
Nico R.
on 2008-06-25 00:19:37 UTC
(
hide
)
Description:
Patch to make the inline functions in elfutils-0.127 conform to ISO C99.
Filename:
MIME Type:
Creator:
Nico R.
Created:
2008-06-25 00:19:37 UTC
Size:
3.87 KB
patch
obsolete
>This patch makes elfutils-0.127 use inline functions properly as per ISO C99 if >__OPTIMIZE__ is set. If it is not set, ordinary functions are used instead. >gcc sets __OPTIMIZE__ on optimized compiles. >Obviously, a compiler implementing ISO C99 inline functions is required for the >patched source to compile properly. gcc-4.3.1 works fine. > >diff -ur elfutils-0.127.orig/libdw/dwarf_whatattr.c elfutils-0.127/libdw/dwarf_whatattr.c >--- elfutils-0.127.orig/libdw/dwarf_whatattr.c 2006-04-11 20:52:05.000000000 +0000 >+++ elfutils-0.127/libdw/dwarf_whatattr.c 2008-06-24 23:45:01.000000000 +0000 >@@ -56,9 +56,13 @@ > #include "libdwP.h" > > >+#ifdef __OPTIMIZE__ >+extern inline unsigned int dwarf_whatattr (Dwarf_Attribute *attr); >+#else /* Optimize. */ > unsigned int > dwarf_whatattr (attr) > Dwarf_Attribute *attr; > { > return attr == NULL ? 0 : attr->code; > } >+#endif /* Optimize. */ >diff -ur elfutils-0.127.orig/libdw/dwarf_whatform.c elfutils-0.127/libdw/dwarf_whatform.c >--- elfutils-0.127.orig/libdw/dwarf_whatform.c 2006-04-11 20:52:05.000000000 +0000 >+++ elfutils-0.127/libdw/dwarf_whatform.c 2008-06-24 23:45:01.000000000 +0000 >@@ -56,9 +56,13 @@ > #include "libdwP.h" > > >+#ifdef __OPTIMIZE__ >+extern inline unsigned int dwarf_whatform (Dwarf_Attribute *attr); >+#else /* Optimize. */ > unsigned int > dwarf_whatform (attr) > Dwarf_Attribute *attr; > { > return attr == NULL ? 0 : attr->form; > } >+#endif /* Optimize. */ >diff -ur elfutils-0.127.orig/libdw/libdw.h elfutils-0.127/libdw/libdw.h >--- elfutils-0.127.orig/libdw/libdw.h 2007-04-05 10:33:43.000000000 +0000 >+++ elfutils-0.127/libdw/libdw.h 2008-06-24 23:45:01.000000000 +0000 >@@ -282,11 +282,13 @@ > /* Check whether given attribute has specific form. */ > extern int dwarf_hasform (Dwarf_Attribute *attr, unsigned int search_form); > >+#ifndef __OPTIMIZE__ > /* Return attribute code of given attribute. */ > extern unsigned int dwarf_whatattr (Dwarf_Attribute *attr); > > /* Return form code of given attribute. */ > extern unsigned int dwarf_whatform (Dwarf_Attribute *attr); >+#endif /* !Optimize. */ > > > /* Return string associated with given attribute. */ >@@ -624,14 +626,14 @@ > /* Inline optimizations. */ > #ifdef __OPTIMIZE__ > /* Return attribute code of given attribute. */ >-extern inline unsigned int >+inline unsigned int > dwarf_whatattr (Dwarf_Attribute *attr) > { > return attr == NULL ? 0 : attr->code; > } > >-/* Return attribute code of given attribute. */ >-extern inline unsigned int >+/* Return form code of given attribute. */ >+inline unsigned int > dwarf_whatform (Dwarf_Attribute *attr) > { > return attr == NULL ? 0 : attr->form; >diff -ur elfutils-0.127.orig/src/ld.h elfutils-0.127/src/ld.h >--- elfutils-0.127.orig/src/ld.h 2006-07-11 23:20:42.000000000 +0000 >+++ elfutils-0.127/src/ld.h 2008-06-24 23:45:01.000000000 +0000 >@@ -1086,8 +1086,10 @@ > /* Helper functions for the architecture specific code. */ > > /* Checked whether the symbol is undefined and referenced from a DSO. */ >+#ifndef __OPTIMIZE__ > extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); >-extern inline bool >+#else /* !Optimize. */ >+inline bool > linked_from_dso_p (struct scninfo *scninfo, size_t symidx) > { > struct usedfiles *file = scninfo->fileinfo; >@@ -1101,5 +1103,6 @@ > > return sym->defined && sym->in_dso; > } >+#endif /* !Optimize. */ > > #endif /* ld.h */ >diff -ur elfutils-0.127.orig/src/ldgeneric.c elfutils-0.127/src/ldgeneric.c >--- elfutils-0.127.orig/src/ldgeneric.c 2006-07-11 23:20:42.000000000 +0000 >+++ elfutils-0.127/src/ldgeneric.c 2008-06-24 23:45:01.000000000 +0000 >@@ -159,6 +159,9 @@ > } > > >+#ifdef __OPTIMIZE__ >+extern inline bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); >+#else /* Optimize. */ > bool > linked_from_dso_p (struct scninfo *scninfo, size_t symidx) > { >@@ -173,6 +176,7 @@ > > return sym->defined && sym->in_dso; > } >+#endif /* Optimize. */ > > > /* Initialize state object. This callback function is called after the
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229269
: 158341