From a742c59a67939adfb0383bd4047bc7f5e09ce3ce Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Sun, 1 Mar 2009 22:59:03 +0100 Subject: [PATCH] Pass -m32/-m64 on to gcc when assembling and linking --- gen/linker.cpp | 3 +++ gen/toobj.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gen/linker.cpp b/gen/linker.cpp index ce39ec9f16..693a832443 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -320,6 +320,9 @@ int linkObjToExecutable(const char* argv0) //FIXME: enforce 64 bit if (global.params.is64bit) args.push_back("-m64"); + else + // Assume 32-bit? + args.push_back("-m32"); // print link command? if (!quiet || global.params.verbose) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 5873bd7455..4b58d7b60b 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -333,6 +333,9 @@ void assemble(const llvm::sys::Path& asmpath, const llvm::sys::Path& objpath) //FIXME: enforce 64 bit if (global.params.is64bit) args.push_back("-m64"); + else + // Assume 32-bit? + args.push_back("-m32"); // Now that "args" owns all the std::strings for the arguments, call the c_str // method to get the underlying string array. We do this game so that the