Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bfe318a4
Commit
bfe318a4
authored
May 20, 2014
by
Leif Walsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved/cleaned up gcc-ar/gcc-ranlib checking #245
parent
ac31894d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
CMakeLists.txt
CMakeLists.txt
+25
-0
cmake_modules/TokuSetupCompiler.cmake
cmake_modules/TokuSetupCompiler.cmake
+0
-8
No files found.
CMakeLists.txt
View file @
bfe318a4
...
@@ -7,6 +7,31 @@ project(TokuDB)
...
@@ -7,6 +7,31 @@ project(TokuDB)
set
(
CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
""
)
set
(
CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
""
)
set
(
CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
""
)
set
(
CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
""
)
## Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for
## link-time optimizations to work properly.
##
## From https://gcc.gnu.org/gcc-4.9/changes.html:
##
## When using a linker plugin, compiling with the -flto option now
## generates slim objects files (.o) which only contain intermediate
## language representation for LTO. Use -ffat-lto-objects to create
## files which contain additionally the object code. To generate
## static libraries suitable for LTO processing, use gcc-ar and
## gcc-ranlib; to list symbols from a slim object file use
## gcc-nm. (Requires that ar, ranlib and nm have been compiled with
## plugin support.)
if
((
CMAKE_CXX_COMPILER_ID STREQUAL GNU
)
AND
NOT
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"4.9.0"
))
find_program
(
gcc_ar
"gcc-ar"
)
if
(
gcc_ar
)
set
(
CMAKE_AR
"
${
gcc_ar
}
"
)
endif
()
find_program
(
gcc_ranlib
"gcc-ranlib"
)
if
(
gcc_ranlib
)
set
(
CMAKE_RANLIB
"
${
gcc_ranlib
}
"
)
endif
()
endif
()
include
(
TokuFeatureDetection
)
include
(
TokuFeatureDetection
)
include
(
TokuSetupCompiler
)
include
(
TokuSetupCompiler
)
include
(
TokuSetupCTest
)
include
(
TokuSetupCTest
)
...
...
cmake_modules/TokuSetupCompiler.cmake
View file @
bfe318a4
...
@@ -137,14 +137,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
...
@@ -137,14 +137,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set
(
CMAKE_C_FLAGS_RELEASE
"-g -O3
${
CMAKE_C_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_C_FLAGS_RELEASE
"-g -O3
${
CMAKE_C_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-g -O3
${
CMAKE_CXX_FLAGS_RELEASE
}
-UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-g -O3
${
CMAKE_CXX_FLAGS_RELEASE
}
-UNDEBUG"
)
else
()
else
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES GNU
)
## Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for
## link-time optimizations to work properly.
if
(
NOT
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"4.9.0"
))
set
(
CMAKE_AR
"gcc-ar"
)
set
(
CMAKE_RANLIB
"gcc-ranlib"
)
endif
()
endif
()
# we overwrite this because the default passes -DNDEBUG and we don't want that
# we overwrite this because the default passes -DNDEBUG and we don't want that
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_C_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-flto -fuse-linker-plugin
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-g -O3 -UNDEBUG"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment