summaryrefslogtreecommitdiff
path: root/include/features.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-13 01:53:28 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-13 01:53:28 +0000
commit0f55c533b6a420ceba46cfe8178880d50b639535 (patch)
treef7db1d44c1048657ffac61cdba0c08ec835e63e6 /include/features.h
parentabb77f08cc8f6b0d1c9961704e74a2e52d8d838b (diff)
*: document __USE_EXTERN_INLINES better;
fix uclibc build if it is forcibly enabled
Diffstat (limited to 'include/features.h')
-rw-r--r--include/features.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/features.h b/include/features.h
index defdd04c6..1d92a8213 100644
--- a/include/features.h
+++ b/include/features.h
@@ -365,9 +365,17 @@
#endif /* !ASSEMBLER */
-/* Decide whether we can define 'extern inline' functions in headers. */
-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
- && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
+/* Decide whether we can, and are willing to define extern inline
+ * functions in headers, even if this results in a slightly bigger
+ * code for user programs built against uclibc.
+ * Enabled only in -O2 compiles, not -Os.
+ * uclibc itself is usually built without __USE_EXTERN_INLINES,
+ * remove "&& !defined __OPTIMIZE_SIZE__" part to do otherwise.
+ */
+#if __GNUC_PREREQ (2, 7) \
+ && defined __OPTIMIZE__ \
+ && !defined __OPTIMIZE_SIZE__ \
+ && !defined __NO_INLINE__ \
&& (defined __extern_inline || defined __GNUC_GNU_INLINE__)
# define __USE_EXTERN_INLINES 1
#endif