From 0a6edfad1fa4a98880282af7a553be7b427c0882 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich <svoj@sun.com> Date: Fri, 3 Jul 2009 15:06:19 +0500 Subject: [PATCH] On Solaris shared objects must be linked from PIC code. --- storage/innodb_plugin/plug.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in index a49bc2fea6..da0eee90f5 100644 --- a/storage/innodb_plugin/plug.in +++ b/storage/innodb_plugin/plug.in @@ -50,11 +50,14 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ CFLAGS="$CFLAGS -DUNIV_SOLARIS";; esac INNODB_DYNAMIC_CFLAGS="-DMYSQL_DYNAMIC_PLUGIN" - case "$target_cpu" in - x86_64) + case "$target_cpu---$target_os" in + x86_64---*) # The AMD64 ABI forbids absolute addresses in shared libraries ;; - *86) + *---solaris*|*---SunOS*) + # Shared objects must be linked from PIC code on Solaris. + ;; + *86---) # Use absolute addresses on IA-32 INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic" ;; -- 2.30.9