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
16b81798
Commit
16b81798
authored
May 05, 2014
by
Tor Didriksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport from trunk:
Bug #18593044 COMPILE FLAGS NOT PASSED TO DTRACE, BREAKS CROSS BUILD
parent
a195cedc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
cmake/dtrace.cmake
cmake/dtrace.cmake
+23
-20
No files found.
cmake/dtrace.cmake
View file @
16b81798
# Copyright (c) 2009, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 201
4
, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -74,13 +74,6 @@ IF(ENABLE_DTRACE)
${
CMAKE_BINARY_DIR
}
/include/probes_mysql_dtrace.h
${
CMAKE_BINARY_DIR
}
/include/probes_mysql_nodtrace.h
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
# Systemtap object
EXECUTE_PROCESS
(
COMMAND
${
DTRACE
}
-G -s
${
CMAKE_SOURCE_DIR
}
/include/probes_mysql.d.base
-o
${
CMAKE_BINARY_DIR
}
/probes_mysql.o
)
ENDIF
()
ADD_CUSTOM_TARGET
(
gen_dtrace_header
DEPENDS
${
CMAKE_BINARY_DIR
}
/include/probes_mysql.d
...
...
@@ -99,12 +92,7 @@ FUNCTION(DTRACE_INSTRUMENT target)
IF
(
ENABLE_DTRACE
)
ADD_DEPENDENCIES
(
${
target
}
gen_dtrace_header
)
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
TARGET_LINK_LIBRARIES
(
${
target
}
${
CMAKE_BINARY_DIR
}
/probes_mysql.o
)
ENDIF
()
# On Solaris, invoke dtrace -G to generate object file and
# link it together with target.
# Invoke dtrace to generate object file and link it together with target.
IF
(
CMAKE_SYSTEM_NAME MATCHES
"SunOS"
)
SET
(
objdir
${
CMAKE_CURRENT_BINARY_DIR
}
/CMakeFiles/
${
target
}
.dir
)
SET
(
outfile
${
objdir
}
/
${
target
}
_dtrace.o
)
...
...
@@ -121,6 +109,21 @@ FUNCTION(DTRACE_INSTRUMENT target)
-P
${
CMAKE_SOURCE_DIR
}
/cmake/dtrace_prelink.cmake
WORKING_DIRECTORY
${
objdir
}
)
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
# dtrace on Linux runs gcc and uses flags from environment
SET
(
CFLAGS_SAVED $ENV{CFLAGS}
)
SET
(
ENV{CFLAGS}
${
CMAKE_C_FLAGS
}
)
SET
(
outfile
"
${
CMAKE_BINARY_DIR
}
/probes_mysql.o"
)
# Systemtap object
EXECUTE_PROCESS
(
COMMAND
${
DTRACE
}
-G -s
${
CMAKE_SOURCE_DIR
}
/include/probes_mysql.d.base
-o
${
outfile
}
)
SET
(
ENV{CFLAGS}
${
CFLAGS_SAVED
}
)
ENDIF
()
# Do not try to extend the library if we have not built the .o file
IF
(
outfile
)
# Add full object path to linker flags
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
NOT target_type MATCHES
"STATIC"
)
...
...
@@ -132,12 +135,12 @@ FUNCTION(DTRACE_INSTRUMENT target)
# but maybe one day this will be fixed.
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
ADD_CUSTOM_COMMAND
(
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_AR
}
r
${
target_location
}
${
outfile
}
COMMAND
${
CMAKE_RANLIB
}
${
target_location
}
)
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
SET
(
TARGET_OBJECT_DIRECTORY_
${
target
}
${
objdir
}
CACHE INTERNAL
""
)
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_AR
}
r
${
target_location
}
${
outfile
}
COMMAND
${
CMAKE_RANLIB
}
${
target_location
}
)
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
SET
(
TARGET_OBJECT_DIRECTORY_
${
target
}
${
objdir
}
CACHE INTERNAL
""
)
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