components/mysql-5-7/patches/disable_static_opt.patch
author Danek Duvall <danek.duvall@oracle.com>
Thu, 15 Sep 2016 14:40:13 -0700
changeset 6952 ce0a03807d13
parent 5884 ef644c2bdc65
child 7472 6cc4607cf459
permissions -rw-r--r--
24676164 prep-git.mk only archives with .tar.gz
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5884
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     1
This patch adds an "cmake" option DISABLE_STATIC that prevent
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     2
static libraries built from being installed.
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     3
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     4
--- a/cmake/libutils.cmake	2016-02-02 00:31:58.000000000 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     5
+++ b/cmake/libutils.cmake	2016-03-02 22:54:28.199045221 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     6
@@ -267,7 +267,7 @@
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     7
   ELSE()
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     8
     MESSAGE(FATAL_ERROR "Unknown library type")
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
     9
   ENDIF()
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    10
-  IF(NOT ARG_NOINSTALL)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    11
+  IF(NOT ARG_NOINSTALL AND NOT ( DISABLE_STATIC AND ARG_STATIC ) )
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    12
     IF(ARG_COMPONENT)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    13
       SET(COMP COMPONENT ${ARG_COMPONENT}) 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    14
     ENDIF()
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    15
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    16
--- a/CMakeLists.txt	2016-02-02 00:31:58.000000000 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    17
+++ b/CMakeLists.txt	2016-03-02 22:36:49.634297070 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    18
@@ -206,6 +206,8 @@
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    19
 INCLUDE(mysql_add_executable)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    20
 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    21
 # Handle options
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    22
+OPTION(DISABLE_STATIC 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    23
+ "Don't build static libraries" OFF)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    24
 OPTION(DISABLE_SHARED 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    25
  "Don't build shared libraries, compile code as position-dependent" OFF)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    26
 IF(DISABLE_SHARED)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    27
@@ -223,7 +225,7 @@
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    28
   OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    29
 ENDIF()
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    30
 OPTION(FORCE_UNSUPPORTED_COMPILER "Disable compiler version checks" OFF)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    31
-MARK_AS_ADVANCED(WITHOUT_SERVER DISABLE_SHARED FORCE_UNSUPPORTED_COMPILER)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    32
+MARK_AS_ADVANCED(WITHOUT_SERVER DISABLE_STATIC DISABLE_SHARED FORCE_UNSUPPORTED_COMPILER)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    33
 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    34
 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    35
 include(CheckCSourceCompiles)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    36
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    37
--- a/libservices/CMakeLists.txt	2016-02-02 00:31:58.000000000 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    38
+++ b/libservices/CMakeLists.txt	2016-03-02 22:53:28.974537132 +0100
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    39
@@ -34,4 +34,6 @@
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    40
   security_context_service.c)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    41
 
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    42
 ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    43
-INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    44
+IF(NOT DISABLE_STATIC)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    45
+  INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    46
+ENDIF()
ef644c2bdc65 22112750 Add MySQL 5.7 to Solaris
Gipson Pulla <gipson.pulla@oracle.com>
parents:
diff changeset
    47