From 287fa3446c1359b1b4d1559a9bdacc55dec33ee1 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 23 Jan 2009 10:12:57 +0100 Subject: [PATCH] Add -m64 switch to gcc calls on 64-bit platforms. --- gen/linker.cpp | 4 ++++ gen/toobj.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gen/linker.cpp b/gen/linker.cpp index d63d7060..151874aa 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -306,6 +306,10 @@ int linkObjToExecutable(const char* argv0) break; } + //FIXME: enforce 64 bit + if (global.params.is64bit) + args.push_back("-m64"); + // print link command? if (!global.params.quiet || global.params.verbose) { diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 1ae0411c..9662746e 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -359,6 +359,10 @@ void assemble(const llvm::sys::Path& asmpath, const llvm::sys::Path& objpath) //FIXME: only use this if needed? args.push_back("-fpic"); + //FIXME: enforce 64 bit + if (global.params.is64bit) + args.push_back("-m64"); + // 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 // std::string array is guaranteed to outlive the const char* array.