diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-09 17:59:34 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-09 17:59:34 +0000 |
commit | 98636eb08c5ecc216e18970e11f7021206ac9b04 (patch) | |
tree | dfc70b7c6bf6276776c4e8198457dcf2df1e09fb /include/platform.h | |
parent | 50dbed95fb7c0a97135b771385160ca26c377a15 (diff) | |
download | busybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.tar.gz busybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.tar.bz2 busybox-w32-98636eb08c5ecc216e18970e11f7021206ac9b04.zip |
Use intra-DSO calls when we build libbusybox. No-op for normal build.
This was Bernhard Fischer' idea.
text data bss dec hex filename
773549 7781 9740 791070 c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
769683 7397 9740 786820 c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/include/platform.h b/include/platform.h index 57cff2c33..0e0ccaf90 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | /* __restrict is known in EGCS 1.2 and above. */ | 19 | /* __restrict is known in EGCS 1.2 and above. */ |
20 | #if !__GNUC_PREREQ (2,92) | 20 | #if !__GNUC_PREREQ(2,92) |
21 | # ifndef __restrict | 21 | # ifndef __restrict |
22 | # define __restrict /* Ignore */ | 22 | # define __restrict /* Ignore */ |
23 | # endif | 23 | # endif |
@@ -27,7 +27,7 @@ | |||
27 | macros freely, and know that they will come into play for the | 27 | macros freely, and know that they will come into play for the |
28 | version of gcc in which they are supported. */ | 28 | version of gcc in which they are supported. */ |
29 | 29 | ||
30 | #if !__GNUC_PREREQ (2,7) | 30 | #if !__GNUC_PREREQ(2,7) |
31 | # ifndef __attribute__ | 31 | # ifndef __attribute__ |
32 | # define __attribute__(x) | 32 | # define __attribute__(x) |
33 | # endif | 33 | # endif |
@@ -37,7 +37,7 @@ | |||
37 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L | 37 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L |
38 | /* it's a keyword */ | 38 | /* it's a keyword */ |
39 | #else | 39 | #else |
40 | # if __GNUC_PREREQ (2,7) | 40 | # if __GNUC_PREREQ(2,7) |
41 | # define inline __inline__ | 41 | # define inline __inline__ |
42 | # else | 42 | # else |
43 | # define inline | 43 | # define inline |
@@ -48,49 +48,49 @@ | |||
48 | # define __const const | 48 | # define __const const |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | # define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) | 51 | #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) |
52 | # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | 52 | #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) |
53 | # define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | 53 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) |
54 | # define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) | 54 | #define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) |
55 | /* __NO_INLINE__: some gcc's do not honor inlining! :( */ | 55 | /* __NO_INLINE__: some gcc's do not honor inlining! :( */ |
56 | # if __GNUC_PREREQ (3,0) && !defined(__NO_INLINE__) | 56 | #if __GNUC_PREREQ(3,0) && !defined(__NO_INLINE__) |
57 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline | 57 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline |
58 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ | 58 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ |
59 | # define NOINLINE __attribute__((__noinline__)) | 59 | # define NOINLINE __attribute__((__noinline__)) |
60 | # if !ENABLE_WERROR | 60 | # if !ENABLE_WERROR |
61 | # define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) | 61 | # define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) |
62 | # define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) | 62 | # define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result)) |
63 | # else | ||
64 | # define ATTRIBUTE_DEPRECATED /* n/a */ | ||
65 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ | ||
66 | # endif | ||
67 | # else | 63 | # else |
68 | # define ALWAYS_INLINE inline /* n/a */ | ||
69 | # define NOINLINE /* n/a */ | ||
70 | # define ATTRIBUTE_DEPRECATED /* n/a */ | 64 | # define ATTRIBUTE_DEPRECATED /* n/a */ |
71 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ | 65 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ |
72 | # endif | 66 | # endif |
67 | #else | ||
68 | # define ALWAYS_INLINE inline /* n/a */ | ||
69 | # define NOINLINE /* n/a */ | ||
70 | # define ATTRIBUTE_DEPRECATED /* n/a */ | ||
71 | # define ATTRIBUTE_UNUSED_RESULT /* n/a */ | ||
72 | #endif | ||
73 | 73 | ||
74 | /* -fwhole-program makes all symbols local. The attribute externally_visible | 74 | /* -fwhole-program makes all symbols local. The attribute externally_visible |
75 | forces a symbol global. */ | 75 | forces a symbol global. */ |
76 | # if __GNUC_PREREQ (4,1) | 76 | #if __GNUC_PREREQ(4,1) |
77 | # define EXTERNALLY_VISIBLE __attribute__(( visibility("default") )) | 77 | # define EXTERNALLY_VISIBLE __attribute__(( visibility("default") )) |
78 | //__attribute__ ((__externally_visible__)) | 78 | //__attribute__ ((__externally_visible__)) |
79 | # else | 79 | #else |
80 | # define EXTERNALLY_VISIBLE | 80 | # define EXTERNALLY_VISIBLE |
81 | # endif /* GNUC >= 4.1 */ | 81 | #endif /* GNUC >= 4.1 */ |
82 | 82 | ||
83 | /* We use __extension__ in some places to suppress -pedantic warnings | 83 | /* We use __extension__ in some places to suppress -pedantic warnings |
84 | about GCC extensions. This feature didn't work properly before | 84 | about GCC extensions. This feature didn't work properly before |
85 | gcc 2.8. */ | 85 | gcc 2.8. */ |
86 | #if !__GNUC_PREREQ (2,8) | 86 | #if !__GNUC_PREREQ(2,8) |
87 | # ifndef __extension__ | 87 | # ifndef __extension__ |
88 | # define __extension__ | 88 | # define __extension__ |
89 | # endif | 89 | # endif |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | /* gcc-2.95 had no va_copy but only __va_copy. */ | 92 | /* gcc-2.95 had no va_copy but only __va_copy. */ |
93 | #if !__GNUC_PREREQ (3,0) | 93 | #if !__GNUC_PREREQ(3,0) |
94 | # include <stdarg.h> | 94 | # include <stdarg.h> |
95 | # if !defined va_copy && defined __va_copy | 95 | # if !defined va_copy && defined __va_copy |
96 | # define va_copy(d,s) __va_copy((d),(s)) | 96 | # define va_copy(d,s) __va_copy((d),(s)) |