List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:March 30 2011 2:46pm
Subject:bzr commit into mysql-trunk branch (tor.didriksen:3349)
View as plain text  
#At file:///export/home/didrik/repo/trunk-implicit-template/ based on revid:dmitry.lenev@stripped

 3349 Tor Didriksen	2011-03-30
      Bug 11929733 - 59607: REMOVE THE FNO-IMPLICIT-TEMPLATES COMPILATION FLAG

    modified:
      cmake/ssl.cmake
      config.h.cmake
      configure.cmake
      sql/binlog.cc
      sql/field.cc
      sql/filesort.cc
      sql/item.cc
      sql/item_buff.cc
      sql/keycaches.cc
      sql/mysqld.cc
      sql/opt_range.cc
      sql/rpl_slave.cc
      sql/sql_acl.cc
      sql/sql_class.cc
      sql/sql_insert.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sys_vars.h
      sql/table.cc
      unittest/gunit/CMakeLists.txt
=== modified file 'cmake/ssl.cmake'
--- a/cmake/ssl.cmake	2010-07-19 14:17:07 +0000
+++ b/cmake/ssl.cmake	2011-03-30 14:46:51 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,13 +27,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
   SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
   SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
   CHANGE_SSL_SETTINGS("bundled")
-  #Remove -fno-implicit-templates 
-  #(yassl sources cannot  be compiled with  it)
   SET(SAVE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-  IF(CMAKE_CXX_FLAGS)
-  STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS 
-    ${CMAKE_CXX_FLAGS})
-  ENDIF()
   ADD_SUBDIRECTORY(extra/yassl)
   ADD_SUBDIRECTORY(extra/yassl/taocrypt)
   SET(CMAKE_CXX_FLAGS ${SAVE_CXX_FLAGS})

=== modified file 'config.h.cmake'
--- a/config.h.cmake	2011-02-02 18:31:39 +0000
+++ b/config.h.cmake	2011-03-30 14:46:51 +0000
@@ -40,7 +40,6 @@
 #cmakedefine HAVE_FNMATCH_H 1
 #cmakedefine HAVE_FPU_CONTROL_H 1
 #cmakedefine HAVE_GRP_H 1
-#cmakedefine HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
 #cmakedefine HAVE_IA64INTRIN_H 1
 #cmakedefine HAVE_IEEEFP_H 1
 #cmakedefine HAVE_INTTYPES_H 1

=== modified file 'configure.cmake'
--- a/configure.cmake	2011-02-02 18:31:39 +0000
+++ b/configure.cmake	2011-03-30 14:46:51 +0000
@@ -67,15 +67,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
   # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
   # ABI and cannot be simply removed. 
   SET(CMAKE_CXX_FLAGS 
-    "${CMAKE_CXX_FLAGS} -fno-implicit-templates -fno-exceptions -fno-rtti")
-  IF(CMAKE_CXX_FLAGS)
-    STRING(REGEX MATCH "fno-implicit-templates" NO_IMPLICIT_TEMPLATES
-      ${CMAKE_CXX_FLAGS})
-    IF (NO_IMPLICIT_TEMPLATES)
-      SET(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION TRUE)
-    ENDIF()
-  ENDIF()
-
+    "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
   IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static " 
      OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")
      SET(HAVE_DLOPEN FALSE CACHE "Disable dlopen due to -static flag" FORCE)

=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc	2011-03-14 17:55:26 +0000
+++ b/sql/binlog.cc	2011-03-30 14:46:51 +0000
@@ -5379,24 +5379,6 @@ THD::binlog_prepare_pending_rows_event(T
   DBUG_RETURN(pending);        /* This is the current pending event */
 }
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-/*
-  Instantiate the versions we need, we have -fno-implicit-template as
-  compiling option.
-*/
-template Rows_log_event*
-THD::binlog_prepare_pending_rows_event(TABLE*, uint32, size_t, bool,
-				       Write_rows_log_event*);
-
-template Rows_log_event*
-THD::binlog_prepare_pending_rows_event(TABLE*, uint32, size_t, bool,
-				       Delete_rows_log_event *);
-
-template Rows_log_event* 
-THD::binlog_prepare_pending_rows_event(TABLE*, uint32, size_t, bool,
-				       Update_rows_log_event *);
-#endif
-
 /* Declare in unnamed namespace. */
 CPP_UNNAMED_NS_START
 

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2011-03-22 11:44:40 +0000
+++ b/sql/field.cc	2011-03-30 14:46:51 +0000
@@ -41,14 +41,9 @@
 #define MAX_EXPONENT 1024
 
 /*****************************************************************************
-  Instansiate templates and static variables
+  Instantiate static variables
 *****************************************************************************/
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<Create_field>;
-template class List_iterator<Create_field>;
-#endif
-
 uchar Field_null::null[1]={1};
 const char field_separator=',';
 

=== modified file 'sql/filesort.cc'
--- a/sql/filesort.cc	2011-03-17 17:39:31 +0000
+++ b/sql/filesort.cc	2011-03-30 14:46:51 +0000
@@ -37,10 +37,6 @@
 #include "sql_select.h"
 #include "debug_sync.h"
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class Bounded_queue<uchar, uchar>;
-#endif
-
 	/* functions defined in this file */
 
 static void make_char_array(FILESORT_INFO *info, uint fields, uint length);

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2011-03-30 07:42:03 +0000
+++ b/sql/item.cc	2011-03-30 14:46:51 +0000
@@ -8501,14 +8501,3 @@ void view_error_processor(THD *thd, void
   ((TABLE_LIST *)data)->hide_view_error(thd);
 }
 
-/*****************************************************************************
-** Instantiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<Item>;
-template class List_iterator<Item>;
-template class List_iterator_fast<Item>;
-template class List_iterator_fast<Item_field>;
-template class List<List_item>;
-#endif

=== modified file 'sql/item_buff.cc'
--- a/sql/item_buff.cc	2010-08-16 06:58:42 +0000
+++ b/sql/item_buff.cc	2011-03-30 14:46:51 +0000
@@ -175,13 +175,3 @@ bool Cached_item_decimal::cmp()
   }
   return FALSE;
 }
-
-
-/*****************************************************************************
-** Instansiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<Cached_item>;
-template class List_iterator<Cached_item>;
-#endif

=== modified file 'sql/keycaches.cc'
--- a/sql/keycaches.cc	2010-07-08 21:42:23 +0000
+++ b/sql/keycaches.cc	2011-03-30 14:46:51 +0000
@@ -157,7 +157,3 @@ bool process_key_caches(process_key_cach
   return 0;
 }
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class I_List_iterator<NAMED_ILINK>;
-#endif
-

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-03-29 08:01:07 +0000
+++ b/sql/mysqld.cc	2011-03-30 14:46:51 +0000
@@ -8130,20 +8130,6 @@ void refresh_status(THD *thd)
   This section should go away soon
 *****************************************************************************/
 
-/*****************************************************************************
-  Instantiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-/* Used templates */
-template class I_List<THD>;
-template class I_List_iterator<THD>;
-template class I_List<i_string>;
-template class I_List<i_string_pair>;
-template class I_List<Statement>;
-template class I_List_iterator<Statement>;
-#endif
-
 #ifdef HAVE_PSI_INTERFACE
 #ifdef HAVE_MMAP
 PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active, key_LOCK_pool;

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2011-03-22 11:44:40 +0000
+++ b/sql/opt_range.cc	2011-03-30 14:46:51 +0000
@@ -11944,12 +11944,3 @@ void QUICK_GROUP_MIN_MAX_SELECT::dbug_du
 
 
 #endif /* !DBUG_OFF */
-
-/*****************************************************************************
-** Instantiate templates 
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<QUICK_RANGE>;
-template class List_iterator<QUICK_RANGE>;
-#endif

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-03-29 14:56:01 +0000
+++ b/sql/rpl_slave.cc	2011-03-30 14:46:51 +0000
@@ -5486,11 +5486,6 @@ bool rpl_master_erroneous_autoinc(THD *t
   return FALSE;
 }
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class I_List_iterator<i_string>;
-template class I_List_iterator<i_string_pair>;
-#endif
-
 /**
   a copy of active_mi->rli->slave_skip_counter, for showing in SHOW VARIABLES,
   INFORMATION_SCHEMA.GLOBAL_VARIABLES and @@sql_slave_skip_counter without

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2011-03-23 22:51:19 +0000
+++ b/sql/sql_acl.cc	2011-03-30 14:46:51 +0000
@@ -7191,17 +7191,6 @@ bool sp_grant_privileges(THD *thd, const
 }
 
 
-/*****************************************************************************
-  Instantiate used templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List_iterator<LEX_COLUMN>;
-template class List_iterator<LEX_USER>;
-template class List<LEX_COLUMN>;
-template class List<LEX_USER>;
-#endif
-
 /**
   Validate if a user can proxy as another user
 

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2011-03-24 08:00:03 +0000
+++ b/sql/sql_class.cc	2011-03-30 14:46:51 +0000
@@ -67,23 +67,6 @@ char empty_c_string[1]= {0};    /* used 
 
 const char * const THD::DEFAULT_WHERE= "field list";
 
-
-/*****************************************************************************
-** Instansiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-/* Used templates */
-template class List<Key>;
-template class List_iterator<Key>;
-template class List<Key_part_spec>;
-template class List_iterator<Key_part_spec>;
-template class List<Alter_drop>;
-template class List_iterator<Alter_drop>;
-template class List<Alter_column>;
-template class List_iterator<Alter_column>;
-#endif
-
 /****************************************************************************
 ** User variables
 ****************************************************************************/

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2011-02-15 17:14:15 +0000
+++ b/sql/sql_insert.cc	2011-03-30 14:46:51 +0000
@@ -4138,17 +4138,3 @@ void select_create::abort_result_set()
   }
   DBUG_VOID_RETURN;
 }
-
-
-/*****************************************************************************
-  Instansiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List_iterator_fast<List_item>;
-#ifndef EMBEDDED_LIBRARY
-template class I_List<Delayed_insert>;
-template class I_List_iterator<Delayed_insert>;
-template class I_List<delayed_row>;
-#endif /* EMBEDDED_LIBRARY */
-#endif /* HAVE_EXPLICIT_TEMPLATE_INSTANTIATION */

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-03-29 07:20:17 +0000
+++ b/sql/sql_select.cc	2011-03-30 14:46:51 +0000
@@ -12009,13 +12009,6 @@ public:
   COND_CMP(Item *a,Item_func *b) :and_level(a),cmp_func(b) {}
 };
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class I_List<COND_CMP>;
-template class I_List_iterator<COND_CMP>;
-template class List<Item_func_match>;
-template class List_iterator<Item_func_match>;
-#endif
-
 
 /**
   Find the multiple equality predicate containing a field.

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2011-03-28 08:10:39 +0000
+++ b/sql/sql_show.cc	2011-03-30 14:46:51 +0000
@@ -1751,10 +1751,6 @@ public:
   CSET_STRING query_string;
 };
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class I_List<thread_info>;
-#endif
-
 static const char *thread_state_info(THD *tmp)
 {
 #ifndef EMBEDDED_LIBRARY
@@ -7522,11 +7518,6 @@ ST_SCHEMA_TABLE schema_tables[]=
 };
 
 
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List_iterator_fast<char>;
-template class List<char>;
-#endif
-
 int initialize_schema_table(st_plugin_int *plugin)
 {
   ST_SCHEMA_TABLE *schema_table;

=== modified file 'sql/sys_vars.h'
--- a/sql/sys_vars.h	2011-03-09 20:54:55 +0000
+++ b/sql/sys_vars.h	2011-03-30 14:46:51 +0000
@@ -1725,16 +1725,3 @@ public:
   virtual bool global_update(THD *thd, set_var *var);
 };
 
-/****************************************************************************
-  Used templates
-****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<set_var_base>;
-template class List_iterator_fast<set_var_base>;
-template class Sys_var_unsigned<uint, GET_UINT, SHOW_INT>;
-template class Sys_var_unsigned<ulong, GET_ULONG, SHOW_LONG>;
-template class Sys_var_unsigned<ha_rows, GET_HA_ROWS, SHOW_HA_ROWS>;
-template class Sys_var_unsigned<ulonglong, GET_ULL, SHOW_LONGLONG>;
-#endif
-

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2011-03-28 08:10:39 +0000
+++ b/sql/table.cc	2011-03-30 14:46:51 +0000
@@ -5488,13 +5488,3 @@ bool is_simple_order(ORDER *order)
   }
   return TRUE;
 }
-
-
-/*****************************************************************************
-** Instansiate templates
-*****************************************************************************/
-
-#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
-template class List<String>;
-template class List_iterator<String>;
-#endif

=== modified file 'unittest/gunit/CMakeLists.txt'
--- a/unittest/gunit/CMakeLists.txt	2011-02-17 14:39:47 +0000
+++ b/unittest/gunit/CMakeLists.txt	2011-03-30 14:46:51 +0000
@@ -25,10 +25,6 @@ ELSE()
 ENDIF() 
 
 IF(CMAKE_COMPILER_IS_GNUCXX)
-  # Remove -fno-implicit-templates, gunit sources cannot be compiled with it.
-  STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS
-    ${CMAKE_CXX_FLAGS})
-
   # MySQL is often compiled/linked with gcc rather than g++
   # (to avoid dependencies on libstdc++.so)
   # This does not work for googletest binaries.


Attachment: [text/bzr-bundle] bzr/tor.didriksen@oracle.com-20110330144651-mbn0890g8zwzdeg2.bundle
Thread
bzr commit into mysql-trunk branch (tor.didriksen:3349) Tor Didriksen30 Mar