X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=2e7e1feda6e80e9352f83a54ce279c72f8be0e76;hb=ab90e5fa171913fe777b2b6909030e3967e72bc6;hp=6c3ea22a0b8c0fdd95dbf055c4d878053ab6ec0b;hpb=0cb74388d80c12f0804db61744a041be7fcfa10b;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 6c3ea22..2e7e1fe 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -17,6 +17,7 @@ module DynFlags ( DOpt(..), DynFlag(..), ExtensionFlag(..), + glasgowExtsFlags, flattenExtensionFlags, ensureFlattenedExtensionFlags, lopt_set_flattened, @@ -1176,8 +1177,9 @@ parseDynamicFlags_ dflags0 args pkg_flags = do dflags1{ hscTarget = HscAsm }) #if !(x86_64_TARGET_ARCH && linux_TARGET_OS) | (not opt_Static || opt_PIC) && hscTarget dflags1 == HscLlvm - = ([L noSrcSpan $ "Warning: -fllvm is incompatible with -fPIC and -dynamic on this" - ++ "platform; ignoring -fllvm"], dflags1{ hscTarget = HscAsm }) + = ([L noSrcSpan $ "Warning: -fllvm is incompatible with -fPIC and -" + ++ "dynamic on this platform;\n ignoring -fllvm"], + dflags1{ hscTarget = HscAsm }) #endif | otherwise = ([], dflags1) @@ -2137,7 +2139,12 @@ setOptHpcDir arg = upd $ \ d -> d{hpcDir = arg} machdepCCOpts :: DynFlags -> ([String], -- flags for all C compilations [String]) -- for registerised HC compilations -machdepCCOpts _dflags +machdepCCOpts dflags = let (flagsAll, flagsRegHc) = machdepCCOpts' dflags + in (cCcOpts ++ flagsAll, flagsRegHc) + +machdepCCOpts' :: DynFlags -> ([String], -- flags for all C compilations + [String]) -- for registerised HC compilations +machdepCCOpts' _dflags #if alpha_TARGET_ARCH = ( ["-w", "-mieee" #ifdef HAVE_THREADED_RTS_SUPPORT @@ -2172,19 +2179,9 @@ machdepCCOpts _dflags -- the fp (%ebp) for our register maps. = let n_regs = stolen_x86_regs _dflags in - ( -#if darwin_TARGET_OS - -- By default, gcc on OS X will generate SSE - -- instructions, which need things 16-byte aligned, - -- but we don't 16-byte align things. Thus drop - -- back to generic i686 compatibility. Trac #2983. - -- - -- Since Snow Leopard (10.6), gcc defaults to x86_64. - ["-march=i686", "-m32"], -#else + ( [ if opt_Static then "-DDONT_WANT_WIN32_DLL_SUPPORT" else "" ], -#endif [ "-fno-defer-pop", "-fomit-frame-pointer", -- we want -fno-builtin, because when gcc inlines @@ -2199,11 +2196,7 @@ machdepCCOpts _dflags #elif x86_64_TARGET_ARCH = ( -#if darwin_TARGET_OS - ["-m64"], -#else - [], -#endif + [], ["-fomit-frame-pointer", "-fno-asynchronous-unwind-tables", -- the unwind tables are unnecessary for HC code,