Author: tkreuzer Date: Sat Dec 6 04:17:19 2008 New Revision: 37887
URL: http://svn.reactos.org/svn/reactos?rev=37887&view=rev Log: merge 37780 from trunk fix it so on x64 builds we use dwarf2 debugging format.
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
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] Sat Dec 6 04:17:19 2008 @@ -31,6 +31,12 @@
#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; @@ -1655,11 +1661,12 @@ backend->GetFullPath ( *pchFilename ).c_str() ); fprintf ( fMakefile, "\t$(ECHO_PCH)\n" ); fprintf ( fMakefile, - "\t%s -o %s %s %s -g %s\n\n", + "\t%s -o %s %s %s %s %s\n\n", module.cplusplus ? cppc.c_str() : cc.c_str(), backend->GetFullName ( *pchFilename ).c_str(), module.cplusplus ? cxxflagsMacro.c_str() : cflagsMacro.c_str(), GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, module.cplusplus ? CompilerTypeCPP : CompilerTypeCC ).c_str(), + DEBUG_FORMAT, backend->GetFullName ( baseHeaderFile ).c_str() ); delete pchFilename; } @@ -1894,7 +1901,7 @@ } else globalCflags += " -Wall -Wpointer-arith"; - globalCflags += " -g"; + globalCflags += DEBUG_FORMAT; if ( backend->usePipe ) globalCflags += " -pipe"; if ( !module.allowWarnings ) @@ -1947,7 +1954,7 @@
fprintf ( fMakefile, - "%s_LFLAGS := $(PROJECT_LFLAGS) -g $(%s_LFLAGS)\n", + "%s_LFLAGS := $(PROJECT_LFLAGS) $(%s_LFLAGS)\n", module.name.c_str (), module.name.c_str () ); } @@ -3027,7 +3034,7 @@ backend->GetFullName ( junk_cpy ).c_str (), backend->GetFullName ( junk_tmp ).c_str () );
- fprintf ( fMakefile, "\t${ld} $(%s_LINKFORMAT) %s %s -g -o %s\n", + fprintf ( fMakefile, "\t${ld} $(%s_LINKFORMAT) %s %s -o %s\n", module.buildtype.c_str (), linkDepsMacro.c_str (), backend->GetFullName ( junk_tmp ).c_str (), @@ -3567,10 +3574,11 @@
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
- fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -g -o %s\n", + fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s %s -o %s\n", module.buildtype.c_str(), objectsMacro.c_str(), libsMacro.c_str(), + DEBUG_FORMAT, targetMacro.c_str () );
delete target_file;