diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 7453f2301b4..2f7d1f4215f 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -544,6 +544,10 @@ MingwBackend::GenerateGlobalVariables () const fprintf ( fMakefile, "PROJECT_WIDLFLAGS := $(PROJECT_CINCLUDES) $(PROJECT_CDEFINES)\n" ); 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" ); + /* hack to get libgcc_eh.a, should check mingw version or something */ + fprintf ( fMakefile, "ifeq ($(ARCH),amd64)\n" ); + fprintf ( fMakefile, "PROJECT_LPPFLAGS += '$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)'\n" ); + fprintf ( fMakefile, "endif\n" ); fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -Wall\n" ); fprintf ( fMakefile, "ifneq ($(OARCH),)\n" ); fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -march=$(OARCH)\n" ); diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 1ead4f12ea4..aea145fea96 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -1325,6 +1325,14 @@ Module::GetEntryPoint(bool leadingUnderscore) const result = "_"; result += entrypoint; + + if (Environment::GetArch() == "amd64") + { + size_t at_index = result.find_last_of( '@' ); + if ( at_index != result.npos ) + return result.substr (0, at_index ); + } + return result; }