author | Murthy Narkedimilli <murthy.narkedimilli@oracle.com> |
Fri, 31 Jul 2015 05:46:44 -0700 | |
changeset 4725 | b637001b5b2d |
permissions | -rw-r--r-- |
4725
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
1 |
Developed in-house, not fed back. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
2 |
Solaris-specific: SolarisStudio Customization. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
3 |
=== modified file 'CMakeLists.txt' |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
4 |
--- a/CMakeLists.txt |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
5 |
+++ b/CMakeLists.txt |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
6 |
@@ -1,4 +1,4 @@ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
7 |
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
8 |
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
9 |
# |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
10 |
# This program is free software; you can redistribute it and/or modify |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
11 |
# it under the terms of the GNU General Public License as published by |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
12 |
@@ -19,6 +19,11 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
13 |
CMAKE_POLICY(VERSION 2.8) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
14 |
endif() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
15 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
16 |
+# We use CMAKE_SHARED_LIBRARY_<Lang>_FLAGS. See cmake --help-policy CMP0018 |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
17 |
+IF(CMAKE_VERSION VERSION_GREATER "2.8.8") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
18 |
+ CMAKE_POLICY(SET CMP0018 OLD) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
19 |
+ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
20 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
21 |
# We use PROPERTIES LINK_INTERFACE_LIBRARIES. See cmake --help-policy CMP0022 |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
22 |
IF(CMAKE_VERSION VERSION_EQUAL "2.8.12" OR |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
23 |
CMAKE_VERSION VERSION_GREATER "2.8.12") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
24 |
=== modified file 'cmake/plugin.cmake' |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
25 |
--- a/cmake/plugin.cmake |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
26 |
+++ b/cmake/plugin.cmake |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
27 |
@@ -1,4 +1,4 @@ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
28 |
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
29 |
+# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
30 |
# |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
31 |
# This program is free software; you can redistribute it and/or modify |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
32 |
# it under the terms of the GNU General Public License as published by |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
33 |
@@ -175,6 +175,15 @@ MACRO(MYSQL_ADD_PLUGIN) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
34 |
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
35 |
TARGET_LINK_LIBRARIES (${target} mysqlservices) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
36 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
37 |
+ GET_TARGET_PROPERTY(LINK_FLAGS ${target} LINK_FLAGS) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
38 |
+ IF(NOT LINK_FLAGS) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
39 |
+ # Avoid LINK_FLAGS-NOTFOUND |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
40 |
+ SET(LINK_FLAGS) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
41 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
42 |
+ SET_TARGET_PROPERTIES(${target} PROPERTIES |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
43 |
+ LINK_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${LINK_FLAGS} " |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
44 |
+ ) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
45 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
46 |
# Plugin uses symbols defined in mysqld executable. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
47 |
# Some operating systems like Windows and OSX and are pretty strict about |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
48 |
# unresolved symbols. Others are less strict and allow unresolved symbols |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
49 |
=== modified file 'configure.cmake' |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
50 |
--- a/configure.cmake |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
51 |
+++ b/configure.cmake |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
52 |
@@ -1,4 +1,4 @@ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
53 |
-# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
54 |
+# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
55 |
# |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
56 |
# This program is free software; you can redistribute it and/or modify |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
57 |
# it under the terms of the GNU General Public License as published by |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
58 |
@@ -43,6 +43,13 @@ IF(UNIX) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
59 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
60 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
61 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
62 |
+IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
63 |
+ ## We will be using gcc to generate .so files |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
64 |
+ ## Add C flags (e.g. -m64) to CMAKE_SHARED_LIBRARY_C_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
65 |
+ SET(CMAKE_SHARED_LIBRARY_C_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
66 |
+ "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${CMAKE_C_FLAGS}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
67 |
+ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
68 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
69 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
70 |
# System type affects version_compile_os variable |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
71 |
IF(NOT SYSTEM_TYPE) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
72 |
@@ -65,6 +72,10 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
73 |
IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
74 |
IF(SUNPRO_CXX_LIBRARY) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
75 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
76 |
+ IF(SUNPRO_CXX_LIBRARY STREQUAL "stdcxx4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
77 |
+ ADD_DEFINITIONS(-D__MATHERR_RENAME_EXCEPTION) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
78 |
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -template=extdef") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
79 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
80 |
ELSE() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
81 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
82 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
83 |
@@ -88,45 +99,109 @@ MACRO(DIRNAME IN OUT) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
84 |
GET_FILENAME_COMPONENT(${OUT} ${IN} PATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
85 |
ENDMACRO() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
86 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
87 |
+MACRO(FIND_REAL_LIBRARY SOFTLINK_NAME REALNAME) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
88 |
+ # We re-distribute libstlport.so/libstdc++.so which are both symlinks. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
89 |
+ # There is no 'readlink' on solaris, so we use perl to follow links: |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
90 |
+ SET(PERLSCRIPT |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
91 |
+ "my $link= $ARGV[0]; use Cwd qw(abs_path); my $file = abs_path($link); print $file;") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
92 |
+ EXECUTE_PROCESS( |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
93 |
+ COMMAND perl -e "${PERLSCRIPT}" ${SOFTLINK_NAME} |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
94 |
+ RESULT_VARIABLE result |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
95 |
+ OUTPUT_VARIABLE real_library |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
96 |
+ ) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
97 |
+ SET(REALNAME ${real_library}) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
98 |
+ENDMACRO() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
99 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
100 |
+MACRO(EXTEND_CXX_LINK_FLAGS LIBRARY_PATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
101 |
+ # Using the $ORIGIN token with the -R option to locate the libraries |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
102 |
+ # on a path relative to the executable: |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
103 |
+ # We need an extra backslash to pass $ORIGIN to the mysql_config script... |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
104 |
+ SET(QUOTED_CMAKE_CXX_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
105 |
+ "${CMAKE_CXX_LINK_FLAGS} -R'\\$ORIGIN/../lib' -R${LIBRARY_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
106 |
+ SET(CMAKE_CXX_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
107 |
+ "${CMAKE_CXX_LINK_FLAGS} -R'\$ORIGIN/../lib' -R${LIBRARY_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
108 |
+ MESSAGE(STATUS "CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
109 |
+ENDMACRO() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
110 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
111 |
+MACRO(EXTEND_C_LINK_FLAGS LIBRARY_PATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
112 |
+ SET(QUOTED_CMAKE_C_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
113 |
+ "${CMAKE_C_LINK_FLAGS} -R'\\$ORIGIN/../lib' -R${LIBRARY_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
114 |
+ SET(CMAKE_C_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
115 |
+ "${CMAKE_C_LINK_FLAGS} -R'\$ORIGIN/../lib' -R${LIBRARY_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
116 |
+ MESSAGE(STATUS "CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
117 |
+ SET(CMAKE_SHARED_LIBRARY_C_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
118 |
+ "${CMAKE_SHARED_LIBRARY_C_FLAGS} -R'\$ORIGIN/..' -R'\$ORIGIN/../lib' -R${LIBRARY_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
119 |
+ENDMACRO() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
120 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
121 |
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
122 |
CMAKE_C_COMPILER_ID MATCHES "SunPro" AND |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
123 |
CMAKE_CXX_FLAGS MATCHES "stlport4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
124 |
DIRNAME(${CMAKE_CXX_COMPILER} CXX_PATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
125 |
- SET(STLPORT_SUFFIX "lib/stlport4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
126 |
- IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
127 |
- SET(STLPORT_SUFFIX "lib/stlport4/v9") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
128 |
+ # Also extract real path to the compiler(which is normally |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
129 |
+ # in <install_path>/prod/bin) and try to find the |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
130 |
+ # stlport libs relative to that location as well. |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
131 |
+ GET_FILENAME_COMPONENT(CXX_REALPATH ${CMAKE_CXX_COMPILER} REALPATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
132 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
133 |
+ # CC -V yields |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
134 |
+ # CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11 |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
135 |
+ # CC: Sun C++ 5.11 SunOS_sparc 2010/08/13 |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
136 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
137 |
+ EXECUTE_PROCESS( |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
138 |
+ COMMAND ${CMAKE_CXX_COMPILER} "-V" |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
139 |
+ OUTPUT_VARIABLE stdout |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
140 |
+ ERROR_VARIABLE stderr |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
141 |
+ RESULT_VARIABLE result |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
142 |
+ ) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
143 |
+ IF(result) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
144 |
+ MESSAGE(FATAL_ERROR "Failed to execute ${CMAKE_CXX_COMPILER} -V") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
145 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
146 |
- IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
147 |
- SET(STLPORT_SUFFIX "lib/stlport4/amd64") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
148 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
149 |
+ STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr}) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
150 |
+ SET(CC_MINOR_VERSION ${CMAKE_MATCH_1}) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
151 |
+ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
152 |
+ IF(${CC_MINOR_VERSION} EQUAL 13) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
153 |
+ SET(STLPORT_SUFFIX "lib/compilers/stlport4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
154 |
+ IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
155 |
+ SET(STLPORT_SUFFIX "lib/compilers/stlport4/sparcv9") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
156 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
157 |
+ IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
158 |
+ SET(STLPORT_SUFFIX "lib/compilers/stlport4/amd64") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
159 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
160 |
+ ELSE() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
161 |
+ SET(STLPORT_SUFFIX "lib/stlport4") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
162 |
+ IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
163 |
+ SET(STLPORT_SUFFIX "lib/stlport4/v9") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
164 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
165 |
+ IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
166 |
+ SET(STLPORT_SUFFIX "lib/stlport4/amd64") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
167 |
+ ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
168 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
169 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
170 |
FIND_LIBRARY(STL_LIBRARY_NAME |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
171 |
NAMES "stlport" |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
172 |
PATHS ${CXX_PATH}/../${STLPORT_SUFFIX} |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
173 |
+ ${CXX_REALPATH}/../../${STLPORT_SUFFIX} |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
174 |
) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
175 |
MESSAGE(STATUS "STL_LIBRARY_NAME ${STL_LIBRARY_NAME}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
176 |
IF(STL_LIBRARY_NAME) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
177 |
DIRNAME(${STL_LIBRARY_NAME} STLPORT_PATH) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
178 |
- # We re-distribute libstlport.so which is a symlink to libstlport.so.1 |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
179 |
- # There is no 'readlink' on solaris, so we use perl to follow links: |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
180 |
- SET(PERLSCRIPT |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
181 |
- "my $link= $ARGV[0]; use Cwd qw(abs_path); my $file = abs_path($link); print $file;") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
182 |
- EXECUTE_PROCESS( |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
183 |
- COMMAND perl -e "${PERLSCRIPT}" ${STL_LIBRARY_NAME} |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
184 |
- RESULT_VARIABLE result |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
185 |
- OUTPUT_VARIABLE real_library |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
186 |
- ) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
187 |
+ FIND_REAL_LIBRARY(${STL_LIBRARY_NAME} real_library) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
188 |
MESSAGE(STATUS "INSTALL ${STL_LIBRARY_NAME} ${real_library}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
189 |
INSTALL(FILES ${STL_LIBRARY_NAME} ${real_library} |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
190 |
- DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
191 |
- # Using the $ORIGIN token with the -R option to locate the libraries |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
192 |
- # on a path relative to the executable: |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
193 |
- # We need an extra backslash to pass $ORIGIN to the mysql_config script... |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
194 |
- SET(QUOTED_CMAKE_CXX_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
195 |
- "${CMAKE_CXX_LINK_FLAGS} -R'\\$ORIGIN/../lib' -R${STLPORT_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
196 |
- SET(CMAKE_CXX_LINK_FLAGS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
197 |
- "${CMAKE_CXX_LINK_FLAGS} -R'\$ORIGIN/../lib' -R${STLPORT_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
198 |
- MESSAGE(STATUS "CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
199 |
+ DESTINATION ${INSTALL_LIBDIR} COMPONENT SharedLibraries) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
200 |
+ EXTEND_C_LINK_FLAGS(${STLPORT_PATH}) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
201 |
+ EXTEND_CXX_LINK_FLAGS(${STLPORT_PATH}) |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
202 |
+ ELSE() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
203 |
+ MESSAGE(STATUS "Failed to find the required stlport library, print some" |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
204 |
+ "variables to help debugging and bail out") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
205 |
+ MESSAGE(STATUS "CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
206 |
+ MESSAGE(STATUS "CXX_PATH ${CXX_PATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
207 |
+ MESSAGE(STATUS "CXX_REALPATH ${CXX_REALPATH}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
208 |
+ MESSAGE(STATUS "STLPORT_SUFFIX ${STLPORT_SUFFIX}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
209 |
+ MESSAGE(STATUS "PATH: ${CXX_PATH}/../${STLPORT_SUFFIX}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
210 |
+ MESSAGE(STATUS "PATH: ${CXX_REALPATH}/../../${STLPORT_SUFFIX}") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
211 |
+ MESSAGE(FATAL_ERROR |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
212 |
+ "Could not find the required stlport library.") |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
213 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
214 |
ENDIF() |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
215 |
=== modified file 'plugin/password_validation/validate_password.cc' |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
216 |
--- a/plugin/password_validation/validate_password.cc |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
217 |
+++ b/plugin/password_validation/validate_password.cc |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
218 |
@@ -17,6 +17,7 @@ |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
219 |
#include <string> |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
220 |
#include <mysql/plugin_validate_password.h> |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
221 |
#include <set> |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
222 |
+#include <ios> // std::streamoff |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
223 |
#include <iostream> |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
224 |
#include <fstream> |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
225 |
|
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
226 |
=== modified file 'unittest/gunit/CMakeLists.txt' |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
227 |
--- a/unittest/gunit/CMakeLists.txt |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
228 |
+++ b/unittest/gunit/CMakeLists.txt |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
229 |
@@ -255,7 +255,6 @@ SET(TESTS |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
230 |
sql_list |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
231 |
sql_plist |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
232 |
sql_string |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
233 |
- stdcxx |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
234 |
strtoll |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
235 |
thread_utils |
b637001b5b2d
21164142 Upgrade the version of MySQL 5.6 to 5.6.25 on Solaris
Murthy Narkedimilli <murthy.narkedimilli@oracle.com>
parents:
diff
changeset
|
236 |
) |