Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
9226552c
Commit
9226552c
authored
Sep 03, 2015
by
4ast
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #177 from iovisor/bblanco_dev
Enhance check for presence of static-libstdc++
parents
a11aab85
8d4fea89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/cc/CMakeLists.txt
src/cc/CMakeLists.txt
+7
-1
No files found.
src/cc/CMakeLists.txt
View file @
9226552c
...
...
@@ -22,7 +22,13 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
if
(
CMAKE_COMPILER_IS_GNUCC
)
execute_process
(
COMMAND
${
CMAKE_C_COMPILER
}
-dumpversion OUTPUT_VARIABLE GCC_VERSION
)
if
(
GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
-static-libstdc++"
)
execute_process
(
COMMAND
${
CMAKE_C_COMPILER
}
-print-libgcc-file-name OUTPUT_VARIABLE GCC_LIB
)
get_filename_component
(
GCC_DIR
"
${
GCC_LIB
}
"
DIRECTORY
)
find_library
(
GCC_LIBSTDCPP libstdc++.a PATHS
"
${
GCC_DIR
}
"
NO_DEFAULT_PATH
)
if
(
GCC_LIBSTDCPP
)
message
(
STATUS
"Using static-libstdc++"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
-static-libstdc++"
)
endif
()
endif
()
endif
()
...
...
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