mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#18235669 MYSQL_CONFIG TO PROVIDE R FLAG ON SOLARIS
'mysql_config --libs' outputs -L/path/to/library on SunOS we also want it to output '-R/path/to/library' in order to find libraries at runtime.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -158,6 +158,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
|||||||
IF(OSLIBS)
|
IF(OSLIBS)
|
||||||
LIST(REMOVE_DUPLICATES OSLIBS)
|
LIST(REMOVE_DUPLICATES OSLIBS)
|
||||||
TARGET_LINK_LIBRARIES(${TARGET} ${OSLIBS})
|
TARGET_LINK_LIBRARIES(${TARGET} ${OSLIBS})
|
||||||
|
MESSAGE(STATUS "Library ${TARGET} depends on OSLIBS ${OSLIBS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Make the generated dummy source file depended on all static input
|
# Make the generated dummy source file depended on all static input
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -228,6 +228,11 @@ SET(pkglibdir ${prefix}/${INSTALL_LIBDIR})
|
|||||||
SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR})
|
SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR})
|
||||||
SET(localstatedir ${MYSQL_DATADIR})
|
SET(localstatedir ${MYSQL_DATADIR})
|
||||||
|
|
||||||
|
SET(RPATH_OPTION "")
|
||||||
|
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||||
|
SET(RPATH_OPTION "-R$pkglibdir")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# some scripts use @TARGET_LINUX@
|
# some scripts use @TARGET_LINUX@
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
SET(TARGET_LINUX "true")
|
SET(TARGET_LINUX "true")
|
||||||
@@ -312,6 +317,9 @@ IF(WIN32)
|
|||||||
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT Server_Scripts)
|
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT Server_Scripts)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ELSE()
|
ELSE()
|
||||||
|
# Configure this one, for testing, but do not install it.
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_config.pl.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY)
|
||||||
# On Unix, most of the files end up in the bin directory
|
# On Unix, most of the files end up in the bin directory
|
||||||
SET(mysql_config_COMPONENT COMPONENT Development)
|
SET(mysql_config_COMPONENT COMPONENT Development)
|
||||||
SET(BIN_SCRIPTS
|
SET(BIN_SCRIPTS
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# -*- cperl -*-
|
# -*- cperl -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -189,7 +189,7 @@ if ( $^O eq "MSWin32" )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
my $linkpath = "-L$pkglibdir";
|
my $linkpath = "-L$pkglibdir @RPATH_OPTION@";
|
||||||
@lib_opts = ($linkpath,"-lmysqlclient");
|
@lib_opts = ($linkpath,"-lmysqlclient");
|
||||||
@lib_r_opts = ($linkpath,"-lmysqlclient_r");
|
@lib_r_opts = ($linkpath,"-lmysqlclient_r");
|
||||||
@lib_e_opts = ($linkpath,"-lmysqld");
|
@lib_e_opts = ($linkpath,"-lmysqld");
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -110,10 +110,10 @@ fi
|
|||||||
|
|
||||||
# Create options
|
# Create options
|
||||||
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
|
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
|
||||||
libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
|
libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
|
||||||
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
|
libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
|
||||||
libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
|
libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
|
||||||
embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
|
embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
|
||||||
|
|
||||||
if [ -r "$pkglibdir/libmygcc.a" ]; then
|
if [ -r "$pkglibdir/libmygcc.a" ]; then
|
||||||
# When linking against the static library with a different version of GCC
|
# When linking against the static library with a different version of GCC
|
||||||
|
Reference in New Issue
Block a user