mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 08:10:18 +00:00
merge from amd64 branch
37786: Link to libgcc_eh for C++ apps (Samuel Serapión) 39416: improve r37786 a bit (Timo Kreuzer) 36415: rbuild: implement MingwModuleHandler::GetDebugFormat(), returning "dwarf-2" on amd64, "stabs+" in all other cases so far (Timo Kreuzer) svn path=/trunk/; revision=39417
This commit is contained in:
parent
d3a9426b6a
commit
bf13eb0000
3 changed files with 19 additions and 5 deletions
|
@ -545,9 +545,10 @@ MingwBackend::GenerateGlobalVariables () const
|
||||||
fprintf ( fMakefile, "PROJECT_LFLAGS := '$(shell ${TARGET_CC} -print-libgcc-file-name)' %s\n", GenerateProjectLFLAGS ().c_str () );
|
fprintf ( fMakefile, "PROJECT_LFLAGS := '$(shell ${TARGET_CC} -print-libgcc-file-name)' %s\n", GenerateProjectLFLAGS ().c_str () );
|
||||||
fprintf ( fMakefile, "PROJECT_LPPFLAGS := '$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)' '$(shell ${TARGET_CPP} -print-file-name=libgcc.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)' '$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)'\n" );
|
fprintf ( fMakefile, "PROJECT_LPPFLAGS := '$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)' '$(shell ${TARGET_CPP} -print-file-name=libgcc.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)' '$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)'\n" );
|
||||||
/* hack to get libgcc_eh.a, should check mingw version or something */
|
/* hack to get libgcc_eh.a, should check mingw version or something */
|
||||||
fprintf ( fMakefile, "ifeq ($(ARCH),amd64)\n" );
|
if (Environment::GetArch() == "amd64")
|
||||||
fprintf ( fMakefile, "PROJECT_LPPFLAGS += '$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)'\n" );
|
{
|
||||||
fprintf ( fMakefile, "endif\n" );
|
fprintf ( fMakefile, "PROJECT_LPPFLAGS += '$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)'\n" );
|
||||||
|
}
|
||||||
fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -Wall\n" );
|
fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -Wall\n" );
|
||||||
fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
|
fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
|
||||||
fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -march=$(OARCH)\n" );
|
fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -march=$(OARCH)\n" );
|
||||||
|
|
|
@ -1874,6 +1874,16 @@ MingwModuleHandler::GetLinkerMacro () const
|
||||||
module.name.c_str () );
|
module.name.c_str () );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string
|
||||||
|
MingwModuleHandler::GetDebugFormat () const
|
||||||
|
{
|
||||||
|
if (Environment::GetArch() == "amd64")
|
||||||
|
{
|
||||||
|
return "dwarf-2";
|
||||||
|
}
|
||||||
|
return "stabs+";
|
||||||
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
MingwModuleHandler::GetModuleTargets ( const Module& module )
|
MingwModuleHandler::GetModuleTargets ( const Module& module )
|
||||||
{
|
{
|
||||||
|
@ -2031,7 +2041,7 @@ MingwModuleHandler::GenerateOtherMacros ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
globalCflags += " -Wall -Wpointer-arith";
|
globalCflags += " -Wall -Wpointer-arith";
|
||||||
globalCflags += " -gstabs+";
|
globalCflags += " -g" + MingwModuleHandler::GetDebugFormat ();
|
||||||
if ( backend->usePipe )
|
if ( backend->usePipe )
|
||||||
globalCflags += " -pipe";
|
globalCflags += " -pipe";
|
||||||
if ( !module.allowWarnings )
|
if ( !module.allowWarnings )
|
||||||
|
@ -3681,6 +3691,7 @@ MingwElfExecutableModuleHandler::Process ()
|
||||||
string objectsMacro = GetObjectsMacro ( module );
|
string objectsMacro = GetObjectsMacro ( module );
|
||||||
string linkDepsMacro = GetLinkingDependenciesMacro ();
|
string linkDepsMacro = GetLinkingDependenciesMacro ();
|
||||||
string libsMacro = GetLibsMacro ();
|
string libsMacro = GetLibsMacro ();
|
||||||
|
string debugFormat = GetDebugFormat ();
|
||||||
|
|
||||||
GenerateRules ();
|
GenerateRules ();
|
||||||
|
|
||||||
|
@ -3694,10 +3705,11 @@ MingwElfExecutableModuleHandler::Process ()
|
||||||
|
|
||||||
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
|
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
|
||||||
|
|
||||||
fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -gstabs+ -o %s\n",
|
fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -g%s -o %s\n",
|
||||||
module.buildtype.c_str(),
|
module.buildtype.c_str(),
|
||||||
objectsMacro.c_str(),
|
objectsMacro.c_str(),
|
||||||
libsMacro.c_str(),
|
libsMacro.c_str(),
|
||||||
|
debugFormat.c_str(),
|
||||||
targetMacro.c_str () );
|
targetMacro.c_str () );
|
||||||
|
|
||||||
delete target_file;
|
delete target_file;
|
||||||
|
|
|
@ -102,6 +102,7 @@ protected:
|
||||||
std::string GetLinkingDependenciesMacro () const;
|
std::string GetLinkingDependenciesMacro () const;
|
||||||
std::string GetLibsMacro () const;
|
std::string GetLibsMacro () const;
|
||||||
std::string GetLinkerMacro () const;
|
std::string GetLinkerMacro () const;
|
||||||
|
std::string GetDebugFormat () const;
|
||||||
void GenerateCleanObjectsAsYouGoCode () const;
|
void GenerateCleanObjectsAsYouGoCode () const;
|
||||||
void GenerateRunRsymCode () const;
|
void GenerateRunRsymCode () const;
|
||||||
void GenerateRunStripCode () const;
|
void GenerateRunStripCode () const;
|
||||||
|
|
Loading…
Reference in a new issue