Bug 29313 - [FIX] pkg-config fails to build C99
Summary: [FIX] pkg-config fails to build C99
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 20:39 UTC by Jeremy Huddleston Sequoia
Modified: 2011-04-13 11:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
pkg-config-c99.patch (1.33 KB, application/octet-stream)
2010-07-29 20:39 UTC, Jeremy Huddleston Sequoia
Details

Description Jeremy Huddleston Sequoia 2010-07-29 20:39:16 UTC
Created attachment 37449 [details]
pkg-config-c99.patch

glib-1.2.10 included with pkg-config has incorrect inline handling for C99.  

According to C99 inline semantics, the inline function is only an alternative that the compiler is allowed to use, but it may call an external definition (which, by implication, must exist) if it chooses. "It is unspecified whether a call to the function uses the inline definition or the external definition". The relevant section in the C99 standard is 6.7.4p6.

You can see this failure by using CFLAGS="-std=gnu99".  The clang compiler defaults to gnu99 which means this issue will become more prevalent as it gains adoption.  A fix is attached.
Comment 1 Jeremy Huddleston Sequoia 2010-07-29 23:34:20 UTC
Actually, a better fix would be to:

#ifdef __GNUC_GNU_INLINE__
Comment 2 Tollef Fog Heen 2011-04-13 11:27:07 UTC
We've dropped the embedded glib tarball now, so closing this bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.