[ros-diffs] [hyperion] 41374: modified ReactOS-generic.rbuild modified ReactOS-i386.rbuild modified tools/rbuild/backend/mingw/mingw.cpp Don't feed GCC options in MSC Minor detection fixes Support for the Microsoft compiler is now fully functional: now get off your grotesquely fat asses and start fixing code so that it compiles with it TODO: make it fully functional for real (PCH, full dependencies); Microsoft linker support

hyperion at svn.reactos.org hyperion at svn.reactos.org
Wed Jun 10 21:12:19 CEST 2009


Author: hyperion
Date: Wed Jun 10 23:12:18 2009
New Revision: 41374

URL: http://svn.reactos.org/svn/reactos?rev=41374&view=rev
Log:
modified   ReactOS-generic.rbuild
modified   ReactOS-i386.rbuild
modified   tools/rbuild/backend/mingw/mingw.cpp
   Don't feed GCC options in MSC
   Minor detection fixes

Support for the Microsoft compiler is now fully functional: now get off your grotesquely fat asses and start fixing code so that it compiles with it

TODO: make it fully functional for real (PCH, full dependencies); Microsoft linker support

Modified:
    trunk/reactos/ReactOS-generic.rbuild
    trunk/reactos/ReactOS-i386.rbuild
    trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp

Modified: trunk/reactos/ReactOS-generic.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-generic.rbuild?rev=41374&r1=41373&r2=41374&view=diff
==============================================================================
--- trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-generic.rbuild [iso-8859-1] Wed Jun 10 23:12:18 2009
@@ -121,5 +121,5 @@
 		<xi:include href="tools/tools.rbuild" />
 	</directory>
 
-	<compilerflag compiler="cxx">-Wno-non-virtual-dtor</compilerflag>
+	<compilerflag compiler="cxx" compilerset="gcc">-Wno-non-virtual-dtor</compilerflag>
 </group>

Modified: trunk/reactos/ReactOS-i386.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-i386.rbuild?rev=41374&r1=41373&r2=41374&view=diff
==============================================================================
--- trunk/reactos/ReactOS-i386.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-i386.rbuild [iso-8859-1] Wed Jun 10 23:12:18 2009
@@ -19,30 +19,64 @@
 	<property name="NTOSKRNL_SHARED" value="-file-alignment=0x1000 -section-alignment=0x1000 -shared"/>
 	<property name="PLATFORM" value="PC"/>
 
-	<if property="OPTIMIZE" value="1">
-		<compilerflag>-Os</compilerflag>
-		<compilerflag>-ftracer</compilerflag>
-		<compilerflag>-momit-leaf-frame-pointer</compilerflag>
-	</if>
-	<if property="OPTIMIZE" value="2">
-		<compilerflag>-Os</compilerflag>
-	</if>
-	<if property="OPTIMIZE" value="3">
-		<compilerflag>-O1</compilerflag>
-	</if>
-	<if property="OPTIMIZE" value="4">
-		<compilerflag>-O2</compilerflag>
-	</if>
-	<if property="OPTIMIZE" value="5">
-		<compilerflag>-O3</compilerflag>
-	</if>
+	<group compilerset="gcc">
+		<if property="OPTIMIZE" value="1">
+			<compilerflag>-Os</compilerflag>
+			<compilerflag>-ftracer</compilerflag>
+			<compilerflag>-momit-leaf-frame-pointer</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="2">
+			<compilerflag>-Os</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="3">
+			<compilerflag>-O1</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="4">
+			<compilerflag>-O2</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="5">
+			<compilerflag>-O3</compilerflag>
+		</if>
 
-	<compilerflag>-mpreferred-stack-boundary=2</compilerflag>
-	<compilerflag>-fno-strict-aliasing</compilerflag>
-	<compilerflag>-Wno-strict-aliasing</compilerflag>
-	<compilerflag>-Wpointer-arith</compilerflag>
-	<compilerflag>-Wno-multichar</compilerflag>
-	<!-- compilerflag>-H</compilerflag>    enable this for header traces -->
-	<linkerflag>-disable-stdcall-fixup</linkerflag>
+		<compilerflag>-mpreferred-stack-boundary=2</compilerflag>
+		<compilerflag>-fno-strict-aliasing</compilerflag>
+		<compilerflag>-Wno-strict-aliasing</compilerflag>
+		<compilerflag>-Wpointer-arith</compilerflag>
+		<compilerflag>-Wno-multichar</compilerflag>
+		<!-- compilerflag>-H</compilerflag>    enable this for header traces -->
+	</group>
+
+	<group compilerset="msc">
+		<if property="OPTIMIZE" value="1">
+			<compilerflag>/O1</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="2">
+			<compilerflag>/O2</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="3">
+			<compilerflag>/Ox /GS-</compilerflag>
+			<compilerflag>/Ot</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="4">
+			<compilerflag>/Ox /GS-</compilerflag>
+			<compilerflag>/Os</compilerflag>
+		</if>
+		<if property="OPTIMIZE" value="5">
+			<compilerflag>/Ox /GS-</compilerflag>
+			<compilerflag>/Os</compilerflag>
+			<compilerflag>/Ob2</compilerflag>
+			<compilerflag>/GF</compilerflag>
+			<compilerflag>/Gy</compilerflag>
+		</if>
+
+		<compilerflag>/GS-</compilerflag>
+		<compilerflag>/Zl</compilerflag>
+		<compilerflag>/Zi</compilerflag>
+		<compilerflag>/Wall</compilerflag>
+	</group>
+
+	<group linkerset="ld">
+		<linkerflag>-disable-stdcall-fixup</linkerflag>
+	</group>
 
 </project>

Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp?rev=41374&r1=41373&r2=41374&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Wed Jun 10 23:12:18 2009
@@ -453,38 +453,41 @@
 
 	GenerateGlobalProperties ( "=", ProjectNode.non_if_data );
 
-	fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall\n" );
-	fprintf ( fMakefile, "PROJECT_CXXFLAGS += -Wall\n" );
-	fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
-	fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" );
-	fprintf ( fMakefile, "PROJECT_CXXFLAGS += -march=$(OARCH)\n" );
-	fprintf ( fMakefile, "endif\n" );
-	fprintf ( fMakefile, "ifneq ($(TUNE),)\n" );
-	fprintf ( fMakefile, "PROJECT_CFLAGS += -mtune=$(TUNE)\n" );
-	fprintf ( fMakefile, "PROJECT_CXXFLAGS += -mtune=$(TUNE)\n" );
-	fprintf ( fMakefile, "endif\n" );
-
-	fprintf ( fMakefile, "PROJECT_CFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
-	fprintf ( fMakefile, "PROJECT_CXXFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
-	fprintf ( fMakefile, "PROJECT_ASFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
+	if ( ProjectNode.configuration.Compiler == GnuGcc )
+	{
+		fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall\n" );
+		fprintf ( fMakefile, "PROJECT_CXXFLAGS += -Wall\n" );
+		fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
+		fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" );
+		fprintf ( fMakefile, "PROJECT_CXXFLAGS += -march=$(OARCH)\n" );
+		fprintf ( fMakefile, "endif\n" );
+		fprintf ( fMakefile, "ifneq ($(TUNE),)\n" );
+		fprintf ( fMakefile, "PROJECT_CFLAGS += -mtune=$(TUNE)\n" );
+		fprintf ( fMakefile, "PROJECT_CXXFLAGS += -mtune=$(TUNE)\n" );
+		fprintf ( fMakefile, "endif\n" );
+
+		fprintf ( fMakefile, "PROJECT_CFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
+		fprintf ( fMakefile, "PROJECT_CXXFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
+		fprintf ( fMakefile, "PROJECT_ASFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" );
+
+		if ( usePipe )
+		{
+			fprintf ( fMakefile, "PROJECT_CFLAGS += -pipe\n" );
+			fprintf ( fMakefile, "PROJECT_CXXFLAGS += -pipe\n" );
+			fprintf ( fMakefile, "PROJECT_ASFLAGS += -pipe\n" );
+		}
+
+		// Because RosBE gcc is built to suck
+		fputs ( "BUILTIN_HOST_CINCLUDES+= $(HOST_CFLAGS)\n", fMakefile );
+		fputs ( "BUILTIN_HOST_CPPINCLUDES+= $(HOST_CFLAGS)\n", fMakefile );
+		fputs ( "BUILTIN_HOST_CXXINCLUDES+= $(HOST_CPPFLAGS)\n", fMakefile );
+
+		// Would be nice to have our own C++ runtime
+		fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile );
+	}
 
 	MingwModuleHandler::GenerateParameters ( "PROJECT", "+=", ProjectNode.non_if_data );
 	MingwModuleHandler::GenerateParameters ( "PROJECT_HOST", "+=", ProjectNode.host_non_if_data );
-
-	if ( usePipe )
-	{
-		fprintf ( fMakefile, "PROJECT_CFLAGS += -pipe\n" );
-		fprintf ( fMakefile, "PROJECT_CXXFLAGS += -pipe\n" );
-		fprintf ( fMakefile, "PROJECT_ASFLAGS += -pipe\n" );
-	}
-
-	// Because RosBE gcc is built to suck
-	fputs ( "BUILTIN_HOST_CINCLUDES+= $(HOST_CFLAGS)\n", fMakefile );
-	fputs ( "BUILTIN_HOST_CPPINCLUDES+= $(HOST_CFLAGS)\n", fMakefile );
-	fputs ( "BUILTIN_HOST_CXXINCLUDES+= $(HOST_CPPFLAGS)\n", fMakefile );
-
-	// Would be nice to have our own C++ runtime
-	fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile );
 
 	// TODO: linker flags
 	fprintf ( fMakefile, "PROJECT_LFLAGS := '$(shell ${TARGET_CC} -print-libgcc-file-name)' %s\n", GenerateProjectLFLAGS ().c_str () );
@@ -771,6 +774,7 @@
 	}
 	else if ( ProjectNode.configuration.Compiler == MicrosoftC )
 	{
+		compilerCommand = "cl";
 		detectedCompiler = DetectMicrosoftCompiler ( compilerVersion, mscPath );
 		supportedCompiler = true; // TODO
 	}
@@ -1015,6 +1019,7 @@
 	}
 	else if ( ProjectNode.configuration.Linker == MicrosoftLink )
 	{
+		compilerCommand = "link";
 		detectedBinutils = DetectMicrosoftLinker ( binutilsVersion, mslinkPath );
 		supportedBinutils = true; // TODO
 	}
@@ -1094,6 +1099,8 @@
 		else
 			printf ( "not detected\n" );
 	}
+	else
+		usePipe = false;
 }
 
 void



More information about the Ros-diffs mailing list