Author: tkreuzer Date: Thu Feb 5 12:29:24 2009 New Revision: 39415
URL: http://svn.reactos.org/svn/reactos?rev=39415&view=rev Log: rbuild: implement MingwModuleHandler::GetDebugFormat(), returning "dwarf-2" on amd64, "stabs+" in all other cases so far.
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.h
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools/... ============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Thu Feb 5 12:29:24 2009 @@ -31,12 +31,6 @@
#define CLEAN_FILE(f) clean_files.push_back ( (f).name.length () > 0 ? backend->GetFullName ( f ) : backend->GetFullPath ( f ) ); #define IsStaticLibrary( module ) ( ( module.type == StaticLibrary ) || ( module.type == HostStaticLibrary ) ) - -#if (ARCH == amd64) -#define DEBUG_FORMAT " -gdwarf-2" -#else -#define DEBUG_FORMAT " -gstabs+" -#endif
MingwBackend* MingwModuleHandler::backend = NULL; @@ -1881,6 +1875,16 @@ }
string +MingwModuleHandler::GetDebugFormat () const +{ + if (Environment::GetArch() == "amd64") + { + return "dwarf-2"; + } + return "stabs+"; +} + +string MingwModuleHandler::GetModuleTargets ( const Module& module ) { if ( ReferenceObjects ( module ) ) @@ -2037,7 +2041,7 @@ } else globalCflags += " -Wall -Wpointer-arith"; - globalCflags += DEBUG_FORMAT; + globalCflags += " -g" + MingwModuleHandler::GetDebugFormat (); if ( backend->usePipe ) globalCflags += " -pipe"; if ( !module.allowWarnings ) @@ -3687,6 +3691,7 @@ string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); string libsMacro = GetLibsMacro (); + string debugFormat = GetDebugFormat ();
GenerateRules ();
@@ -3700,11 +3705,11 @@
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
- fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s %s -o %s\n", + fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -g%s -o %s\n", module.buildtype.c_str(), objectsMacro.c_str(), libsMacro.c_str(), - DEBUG_FORMAT, + debugFormat.c_str(), targetMacro.c_str () );
delete target_file;
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools/... ============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] Thu Feb 5 12:29:24 2009 @@ -102,6 +102,7 @@ std::string GetLinkingDependenciesMacro () const; std::string GetLibsMacro () const; std::string GetLinkerMacro () const; + std::string GetDebugFormat () const; void GenerateCleanObjectsAsYouGoCode () const; void GenerateRunRsymCode () const; void GenerateRunStripCode () const;