Blame SOURCES/mysql-connector-odbc-drop-odbc-linking-from-driver.patch

18ac09
This patch drops the linking of odbc library to the driver as it's not needed.
18ac09
Just linking against odbcinst is enough.
18ac09
18ac09
The reason is the same as the one explained here:
18ac09
https://www.postgresql.org/message-id/1769926.65KUyECjFr@nb.usersys.redhat.com
18ac09
18ac09
This fixes a problem in isql under s390x architecture.
18ac09
18ac09
More information also here:
18ac09
https://bugzilla.redhat.com/show_bug.cgi?id=1561400
18ac09
18ac09
diff -Naur mysql-connector-odbc-5.2.5-src-orig/cmake/FindODBC.cmake mysql-connector-odbc-5.2.5-src/cmake/FindODBC.cmake
18ac09
--- mysql-connector-odbc-5.2.5-src-orig/cmake/FindODBC.cmake	2018-04-10 16:14:29.219980686 +0200
18ac09
+++ mysql-connector-odbc-5.2.5-src/cmake/FindODBC.cmake	2018-04-11 15:59:13.064365508 +0200
18ac09
@@ -106,6 +106,8 @@
18ac09
 
18ac09
       IF(NOT ODBC_LIB_DIR)
18ac09
         _FIX_NOPREFIX(ODBC_LINK_FLAGS ${ODBC_CONFIG} "--libs")
18ac09
+        _FIX_NOPREFIX(ODBC_LIB_PREFIX ${ODBC_CONFIG} "--lib-prefix")
18ac09
+        SET(ODBCINST_LINK_FLAGS "-L${ODBC_LIB_PREFIX} -lodbcinst")
18ac09
       ENDIF(NOT ODBC_LIB_DIR)
18ac09
 
18ac09
     ENDIF(NOT ODBC_CONFIG)
18ac09
diff -Naur mysql-connector-odbc-5.2.5-src-orig/driver/CMakeLists.txt mysql-connector-odbc-5.2.5-src/driver/CMakeLists.txt
18ac09
--- mysql-connector-odbc-5.2.5-src-orig/driver/CMakeLists.txt	2018-04-10 16:14:29.212980622 +0200
18ac09
+++ mysql-connector-odbc-5.2.5-src/driver/CMakeLists.txt	2018-04-11 16:01:41.813735855 +0200
18ac09
@@ -57,7 +57,7 @@
18ac09
 	TARGET_LINK_LIBRARIES(${DRIVER_NAME} myodbc3u
18ac09
 				${MYSQL_CLIENT_LIBS} ${ODBCINSTLIB} ${SECURE32_LIB})
18ac09
 ELSE(WIN32)
18ac09
-	SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ODBC_LINK_FLAGS}")
18ac09
+	SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ODBCINST_LINK_FLAGS}")
18ac09
 	TARGET_LINK_LIBRARIES(${DRIVER_NAME} ${MYSQL_CLIENT_LIBS} ${CMAKE_THREAD_LIBS_INIT} m)
18ac09
 	TARGET_LINK_LIBRARIES(${DRIVER_NAME} myodbc3u)
18ac09