From d3a9426b6ab5e3846cc395fd844be5994d0131b8 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 5 Feb 2009 17:58:55 +0000 Subject: [PATCH] =?UTF-8?q?merge=20from=20amd64=20branch=2034740:=20Strip?= =?UTF-8?q?=20off=20stdcall=20decoration=20from=20amd64=20entry=20points?= =?UTF-8?q?=20(Timo=20Kreuzer)=2037786:=20Link=20to=20libgcc=5Feh=20for=20?= =?UTF-8?q?amd64=20C++=20apps=20(Samuel=20Serapi=C3=B3n)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=39414 --- reactos/tools/rbuild/backend/mingw/mingw.cpp | 4 ++++ reactos/tools/rbuild/module.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) 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; }