Skip to content

Commit 5d0486f

Browse files
committed
2009-06-15 Zoltan Varga <[email protected]>
* CMakeLists.txt: Add mips support. svn path=/trunk/mono/; revision=136104
1 parent 6acca86 commit 5d0486f

File tree

2 files changed

+46
-35
lines changed

2 files changed

+46
-35
lines changed

CMakeLists.txt

+42-35
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 2.6.4)
55
# - It would be nice to have a per-target VERBOSE setting
66
# - or a way to change the setting name to 'V' and the output to CC <src>
77
# to be similar to the current build output
8+
# - Add a cache to the manual checks
89

910
# We use lowercase commands as advocated by the kde cmake coding style
1011

@@ -497,19 +498,22 @@ check_c_source_compiles("
497498
void main () {}
498499
" GCC)
499500

500-
ac_msg_checking("for isinf")
501-
set(compiles)
502-
check_c_source_compiles("
501+
if(NOT HAVE_ISINF)
502+
ac_msg_checking("for isinf")
503+
set(compiles)
504+
check_c_source_compiles("
503505
#include <math.h>
504506
void main () {
505507
int f = isinf (1);
506508
}
507509
" compiles)
508-
if(compiles)
509-
ac_msg_result(yes)
510-
ac_define(HAVE_ISINF 1 "isinf available")
511-
else()
512-
ac_msg_result(no)
510+
if(compiles)
511+
ac_msg_result(yes)
512+
ac_define(HAVE_ISINF 1 "isinf available")
513+
set(HAVE_ISINF 1 CACHE BOOL "Have the isinf function")
514+
else()
515+
ac_msg_result(no)
516+
endif()
513517
endif()
514518

515519
# not 64 bit clean in cross-compile
@@ -559,12 +563,16 @@ endif()
559563
# A sanity check to catch cases where the package was unpacked
560564
# with an ancient tar program (Solaris)
561565
#
562-
ac_msg_checking("integrity of package")
563-
if(EXISTS ${srcdir}/${mcsdir}/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs)
564-
ac_msg_result(ok)
565-
else()
566-
set(errorm "Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details")
567-
ac_msg_error(${errorm})
566+
set(solaris-tar-check yes CACHE BOOL "Enable/disable solaris tar check")
567+
568+
if(solaris-tar-check)
569+
ac_msg_checking("integrity of package")
570+
if(EXISTS ${srcdir}/${mcsdir}/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs)
571+
ac_msg_result(ok)
572+
else()
573+
set(errorm "Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details")
574+
ac_msg_error(${errorm})
575+
endif()
568576
endif()
569577

570578
set(mcs_topdir ${top_srcdir}/${mcsdir})
@@ -2105,6 +2113,26 @@ elseif(host MATCHES "arm.*-linux.*")
21052113
set(ACCESS_UNALIGNED no)
21062114
set(JIT_SUPPORTED yes)
21072115
set(jit_wanted true)
2116+
elseif(host MATCHES "mips.*")
2117+
set(TARGET MIPS)
2118+
set(arch_target mips)
2119+
set(ACCESS_UNALIGNED no)
2120+
set(JIT_SUPPORTED yes)
2121+
set(jit_wanted true)
2122+
### ac_msg_checking(for mips n32)
2123+
### AC_TRY_COMPILE([], [
2124+
### void main () {
2125+
### #if _MIPS_SIM != _ABIN32
2126+
### #error Not mips n32
2127+
### #endif
2128+
### }
2129+
### ],[
2130+
### ac_msg_result(yes)
2131+
### set(sizeof_register 8)
2132+
### ],[
2133+
### ac_msg_result(no)
2134+
### ])
2135+
### ;;
21082136
else()
21092137
message(FATAL_ERROR "Host ${host} not yet supported by the cmake build.")
21102138
endif()
@@ -2123,27 +2151,6 @@ endif()
21232151
# set(TARGET MIPS;)
21242152
# set(ACCESS_UNALIGNED "no")
21252153
# ;;
2126-
### mips*)
2127-
### set(TARGET MIPS;)
2128-
### set(arch_target mips;)
2129-
### set(ACCESS_UNALIGNED "no")
2130-
### set(JIT_SUPPORTED yes)
2131-
### set(jit_wanted true)
2132-
2133-
### ac_msg_checking(for mips n32)
2134-
### AC_TRY_COMPILE([], [
2135-
### void main () {
2136-
### #if _MIPS_SIM != _ABIN32
2137-
### #error Not mips n32
2138-
### #endif
2139-
### }
2140-
### ],[
2141-
### ac_msg_result(yes)
2142-
### set(sizeof_register 8)
2143-
### ],[
2144-
### ac_msg_result(no)
2145-
### ])
2146-
### ;;
21472154
### i*86-*-*)
21482155
### set(TARGET X86;)
21492156
### set(arch_target x86;)

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2009-06-15 Zoltan Varga <[email protected]>
2+
3+
* CMakeLists.txt: Add mips support.
4+
15
2009-06-14 Zoltan Varga <[email protected]>
26

37
* scripts/CMakeLists.txt: New file.

0 commit comments

Comments
 (0)