From a86904e856ad4153f2407f00716aad2a7a3d7600 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 23 Mar 2010 23:45:57 +0000 Subject: [PATCH] Merge trunk HEAD (r46369) (part 1/x) svn path=/branches/ros-amd64-bringup/; revision=46375 --- reactos/tools/rbuild/backend/backend.h | 6 ++---- reactos/tools/rbuild/backend/codeblocks/codeblocks.h | 8 ++------ .../tools/rbuild/backend/dependencymap/dependencymap.h | 8 ++------ reactos/tools/rbuild/backend/mingw/compilers/gcc.mak | 6 +++--- reactos/tools/rbuild/backend/mingw/mingw.cpp | 5 ++++- reactos/tools/rbuild/backend/mingw/mingw.h | 6 ++---- reactos/tools/rbuild/backend/mingw/modulehandler.h | 6 ++---- reactos/tools/rbuild/backend/mingw/rule.h | 5 +---- reactos/tools/rbuild/backend/msbuild/msbuild.h | 8 ++------ reactos/tools/rbuild/backend/msvc/msvc.h | 5 ++--- .../tools/rbuild/backend/versionreport/versionreport.h | 7 ++----- reactos/tools/rbuild/exception.h | 6 ++---- reactos/tools/rbuild/pch.h | 6 ++---- reactos/tools/rbuild/rbuild.h | 6 ++---- reactos/tools/rbuild/test.h | 6 ++---- 15 files changed, 32 insertions(+), 62 deletions(-) diff --git a/reactos/tools/rbuild/backend/backend.h b/reactos/tools/rbuild/backend/backend.h index 87755e89409..7e9da13ed1d 100644 --- a/reactos/tools/rbuild/backend/backend.h +++ b/reactos/tools/rbuild/backend/backend.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __BACKEND_H -#define __BACKEND_H + +#pragma once #include "../rbuild.h" @@ -75,5 +75,3 @@ public: Project& ProjectNode; Configuration& configuration; }; - -#endif /* __BACKEND_H */ diff --git a/reactos/tools/rbuild/backend/codeblocks/codeblocks.h b/reactos/tools/rbuild/backend/codeblocks/codeblocks.h index 3848560f49e..c0d0c26309b 100644 --- a/reactos/tools/rbuild/backend/codeblocks/codeblocks.h +++ b/reactos/tools/rbuild/backend/codeblocks/codeblocks.h @@ -16,8 +16,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __CODEBLOCKS_H__ -#define __CODEBLOCKS_H__ + +#pragma once #include #include @@ -98,7 +98,3 @@ class CBBackend : public Backend bool _copy_file ( const std::string& inputname, const std::string& targetname ) const; const Property* _lookup_property ( const Module& module, const std::string& name ) const; }; - - -#endif // __MSVC_H__ - diff --git a/reactos/tools/rbuild/backend/dependencymap/dependencymap.h b/reactos/tools/rbuild/backend/dependencymap/dependencymap.h index 1610d37a448..96114f514fd 100644 --- a/reactos/tools/rbuild/backend/dependencymap/dependencymap.h +++ b/reactos/tools/rbuild/backend/dependencymap/dependencymap.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __DEPMAP_H__ -#define __DEPMAP_H__ + +#pragma once #include #include @@ -62,7 +62,3 @@ class DepMapBackend : public Backend }; }; - - -#endif // __DEPMAP_H__ - diff --git a/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak b/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak index f54acd005a7..1f2a09f7f98 100644 --- a/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak +++ b/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak @@ -17,7 +17,7 @@ endif BUILTIN_CXXFLAGS+= -fno-optimize-sibling-calls # Add -fno-set-stack-executable required for x86/MinGW -ifneq (,$(filter $(ARCH), i386)) +ifneq (,$(filter $(ARCH),amd64 i386)) BUILTIN_CFLAGS+= -fno-set-stack-executable BUILTIN_CXXFLAGS+= -fno-set-stack-executable endif @@ -129,7 +129,7 @@ ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) $$(ECHO_PCH) - $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header -M -MP -MT $$@ $$< + $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header $$< else @@ -156,7 +156,7 @@ ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) $$(ECHO_PCH) - $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header -M -MP -MT $$@ $$< + $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header $$< else diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 2ffc0ee5932..fa428a2aaf5 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -487,8 +487,11 @@ MingwBackend::GenerateGlobalVariables () const fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile ); fprintf ( fMakefile, "PROJECT_CCLIBS := \"$(shell ${TARGET_CC} -print-libgcc-file-name)\"\n" ); - fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" " ); + // We use our proprietary "ofmt_stub.a" to implement a stub for "_get_output_format" required by "libmingwex.a". + // This archive just contains the compiled "ofmt_stub.s" supplied with the MinGW Runtime sources. + fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" \"$(shell ${TARGET_CPP} -print-file-name=ofmt_stub.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)\"\n" ); + /* hack to get libgcc_eh.a, should check mingw version or something */ if (Environment::GetArch() == "amd64") fprintf ( fMakefile, " \"$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)\"" ); diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h index 4e313946d1d..e73973f8d7d 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.h +++ b/reactos/tools/rbuild/backend/mingw/mingw.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MINGW_H -#define MINGW_H + +#pragma once #include "../backend.h" @@ -150,5 +150,3 @@ struct ModuleHandlerInformations }; extern const struct ModuleHandlerInformations ModuleHandlerInformations[]; - -#endif /* MINGW_H */ diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index 797f075812a..b67f63f4b7a 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MINGW_MODULEHANDLER_H -#define MINGW_MODULEHANDLER_H + +#pragma once #include "../backend.h" #include "mingw.h" @@ -370,5 +370,3 @@ public: MingwElfExecutableModuleHandler ( const Module& module ); virtual void Process (); }; - -#endif /* MINGW_MODULEHANDLER_H */ diff --git a/reactos/tools/rbuild/backend/mingw/rule.h b/reactos/tools/rbuild/backend/mingw/rule.h index fa56b0d9319..1c9c9a5bf86 100644 --- a/reactos/tools/rbuild/backend/mingw/rule.h +++ b/reactos/tools/rbuild/backend/mingw/rule.h @@ -16,8 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MINGW_RULE_H -#define MINGW_RULE_H +#pragma once #include "mingw.h" @@ -46,5 +45,3 @@ private: const std::string command; string_list generatedFiles; }; - -#endif diff --git a/reactos/tools/rbuild/backend/msbuild/msbuild.h b/reactos/tools/rbuild/backend/msbuild/msbuild.h index 62522789a6e..d1cd1f08fe6 100644 --- a/reactos/tools/rbuild/backend/msbuild/msbuild.h +++ b/reactos/tools/rbuild/backend/msbuild/msbuild.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __MSBUILD_H__ -#define __MSBUILD_H__ + +#pragma once #include #include @@ -66,7 +66,3 @@ class MsBuildBackend : public Backend }; }; - - -#endif // __MsBuild_H__ - diff --git a/reactos/tools/rbuild/backend/msvc/msvc.h b/reactos/tools/rbuild/backend/msvc/msvc.h index 4be80c64c99..a917c12e187 100644 --- a/reactos/tools/rbuild/backend/msvc/msvc.h +++ b/reactos/tools/rbuild/backend/msvc/msvc.h @@ -16,8 +16,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __MSVC_H__ -#define __MSVC_H__ + +#pragma once #include #include @@ -253,4 +253,3 @@ class PropsMaker void _generate_footer(); }; -#endif // __MSVC_H__ diff --git a/reactos/tools/rbuild/backend/versionreport/versionreport.h b/reactos/tools/rbuild/backend/versionreport/versionreport.h index 2b677b8e5b7..24d4addefb1 100644 --- a/reactos/tools/rbuild/backend/versionreport/versionreport.h +++ b/reactos/tools/rbuild/backend/versionreport/versionreport.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __VREPORT_H__ -#define __VREPORT_H__ + +#pragma once #include #include @@ -63,6 +63,3 @@ class VReportBackend : public Backend }; }; - - -#endif // __VREPORT_H__ diff --git a/reactos/tools/rbuild/exception.h b/reactos/tools/rbuild/exception.h index 9adde7d7cc2..c09528553f5 100644 --- a/reactos/tools/rbuild/exception.h +++ b/reactos/tools/rbuild/exception.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __EXCEPTION_H -#define __EXCEPTION_H + +#pragma once #include "pch.h" #include "xml.h" @@ -144,5 +144,3 @@ public: std::string BuildTool; std::string Version; }; - -#endif /* __EXCEPTION_H */ diff --git a/reactos/tools/rbuild/pch.h b/reactos/tools/rbuild/pch.h index 298699e45bc..e98342b1b8b 100644 --- a/reactos/tools/rbuild/pch.h +++ b/reactos/tools/rbuild/pch.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef PCH_H -#define PCH_H + +#pragma once #ifdef _MSC_VER #pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information @@ -79,5 +79,3 @@ inline char *strupr(char *x) #define MAX_PATH PATH_MAX #define _MAX_PATH PATH_MAX #endif - -#endif//PCH_H diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index 9ecb9520e82..e5be60ce897 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __RBUILD_H -#define __RBUILD_H + +#pragma once #include "pch.h" @@ -1098,5 +1098,3 @@ NormalizeFilename ( const std::string& filename ); extern std::string ToLower ( std::string filename ); - -#endif /* __RBUILD_H */ diff --git a/reactos/tools/rbuild/test.h b/reactos/tools/rbuild/test.h index fd9cdfca32f..69e131f44ed 100644 --- a/reactos/tools/rbuild/test.h +++ b/reactos/tools/rbuild/test.h @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TEST_H -#define __TEST_H + +#pragma once #include "rbuild.h" #include "backend/mingw/mingw.h" @@ -160,5 +160,3 @@ class CompilationUnitTest : public BaseTest public: void Run (); }; - -#endif /* __TEST_H */