diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-02-14 22:15:16 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-02-15 12:51:35 +0100 |
commit | a5d9597e9703052895c8c2401132e77aa68a6123 (patch) | |
tree | 339369f681d0081c582b30afe1aefbd4eb74ea31 /include | |
parent | 5f078cc8ff1f8af979d8852bf62fa259f41b1f93 (diff) | |
download | mariadb-git-a5d9597e9703052895c8c2401132e77aa68a6123.tar.gz |
better inline check
1. check that unused inline functions are removed
2. only allow compilation if they are or if the check if overridden
3. with CMAKE_GENERATOR=Makefiles, use all flags when testing
(e.g. both CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG if
CMAKE_BUILD_TYPE=Debug). This is because
- on Solaris with the SunPro compiler, default CMAKE_C_FLAGS_xxx
values contain -xO2 (for Release and RelWithDebInfo)
and -g (for RelWithDebInfo and Debug)
- proper inlining only works at -xO4 without -g
- so if CMAKE_C_FLAGS has -xO4, inlining would work in
configure.cmake (before this fix) and fail during actual compilation
also remove the outdated check for inline from myu_global.h
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/my_global.h b/include/my_global.h index 9e9651b7409..dce38a124c1 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -207,20 +207,6 @@ #define likely(x) __builtin_expect(((x) != 0),1) #define unlikely(x) __builtin_expect(((x) != 0),0) -/* - now let's figure out if inline functions are supported - autoconf defines 'inline' to be empty, if not -*/ -#define inline_test_1(X) X ## 1 -#define inline_test_2(X) inline_test_1(X) -#if inline_test_2(inline) != 1 -#define HAVE_INLINE -#else -#error Compiler does not support inline! -#endif -#undef inline_test_2 -#undef inline_test_1 - /* Fix problem with S_ISLNK() on Linux */ #if defined(TARGET_OS_LINUX) || defined(__GLIBC__) #undef _GNU_SOURCE |