You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.8 KiB
56 lines
1.8 KiB
From: Modestas Vainius <modestas@vainius.eu>
|
|
Subject: Support GNU/kFreeBSD
|
|
GNU/kFreeBSD = FreeBSD kernel + userspace with glibc,
|
|
and Linux.cmake doesn't contain anything OS specific.
|
|
.
|
|
Here are outputs of /bin/uname:
|
|
.
|
|
$ uname -p
|
|
i386
|
|
$ uname -o
|
|
GNU/kFreeBSD
|
|
$ uname -s
|
|
GNU/kFreeBSD
|
|
$ uname -r
|
|
5.4-1-686
|
|
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340764
|
|
|
|
--- a/Modules/CMakeDetermineSystem.cmake
|
|
+++ b/Modules/CMakeDetermineSystem.cmake
|
|
@@ -25,6 +25,7 @@
|
|
# HP-UX HP-UX
|
|
# IRIX IRIX
|
|
# Linux Linux
|
|
+# GNU/kFreeBSD GNU/kFreeBSD
|
|
# NetBSD NetBSD
|
|
# OpenBSD OpenBSD
|
|
# OFS/1 (Digital Unix) OSF1
|
|
@@ -121,6 +122,11 @@
|
|
SET(${_PREFIX}_NAME BSDOS)
|
|
ENDIF(${_PREFIX}_NAME MATCHES BSD.OS)
|
|
|
|
+ # fix for GNU/kFreeBSD, remove the GNU/
|
|
+ IF(${_PREFIX}_NAME MATCHES kFreeBSD)
|
|
+ SET(${_PREFIX}_NAME kFreeBSD)
|
|
+ ENDIF(${_PREFIX}_NAME MATCHES kFreeBSD)
|
|
+
|
|
# fix for CYGWIN which has windows version in it
|
|
IF(${_PREFIX}_NAME MATCHES CYGWIN)
|
|
SET(${_PREFIX}_NAME CYGWIN)
|
|
--- a/Modules/Platform/kFreeBSD.cmake
|
|
+++ b/Modules/Platform/kFreeBSD.cmake
|
|
@@ -1,12 +1,2 @@
|
|
# kFreeBSD looks just like Linux.
|
|
-SET(CMAKE_DL_LIBS "dl")
|
|
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
|
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
|
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
|
|
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
|
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
|
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
|
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
|
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
|
|
-
|
|
-INCLUDE(Platform/UnixPaths)
|
|
+INCLUDE(Platform/Linux)
|