From 0a511bb08770d323afda11b56f6dde28a4c5d0b9 Mon Sep 17 00:00:00 2001 From: Ian Neal Date: Sun, 28 Oct 2012 23:01:35 +0000 Subject: [PATCH] Bug 803862 - Port |Bug 722933 - add -MACHINE option for link.exe| to comm-central r=Callek --- config/rules.mk | 2 +- configure.in | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config/rules.mk b/config/rules.mk index 8963ea2a30..0acb5762d7 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -922,7 +922,7 @@ endif # BeOS $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS) ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH)) - $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) + $(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) ifdef MSMANIFEST_TOOL @if test -f $@.manifest; then \ if test -f "$(srcdir)/$@.manifest"; then \ diff --git a/configure.in b/configure.in index 41b0842b16..27b70ac497 100644 --- a/configure.in +++ b/configure.in @@ -1485,7 +1485,15 @@ case "$host" in esac case "${host_cpu}" in + i*86) + if test -n "$_WIN32_MSVC"; then + HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86" + fi + ;; x86_64) + if test -n "$_WIN32_MSVC"; then + HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64" + fi HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_" ;; esac @@ -1984,6 +1992,7 @@ ia64*-hpux*) CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport" else AC_DEFINE(HAVE_STDCALL) + DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86" fi AC_DEFINE(_X86_) @@ -1995,6 +2004,9 @@ ia64*-hpux*) AC_DEFINE(_MIPS_) ;; x86_64-*) + if test -n "$_WIN32_MSVC"; then + DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64" + fi AC_DEFINE(_AMD64_) ;; *)