1Author: Pino Toscano <pino@debian.org>
2Subject: cmake options for GNU/Hurd
3Bug: http://bugs.mysql.com/bug.php?id=64685
4Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651002
5Last-Update: 2012-03-18
6Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
7--- /dev/null
8+++ b/cmake/os/GNU.cmake
9@@ -0,0 +1,20 @@
10+# This file includes GNU/Hurd specific options and quirks, related to system checks
11+
12+INCLUDE(CheckSymbolExists)
13+
14+SET(_GNU_SOURCE 1)
15+
16+# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
17+FOREACH(LANG C CXX)
18+  STRING(REPLACE "-rdynamic" ""
19+  CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
20+  "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}"
21+  )
22+ENDFOREACH()
23+
24+# Ensure we have clean build for shared libraries
25+# without unresolved symbols
26+SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
27+
28+# 64 bit file offset support flag
29+SET(_FILE_OFFSET_BITS 64)
30--- a/mysql-test/lib/My/Platform.pm
31+++ b/mysql-test/lib/My/Platform.pm
32@@ -110,6 +110,9 @@ sub check_socket_path_length {
33   # This may not be true, but we can't test for it on AIX due to Perl bug
34   # See Bug #45771
35   return 0 if ($^O eq 'aix');
36+  # Similarly the path length is hidden.
37+  # See Debian bug #651002
38+  return 0 if ($^O eq 'gnu');
39
40   require IO::Socket::UNIX;
41
42