summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-06-19 21:46:44 +0500
committerunknown <svoj@mysql.com>2005-06-19 21:46:44 +0500
commit2c8ee686d8e626c4ccc54fd0534d5b4740d114ba (patch)
treefda3bfa7da994908f408724b76f0f38f71920c13 /sql
parentdb10586e809862f90e42932f61a421f2ca1dc46b (diff)
downloadmariadb-git-2c8ee686d8e626c4ccc54fd0534d5b4740d114ba.tar.gz
WL#2286 - Compile MySQL w/YASSL support
Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++. These compilers have problem with implicit template instantiation in archives (libyassl.a, libtaocrypt.a). Instantiate templates explicitly. Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines __cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined. configure.in: Better CXX_VERSION guessing. EXPLICIT_TEMPLATE_INSTANTIATION macro indicates whether to instantiate templates explicitly. Instantiate templates explicitly on MIPSpro, Compaq, Forte. extra/yassl/src/crypto_wrapper.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/src/template_instnt.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. More portable templates instantiation. extra/yassl/src/yassl_int.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. More portable templates instantiation. extra/yassl/taocrypt/include/runtime.hpp: Fix for link failure on powermacg5 (gcc 3.3). __cxa_pure_virtual must never be inlined. extra/yassl/taocrypt/src/algebra.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/taocrypt/src/integer.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/taocrypt/src/template_instnt.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/field.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/item.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/item_buff.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/mysqld.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/opt_range.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/set_var.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/slave.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_acl.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_class.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_insert.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_map.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_select.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_show.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/table.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
Diffstat (limited to 'sql')
-rw-r--r--sql/field.cc2
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item_buff.cc2
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/opt_range.cc2
-rw-r--r--sql/set_var.cc2
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_acl.cc2
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_insert.cc4
-rw-r--r--sql/sql_map.cc2
-rw-r--r--sql/sql_select.cc2
-rw-r--r--sql/sql_show.cc4
-rw-r--r--sql/table.cc2
14 files changed, 16 insertions, 16 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 6e63dad41bb..8324d4eb725 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -38,7 +38,7 @@
Instansiate templates and static variables
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<create_field>;
template class List_iterator<create_field>;
#endif
diff --git a/sql/item.cc b/sql/item.cc
index e7feeaa4289..8a7d00e2841 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5387,7 +5387,7 @@ void Item_result_field::cleanup()
** Instantiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<Item>;
template class List_iterator<Item>;
template class List_iterator_fast<Item>;
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index 688e4cca846..e62a93f694e 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -146,7 +146,7 @@ bool Item_decimal_buff::cmp()
** Instansiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<Item_buff>;
template class List_iterator<Item_buff>;
#endif
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 9c5f33f849d..a27171e7891 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -7072,7 +7072,7 @@ static void create_pid_file()
Instantiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
/* Used templates */
template class I_List<THD>;
template class I_List_iterator<THD>;
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 5732e156a7c..7d8bfe61692 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -8918,7 +8918,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::dbug_dump(int indent, bool verbose)
** Instantiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<QUICK_RANGE>;
template class List_iterator<QUICK_RANGE>;
#endif
diff --git a/sql/set_var.cc b/sql/set_var.cc
index b22c0924de1..71b0cad06da 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -3406,7 +3406,7 @@ bool process_key_caches(int (* func) (const char *name, KEY_CACHE *))
Used templates
****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<set_var_base>;
template class List_iterator_fast<set_var_base>;
template class I_List_iterator<NAMED_LIST>;
diff --git a/sql/slave.cc b/sql/slave.cc
index 60812469671..3094276cfaf 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -5002,7 +5002,7 @@ end:
}
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class I_List_iterator<i_string>;
template class I_List_iterator<i_string_pair>;
#endif
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 04da0dd5eb5..14aaab03682 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -5325,7 +5325,7 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name,
Instantiate used templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List_iterator<LEX_COLUMN>;
template class List_iterator<LEX_USER>;
template class List<LEX_COLUMN>;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 165ce61d5d1..eeac69aad6f 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -49,7 +49,7 @@ char internal_table_name[2]= "*";
** Instansiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
/* Used templates */
template class List<Key>;
template class List_iterator<Key>;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 5ca75554c6f..a963af4c6e3 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2362,11 +2362,11 @@ void select_create::abort()
Instansiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef 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 /* __GNUC__ */
+#endif /* EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/sql/sql_map.cc b/sql/sql_map.cc
index 9346f3df305..726bd48ab19 100644
--- a/sql/sql_map.cc
+++ b/sql/sql_map.cc
@@ -138,7 +138,7 @@ void unmap_file(mapped_files *map)
** Instansiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
/* Used templates */
template class I_List<mapped_files>;
template class I_List_iterator<mapped_files>;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 80597aff3ac..bd646471133 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -6275,7 +6275,7 @@ public:
COND_CMP(Item *a,Item_func *b) :and_level(a),cmp_func(b) {}
};
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class I_List<COND_CMP>;
template class I_List_iterator<COND_CMP>;
template class List<Item_func_match>;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index aaa34dc4cb7..9503bc9ec89 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1102,7 +1102,7 @@ public:
char *query;
};
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class I_List<thread_info>;
#endif
@@ -3879,7 +3879,7 @@ ST_SCHEMA_TABLE schema_tables[]=
};
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List_iterator_fast<char>;
template class List<char>;
#endif
diff --git a/sql/table.cc b/sql/table.cc
index 33cee79eb61..7b558b22e08 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2236,7 +2236,7 @@ const char *Field_iterator_view::name()
** Instansiate templates
*****************************************************************************/
-#ifdef __GNUC__
+#ifdef EXPLICIT_TEMPLATE_INSTANTIATION
template class List<String>;
template class List_iterator<String>;
#endif