Bladeren bron

Change bootstrap profile to target 4.0 framework. Bump system mono requirement to version 3.2 at least

Marek Safar 11 jaren geleden
bovenliggende
commit
dfebf124e5

+ 3 - 16
mcs/build/common/Consts.cs.in

@@ -58,22 +58,11 @@ static class Consts
 	public const string VsVersion = "0.0.0.0"; // Useless ?
 	public const string VsFileVersion = "10.0.0.0"; // TODO:
 #elif NET_3_5
-	// Versions of .NET Framework 3.5 RTM
-	public const string FxVersion = "3.5.0.0";
-	public const string FxFileVersion = "3.5.21022.8";
-	
-	public const string VsVersion = "0.0.0.0"; // Useless ?
+	#error Profile NET_3_5 is not supported.
 #elif NET_3_0
-	public const string FxVersion = "3.0.0.0";
-	public const string VsVersion = "8.0.0.0";
-	public const string FxFileVersion = "3.0.4506.648";
-	public const string VsFileVersion = "6.0.6001.17014";
+	#error Profile NET_3_0 is not supported.
 #elif NET_2_0
-	// Versions of .NET Framework 2.0 RTM
-	public const string FxVersion = "2.0.0.0";
-	public const string VsVersion = "8.0.0.0";
-	public const string FxFileVersion = "2.0.50727.1433";
-	public const string VsFileVersion = "8.0.50727.1433";
+	#error Profile NET_2_0 is not supported.
 #elif NET_1_1
 	#error Profile NET_1_1 is not supported.
 #elif NET_1_0
@@ -124,7 +113,5 @@ static class Consts
 	public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
 #elif NET_2_1
 	public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
-#elif NET_2_0
-	public const string AssemblySystem_Core = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
 #endif
 }

+ 17 - 0
mcs/build/common/basic-profile-check.cs

@@ -1,3 +1,5 @@
+using System;
+
 class X {
 	// Check installed compiler
 	static void Generic<T> ()
@@ -20,6 +22,21 @@ class X {
 		if (o == null)
 			return 1;
 
+		var consts = o.GetType ().Assembly.GetType ("Consts");
+		if (consts == null)
+			return 2;
+
+		var field = consts.GetField ("MonoVersion");
+		if (field == null)
+			return 3;
+
+		Version version;
+		if (!Version.TryParse (field.GetValue (null) as string, out version))
+			return 4;
+
+		if (version < new Version (3, 2))
+			return 5;
+
 		return 0;
 	}
 }

+ 1 - 1
mcs/build/platforms/darwin.make

@@ -9,7 +9,7 @@ PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
 PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,
 
-EXTERNAL_MCS = gmcs
+EXTERNAL_MCS = mcs
 EXTERNAL_MBAS = mbas
 EXTERNAL_RUNTIME = mono
 #ILDISASM = monodis

+ 1 - 1
mcs/build/platforms/linux.make

@@ -9,7 +9,7 @@ PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
 PLATFORM_TEST_HARNESS_EXCLUDES =
 
-EXTERNAL_MCS = gmcs
+EXTERNAL_MCS = mcs
 EXTERNAL_MBAS = mbas
 EXTERNAL_RUNTIME = mono
 #ILDISASM = monodis

+ 1 - 1
mcs/build/platforms/win32.make

@@ -9,7 +9,7 @@ PLATFORM_RUNTIME =
 PLATFORM_CORLIB = mscorlib.dll
 PLATFORM_TEST_HARNESS_EXCLUDES =
 
-EXTERNAL_MCS = gmcs
+EXTERNAL_MCS = mcs
 EXTERNAL_MBAS = vbc.exe
 EXTERNAL_RUNTIME =
 

+ 3 - 3
mcs/build/profiles/basic.make

@@ -18,11 +18,11 @@ endif
 
 MCS = $(with_mono_path) $(INTERNAL_GMCS)
 
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_BASIC -nowarn:1699 -d:MONO -d:DISABLE_CAS_USE
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -d:DISABLE_CAS_USE
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
 NO_INSTALL = yes
-FRAMEWORK_VERSION = 2.0
+FRAMEWORK_VERSION = 4.0
 
 # Compiler all using same bootstrap compiler
 LIBRARY_COMPILE = $(BOOT_COMPILE)
@@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp
 		$(MAKE) -s do-profile-check-monolite ; \
 	    else \
 		echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
-                echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \
+                echo "*** You need Mono version 3.2 or better installed to build MCS" 1>&2 ; \
                 echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
 	        exit 1; fi; fi
 

+ 1 - 10
mcs/class/System.Core/basic_System.Core.dll.sources

@@ -1,10 +1 @@
-#include System.Core.dll.sources
-
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-../../build/common/MonoTODOAttribute.cs
-../Mono.Security/Mono.Security.Cryptography/CryptoTools.cs
-../Mono.Security/Mono.Security.Cryptography/SymmetricTransform.cs
-../corlib/System.Threading/AtomicBoolean.cs
-../corlib/System.Collections.Generic/CollectionDebuggerView.cs
-../corlib/System.Collections/HashPrimeNumbers.cs
+#include net_4_0_System.Core.dll.sources

+ 0 - 6
mcs/class/corlib/Makefile

@@ -8,10 +8,6 @@ LIBRARY_NAME = mscorlib.dll
 LIB_MCS_FLAGS = $(RESOURCE_FILES:%=-resource:%)
 #LIBRARY_USE_INTERMEDIATE_FILE = yes
 
-ifeq (basic, $(PROFILE))
-
-else
-
 ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
 LIB_MCS_FLAGS += --runtime:v2
 else
@@ -22,8 +18,6 @@ $(error Unknown framework version)
 endif
 endif
 
-endif
-
 LIBRARY_COMPILE = $(BOOT_COMPILE)
 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 

+ 1 - 1
mcs/class/corlib/System/Environment.cs

@@ -56,7 +56,7 @@ namespace System {
 		 * of icalls, do not require an increment.
 		 */
 #pragma warning disable 169
-		private const int mono_corlib_version = 112;
+		private const int mono_corlib_version = 113;
 #pragma warning restore 169
 
 		[ComVisible (true)]

+ 1 - 1
mono/metadata/appdomain.c

@@ -78,7 +78,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 112
+#define MONO_CORLIB_VERSION 113
 
 typedef struct
 {