From 11505a90aab8928e7e6e2c11b42a601801c3e899 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 13 Jan 2009 04:51:51 +0000 Subject: [PATCH] ccc: Darwin/CC1: Hardcode (for now) some -m options to match gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62146 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/ccc/ccclib/Tools.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py index cc08043fc9..1ff6af92b1 100644 --- a/tools/ccc/ccclib/Tools.py +++ b/tools/ccc/ccclib/Tools.py @@ -204,10 +204,10 @@ class Darwin_X86_CompileTool(Tool): # FIXME: As with ld, something else is going on. My best guess # is gcc is faking an -mmacosx-version-min # somewhere. Investigate. - if (not arglist.getLastArg(arglist.parser.m_macosxVersionMinOption) and - not arglist.getLastArg(arglist.parser.m_iphoneosVersionMinOption)): - cmd_args.append('-mmacosx-version-min=' + - self.toolChain.getMacosxVersionMin()) +# if (not arglist.getLastArg(arglist.parser.m_macosxVersionMinOption) and +# not arglist.getLastArg(arglist.parser.m_iphoneosVersionMinOption)): +# cmd_args.append('-mmacosx-version-min=' + +# self.toolChain.getMacosxVersionMin()) # FIXME: Remove faltivec # FIXME: Remove mno-fused-madd @@ -384,6 +384,21 @@ class Darwin_X86_CompileTool(Tool): cmd_args.append(self.getBaseInputName(inputs, arglist)) # FIXME: d* + + # FIXME: Figure out where these are coming from and + # dehardcode. + arg = arglist.getLastArg(arglist.parser.m_macosxVersionMinOption) + if arg: + cmd_args.extend(arglist.render(arg)) + else: + cmd_args.append('-mmacosx-version-min=' + + self.toolChain.getMacosxVersionMin()) + if arglist.getValue(arch) == 'x86_64': + cmd_args.append('-m64') + else: + cmd_args.append('-m32') + cmd_args.append('-mtune=core2') + # FIXME: m* # FIXME: a*