Summary: | <dev-util/pkgconfig-0.26: build fails with C99 standard | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Jeffery <andrew> |
Component: | New packages | Assignee: | Freedesktop bugs <freedesktop-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | pipping |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://bugs.freedesktop.org/show_bug.cgi?id=29313 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 297436 | ||
Attachments: |
Explicitly set -std=gnu89 for compilers with alternate defaults
Explicitly set -std=gnu89 for compilers with alternate defaults Patches the bundled version of glib to compile with C99 inline semantics Patches bundled glib in src_unpack() with previously attached patch Patches the bundled version of glib to compile with C99 inline semantics v2 |
Description
Andrew Jeffery
2009-12-17 01:21:17 UTC
Created attachment 213254 [details, diff]
Explicitly set -std=gnu89 for compilers with alternate defaults
Created attachment 213257 [details, diff]
Explicitly set -std=gnu89 for compilers with alternate defaults
Fixed patch so it actually applies
IMO, this should be fixed in pkgconfig directly, not in the ebuild. Thanks (In reply to comment #3) > IMO, this should be fixed in pkgconfig directly, not in the ebuild. > > Thanks > Yeah, Vapier said similar in #297243 (e2fsprogs suffers the same issue). Changed the bug title to describe the problem (not the proposed solution). I'll look into getting pkgconfig itself fixed. Created attachment 213743 [details, diff]
Patches the bundled version of glib to compile with C99 inline semantics
Attached patch fixes the problem in pkg-config itself. After a little bit of digging it turned out that it was the bundled version of glib that was at fault. Patch tightens up when GNU style inlines are used.
Ebuild patch following
Created attachment 213745 [details]
Patches bundled glib in src_unpack() with previously attached patch
Patch for pkgconfig-0.23.ebuild to apply previously attached patch in src_unpack()
I tried looking at the current glib to see how they managed this inline business and they've shuffled the code around and the 2 really can't be easily compared anymore. In any case, if you swear on your first born's life that this change is innocuous for gcc, then ACK from me. Cheers Created attachment 213902 [details, diff]
Patches the bundled version of glib to compile with C99 inline semantics v2
New patch attached. I tested the previous version of the patch only with the 4.3 and 4.4 series of GCC (along with Clang), but didnt take into account when the __GNUC_GNU_INLINE__ macro was added to GCC. Turns out this was in v4.1.3, which makes the previous patch invalid when compiling with earlier versions of GCC. This patch defines __GNUC_GNU_INLINE__ when __GNUC__ is defined but neither __GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__ are by the compiler. This matches the behaviour of GCC versions < 4.1.3. Patch tested and working at all optimisation levels on an AMD64 system using:
* gcc-3.4.6 <- important one in this case.
* gcc-4.3.2
* gcc-4.3.4
* gcc-4.4.2
* clang-1.0
* clang-svn
Essentially I threw it at all the GCCs I currently have installed. I'll test it with further versions of GCC if you like.
The patch should go into: http://bugs.freedesktop.org/show_bug.cgi?id=29313 For possible upstream inclusion. Otherwise this is already solved by the glib-2 branch at upstream pkg-config git, which should become the new master. https://bugs.freedesktop.org/show_bug.cgi?id=29313#c2 Closing the bug as resolved by 0.26 since it's using system glib-2 instead of bundled glib-1. |