aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/platform.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/platform.h b/include/platform.h
index c987d418c..6c7d03dc7 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -108,13 +108,18 @@
* and/or smaller by using modified ABI. It is usually only needed
* on non-static, busybox internal functions. Recent versions of gcc
* optimize statics automatically. FAST_FUNC on static is required
- * only if you need to match a function pointer's type */
-#if __GNUC_PREREQ(3,0) && defined(i386) /* || defined(__x86_64__)? */
+ * only if you need to match a function pointer's type.
+ * FAST_FUNC may not work well with -flto so allow user to disable this.
+ * (-DFAST_FUNC= )
+ */
+#ifndef FAST_FUNC
+# if __GNUC_PREREQ(3,0) && defined(i386)
/* stdcall makes callee to pop arguments from stack, not caller */
-# define FAST_FUNC __attribute__((regparm(3),stdcall))
+# define FAST_FUNC __attribute__((regparm(3),stdcall))
/* #elif ... - add your favorite arch today! */
-#else
-# define FAST_FUNC
+# else
+# define FAST_FUNC
+# endif
#endif
/* Make all declarations hidden (-fvisibility flag only affects definitions) */