2014-08-02 21:26:16 +02:00
|
|
|
# Copyright (c) 2006, 2014, Oracle and/or its affiliates
|
2018-10-23 15:59:24 +02:00
|
|
|
# Copyright (c) 2009, 2018, MariaDB Corporation
|
2006-12-31 02:29:11 +01:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2019-05-11 20:29:06 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)
|
2007-08-03 11:06:53 +02:00
|
|
|
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
SET(MYSYS_SOURCES array.c charset-def.c charset.c my_default.c
|
2016-08-19 22:03:05 +02:00
|
|
|
get_password.c
|
2012-08-01 16:27:34 +02:00
|
|
|
errors.c hash.c list.c
|
|
|
|
mf_cache.c mf_dirname.c mf_fn_ext.c
|
2006-01-31 14:52:16 +01:00
|
|
|
mf_format.c mf_getdate.c mf_iocache.c mf_iocache2.c mf_keycache.c
|
|
|
|
mf_keycaches.c mf_loadpath.c mf_pack.c mf_path.c mf_qsort.c mf_qsort2.c
|
2009-10-06 13:04:51 +02:00
|
|
|
mf_radix.c mf_same.c mf_sort.c mf_soundex.c mf_arr_appstr.c mf_tempdir.c
|
2010-07-23 22:14:35 +02:00
|
|
|
mf_tempfile.c mf_unixpath.c mf_wcomp.c mulalloc.c my_access.c
|
2013-03-25 23:03:13 +01:00
|
|
|
my_alloc.c my_bit.c my_bitmap.c my_chsize.c
|
2010-07-25 19:30:18 +02:00
|
|
|
my_compress.c my_copy.c my_create.c my_delete.c
|
2011-03-29 14:43:49 +02:00
|
|
|
my_div.c my_error.c my_file.c my_fopen.c my_fstream.c
|
|
|
|
my_gethwaddr.c my_getopt.c my_getsystime.c my_getwd.c my_compare.c my_init.c
|
2010-07-25 19:30:18 +02:00
|
|
|
my_lib.c my_lock.c my_malloc.c my_mess.c
|
2010-07-23 22:14:35 +02:00
|
|
|
my_mkdir.c my_mmap.c my_once.c my_open.c my_pread.c my_pthread.c
|
Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
2010-07-08 23:20:08 +02:00
|
|
|
my_quick.c my_read.c my_redel.c my_rename.c my_seek.c my_sleep.c
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c
|
2012-01-20 01:57:58 +01:00
|
|
|
my_basename.c
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
my_write.c ptr_cmp.c queues.c stacktrace.c
|
2013-03-25 23:03:13 +01:00
|
|
|
string.c thr_alarm.c thr_lock.c thr_mutex.c
|
2014-10-07 10:37:36 +02:00
|
|
|
thr_rwlock.c thr_timer.c
|
|
|
|
tree.c typelib.c base64.c my_memmem.c
|
2017-12-11 20:20:37 +01:00
|
|
|
my_getpagesize.c
|
|
|
|
guess_malloc_library.c
|
2021-02-15 02:31:31 +01:00
|
|
|
lf_alloc-pin.c lf_dynarray.c lf_hash.cc
|
2013-09-21 10:14:42 +02:00
|
|
|
safemalloc.c my_new.cc
|
2016-11-02 12:27:12 +01:00
|
|
|
my_getncpus.c my_safehash.c my_chmod.c my_rnd.c
|
2016-08-19 22:03:05 +02:00
|
|
|
my_uuid.c wqueue.c waiting_threads.c ma_dyncol.c ../sql-common/my_time.c
|
2020-08-11 14:11:07 +02:00
|
|
|
my_rdtsc.c psi_noop.c
|
2020-04-05 10:04:52 +02:00
|
|
|
my_atomic_writes.c my_cpu.c my_likely.c my_largepage.c
|
2020-09-17 16:07:37 +02:00
|
|
|
file_logger.c my_dlerror.c crc32/crc32c.cc)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
IF (WIN32)
|
2019-11-13 21:12:48 +01:00
|
|
|
SET (MYSYS_SOURCES ${MYSYS_SOURCES}
|
|
|
|
my_winthread.c
|
2020-04-02 21:54:08 +02:00
|
|
|
my_wintoken.c
|
2019-11-13 21:12:48 +01:00
|
|
|
my_wincond.c
|
|
|
|
my_winerr.c
|
|
|
|
my_winfile.c
|
|
|
|
my_conio.c
|
2021-09-24 12:29:57 +02:00
|
|
|
my_minidump.cc
|
2019-11-13 21:12:48 +01:00
|
|
|
my_win_popen.cc)
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
ENDIF()
|
|
|
|
|
2021-06-06 22:22:03 +02:00
|
|
|
IF(MSVC_INTEL)
|
2020-09-04 14:33:13 +02:00
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c)
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc)
|
|
|
|
ENDIF()
|
2020-09-17 16:07:37 +02:00
|
|
|
ADD_DEFINITIONS(-DHAVE_SSE42 -DHAVE_PCLMUL)
|
2020-09-04 14:33:13 +02:00
|
|
|
IF(CLANG_CL)
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
|
2020-09-04 14:33:13 +02:00
|
|
|
ENDIF()
|
|
|
|
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686")
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
MY_CHECK_CXX_COMPILER_FLAG(-msse4.2)
|
|
|
|
MY_CHECK_CXX_COMPILER_FLAG(-mpclmul)
|
2020-09-04 14:33:13 +02:00
|
|
|
CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
|
|
|
|
CHECK_INCLUDE_FILE(x86intrin.h HAVE_X86INTRIN_H)
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
IF(have_CXX__msse4.2 AND HAVE_CPUID_H)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_SSE42)
|
|
|
|
IF (have_CXX__mpclmul AND HAVE_X86INTRIN_H)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_PCLMUL)
|
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
|
|
|
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(crc32/crc32c_amd64.cc PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
2020-06-01 10:34:06 +02:00
|
|
|
ENDIF()
|
|
|
|
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
|
2020-09-17 16:07:37 +02:00
|
|
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
2020-06-01 10:34:06 +02:00
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
|
|
|
|
CHECK_CXX_SOURCE_COMPILES("
|
|
|
|
#define CRC32CX(crc, value) __asm__(\"crc32cx %w[c], %w[c], %x[v]\":[c]\"+r\"(crc):[v]\"r\"(value))
|
|
|
|
asm(\".arch_extension crc\");
|
|
|
|
unsigned int foo(unsigned int ret) {
|
|
|
|
CRC32CX(ret, 0);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
#include <sys/auxv.h>
|
2021-01-11 00:54:40 +01:00
|
|
|
int main() { foo(0);
|
|
|
|
#ifdef __linux__
|
|
|
|
getauxval(AT_HWCAP);
|
|
|
|
#else
|
|
|
|
unsigned long v;
|
|
|
|
elf_aux_info(AT_HWCAP, &v, sizeof(v));
|
|
|
|
#endif
|
|
|
|
}" HAVE_ARMV8_CRC)
|
2020-06-01 10:34:06 +02:00
|
|
|
|
|
|
|
CHECK_CXX_SOURCE_COMPILES("
|
|
|
|
asm(\".arch_extension crypto\");
|
|
|
|
unsigned int foo(unsigned int ret) {
|
|
|
|
__asm__(\"pmull v2.1q, v2.1d, v1.1d\");
|
|
|
|
return ret;
|
|
|
|
}
|
2020-07-29 17:27:25 +02:00
|
|
|
#include <sys/auxv.h>
|
2021-01-11 00:54:40 +01:00
|
|
|
int main() { foo(0);
|
|
|
|
#ifdef __linux__
|
|
|
|
getauxval(AT_HWCAP);
|
|
|
|
#else
|
|
|
|
unsigned long v;
|
|
|
|
elf_aux_info(AT_HWCAP, &v, sizeof(v));
|
|
|
|
#endif
|
|
|
|
}" HAVE_ARMV8_CRYPTO)
|
2020-06-01 10:34:06 +02:00
|
|
|
|
2020-09-17 16:07:37 +02:00
|
|
|
CHECK_C_COMPILER_FLAG(-march=armv8-a+crc+crypto HAVE_ARMV8_CRC_CRYPTO_MARCH)
|
|
|
|
|
|
|
|
IF(HAVE_ARMV8_CRC_CRYPTO_MARCH)
|
|
|
|
CHECK_INCLUDE_FILE(arm_acle.h HAVE_ARM_ACLE_H -march=armv8-a+crc+crypto)
|
|
|
|
IF(HAVE_ARM_ACLE_H)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_ARMV8_CRC_CRYPTO_INTRINSICS)
|
|
|
|
ENDIF()
|
|
|
|
IF(HAVE_ARMV8_CRC)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_ARMV8_CRC)
|
|
|
|
ENDIF()
|
|
|
|
IF(HAVE_ARMV8_CRYPTO)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_ARMV8_CRYPTO)
|
|
|
|
ENDIF()
|
2020-06-01 10:34:06 +02:00
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_arm64.c)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(crc32/crc32_arm64.c PROPERTIES
|
|
|
|
COMPILE_FLAGS "-march=armv8-a+crc+crypto")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" OR CMAKE_SYSTEM_NAME MATCHES AIX)
|
2020-09-17 16:07:37 +02:00
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_ppc64.c crc32/crc32c_ppc.c)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(crc32/crc32_ppc64.c crc32/crc32c_ppc.c PROPERTIES
|
|
|
|
COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
|
|
|
|
ADD_DEFINITIONS(-DHAVE_POWER8 -DHAS_ALTIVEC)
|
MDEV-24745 Generic CRC-32C computation wrongly uses SSE4.2 instructions
In commit d25f806d73d9984f0c9f2a346dcebb01a0eaa109 (MDEV-22749)
the CRC-32C implementation of MariaDB was broken on some
IA-32 and AMD64 builds, depending on the compiler version and
build options. This was verified for IA-32 on GCC 10.2.1.
Even though we try to identify the SSE4.2 extensions and the
availaibility of the PCLMULQDQ instruction by executing CPUID,
the fall-back code could be generated with extended instructions,
because the entire file mysys/crc32/crc32c.c was being compiled
with -msse4.2 -mpclmul. This would cause SIGILL on a PINSRD
instruction on affected IA-32 targets (such as some Intel Atom
processors). This might also affect old AMD64 processors
(predating the 2007 Intel Nehalem microarchitecture), if some
compiler chose to emit the offending instructions.
While it is fine to pass a target-specific option to a target-specific
compilation unit (like -mpclmul to a PCLMUL-specific compilation unit),
that is not safe for mixed-architecture compilation units.
For mixed-architecture compilation units, the correct way is to set
target attributes on the target-specific functions.
There does not seem to be a way to pass target attributes to
function template instantiation. Hence, we must replace the
ExtendImpl template with plain functions crc32_sse42() and
crc32_slow().
We will also remove some inconsistency between
my_crc32_implementation() and mysys_namespace::crc32::Choose_Extend().
The function crc32_pclmul_enabled() will be moved to mysys/crc32/crc32c.cc
so that the detection code will be compiled without -msse4.2 -mpclmul.
The AMD64 PCLMUL accelerated crc32c_3way() will be moved to a new
file crc32c_amd64.cc. In this way, only a few functions that depend
on -msse4.2 in mysys/crc32/crc32c.cc can be declared with
__attribute__((target("sse4.2"))), and most of the file can be compiled
for the generic target.
Last, the file mysys/crc32ieee.cc will be omitted on 64-bit POWER,
because it was dead code (no symbols were exported).
Reviewed by: Vladislav Vaintroub
2021-04-13 15:15:15 +02:00
|
|
|
ELSE()
|
|
|
|
SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32ieee.cc)
|
2020-06-01 10:34:06 +02:00
|
|
|
ENDIF()
|
|
|
|
|
2012-01-20 01:57:58 +01:00
|
|
|
IF(UNIX)
|
2016-12-20 15:17:59 +01:00
|
|
|
SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c my_setuser.c)
|
2012-01-20 01:57:58 +01:00
|
|
|
ENDIF()
|
|
|
|
|
2011-12-15 22:08:42 +01:00
|
|
|
IF(HAVE_ALARM)
|
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_alarm.c)
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
ENDIF()
|
|
|
|
|
2010-07-25 19:30:18 +02:00
|
|
|
IF(HAVE_MLOCK)
|
|
|
|
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_lockmem.c)
|
|
|
|
ENDIF()
|
|
|
|
|
2009-11-25 00:15:47 +01:00
|
|
|
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
|
2020-05-04 14:17:06 +02:00
|
|
|
MAYBE_DISABLE_IPO(mysys)
|
2019-06-11 12:00:18 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
|
2020-10-30 10:15:30 +01:00
|
|
|
${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO})
|
WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
Add new file
BUILD/autorun.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
CMakeLists.txt:
WL#5161 : Rewrite top-level CMakeLists.txt.
Remove Windows specifics
- compiler flags handling moved to configure.cmake
- storage engine/plugin stuff moved into cmake/plugin.cmake
- copy docs
Makefile.am:
Added new files
client/CMakeLists.txt:
WL#5161 : Rewrite CMakeLists.txt to be platform-independent
Handle packagng (add INSTALL commands)
cmake/Makefile.am:
WL#5161 : use choose_configure instead of autotools configure script
(choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
Custom targets for abi_check (for cmake)
cmake/bison.cmake:
- Check bison availability
- Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
Add helper script to concatenate files.
cmake/character_sets.cmake:
Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
Helper script to check the minimum required version of cmake
cmake/configure.pl:
Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
Add script helper to create initial database.
(on Windows, we pack initial db with the redistribution
package)
cmake/do_abi_check.cmake:
Perform abi check
cmake/dtrace.cmake:
Handle dtrace in CMake Build.
Check for dtrace availablility,
run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
Run dtrace -G on Solaris in pre-link step,
link the object it creates together with library or
executable
cmake/install_macros.cmake:
Helper macros for packaging
(install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
"make dist" -
- pack autotools ./configure script with the source
(renamed to configure.am)
- pack bison output
cmake/merge_archives_unix.cmake.in:
script to merge static libraries on Unix
cmake/misc.cmake:
Build helper macros
- MERGE_STATIC_LIBS
We use it when building client library and embedded
(avoid recompilation)
- Convert source file paths to absolute names.
We use it in to locate files of a different project,
when the files need to be recompiled (e.g in embedded
several storage engines are recompiled with
-DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
Extract version info from configure.in
Handle package names.
cmake/plugin.cmake:
Rewrote storage/mysql_storage_engine.cmake to handle
other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
Helper to check stack direction.
cmake/zlib.cmake:
Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
Add new file
cmd-line-utils/readline/CMakeLists.txt:
Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
Add new file
config.h.cmake:
WL#5161 : Add config.h template for cmake
configure.cmake:
WL#5161 : Add platform tests ( for cmake)
configure.in:
Added new subdirectories
dbug/CMakeLists.txt:
WL#5161
extra/CMakeLists.txt:
WL#5161
extra/yassl/CMakeLists.txt:
WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
WL#5161
include/Makefile.am:
Add new file
include/keycache.h:
remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
- Move thread_safe_increment from config-win.h to other headers
(config-win.h is not used anymore)
- Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and
with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
remove rf_SetTimer that used to be defined in config-win.h
Replace with UINT_PTR (we do not use config-win.h anymore
and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
Avoid pointless recompilation of source files
in client library if possible. Merge static
libs (dbug, mysys) to create static client
library.
libmysqld/CMakeLists.txt:
Avoid pointless recompilation of source files
when building embedded. Instead, merge dbug and
mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
Embedded compilation on Unix
libmysqld/lib_sql.cc:
Do not define THD::clear_error() in lib_sql.cc
for embedded. Instead, use the same inline
definition from sql_class.h as in none-embedded
case (fixes duplicate symbol errors on Windows
and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
Install man files.
man/Makefile.am:
Add new file.
mysql-test/CMakeLists.txt:
Install mysql-test files
mysql-test/Makefile.am:
Add new files
mysql-test/lib/My/ConfigFactory.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
the build configurations are now also available on Unix
Xcode on Mac uses the Release, RelwithDebinfo and Debug
subdirectories for executables. Earlier, build configurations
were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined
(can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
Allow testing with mtr in out-of-source builds.
Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
This test can now run on Windows as well.
mysys/CMakeLists.txt:
Port CMakeLists.txt to Unix
mysys/my_create.c:
config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
Add win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
config-win.h is dead => include <sys/stat.h> where it is used
fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
Add new file
plugin/fulltext/CMakeLists.txt:
Compile full-text example with CMake
plugin/fulltext/Makefile.am:
Add new file.
plugin/semisync/CMakeLists.txt:
Fix semisync to use common macro for plugins.
regex/CMakeLists.txt:
Use absolute filenames, when adding regex library
(we recompile files in embedded, and want to locate
sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
Add configure/install for scripts
sql-bench/CMakeLists.txt:
install sql-bench files
sql-bench/Makefile.am:
Add new file
sql/CMakeLists.txt:
Port CmakeLists.txt to Unix
sql/nt_servc.cc:
compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
Install charsets
sql/share/Makefile.am:
Add new file
sql/sql_builtin.cc.in:
Handle pure-C plugins on Windows.
sql/sql_class.h:
Use the same clear_error macro in embedded and not embedded.
Fixes pointless #ifdef and avoids duplicate symbols when linking
on Windows.
storage/Makefile.am:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
Add names for static and dynamic plugin libraries.
Link archive with zlib
storage/blackhole/CMakeLists.txt:
Add names for static and dynamic storage
engine libraries
storage/csv/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/example/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/federated/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/heap/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/ibmdb2i/CMakeLists.txt:
Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
Run system checks.
Add names for static and dynamic storage engine
libraries.
storage/innobase/include/page0page.ic:
Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
Add names for static and dynamic storage engine
libraries
storage/mysql_storage_engine.cmake:
storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
Configure and install some files from support-files.
support-files/Makefile.am:
Add new file
tests/CMakeLists.txt:
In general case, mysqlclient library can be dependent
on C++ runtime(if it includes yassl and is not compiled
with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
Add unit tests
unittest/mysys/Makefile.am:
Add new file
unittest/mytap/CMakeLists.txt:
Add library for unit tests
unittest/mytap/Makefile.am:
Add new file
unittest/mytap/tap.c:
fix function definitions to match declarations
win/create_def_file.js:
Fix link error with intel compiler (icl
defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
|
|
|
DTRACE_INSTRUMENT(mysys)
|
2010-06-01 12:13:56 +02:00
|
|
|
|
2021-10-15 15:51:05 +02:00
|
|
|
IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
|
|
|
TARGET_LINK_LIBRARIES(mysys atomic)
|
|
|
|
ENDIF()
|
|
|
|
|
2011-12-11 09:00:12 +01:00
|
|
|
IF(HAVE_BFD_H)
|
|
|
|
TARGET_LINK_LIBRARIES(mysys bfd)
|
|
|
|
ENDIF(HAVE_BFD_H)
|
|
|
|
|
2011-11-23 18:25:07 +01:00
|
|
|
IF (WIN32)
|
2021-09-24 01:33:05 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysys iphlpapi dbghelp)
|
2011-11-23 18:25:07 +01:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2013-06-14 10:52:23 +02:00
|
|
|
# Need explicit pthread for gcc -fsanitize=address
|
|
|
|
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
|
|
|
|
TARGET_LINK_LIBRARIES(mysys pthread)
|
|
|
|
ENDIF()
|
|
|
|
|
2010-06-01 12:13:56 +02:00
|
|
|
ADD_EXECUTABLE(thr_lock thr_lock.c)
|
|
|
|
TARGET_LINK_LIBRARIES(thr_lock mysys)
|
|
|
|
SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
|
2014-10-07 10:37:36 +02:00
|
|
|
ADD_EXECUTABLE(thr_timer thr_timer.c)
|
|
|
|
TARGET_LINK_LIBRARIES(thr_timer mysys)
|
|
|
|
SET_TARGET_PROPERTIES(thr_timer PROPERTIES COMPILE_FLAGS "-DMAIN")
|
|
|
|
|
2016-12-19 21:25:42 +01:00
|
|
|
ADD_EXECUTABLE(test_hash hash.c)
|
|
|
|
TARGET_LINK_LIBRARIES(test_hash mysys)
|
|
|
|
SET_TARGET_PROPERTIES(test_hash PROPERTIES COMPILE_FLAGS "-DMAIN")
|