
#13559: Remove LLVM/-fPIC check in DynFlags -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (LLVM) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When the LLVM backend was first implemented the implementation did not support `-fPIC` or `-dynamic`. Support for this was added in 60873542e8edf0ee593fde2b6544770d8036728f, which merely added the appropriate `-relocation-model` flag to the `opt` command line when compiling with `-fPIC`. However, the error message in `DynFlags.makeDynFlagsConsistent` remains for all but a select few platforms, {{{#!hs | hscTarget dflags == HscLlvm && not ((arch == ArchX86_64) && (os == OSLinux || os == OSDarwin || os == OSFreeBSD)) && not ((isARM arch) && (os == OSLinux)) && (gopt Opt_PIC dflags || WayDyn `elem` ways dflags) = if cGhcWithNativeCodeGen == "YES" then let dflags' = dflags { hscTarget = HscAsm } warn = "Using native code generator rather than LLVM, as LLVM is incompatible with -fPIC and -dynamic on this platform" in loop dflags' warn else throwGhcException $ CmdLineError "Can't use -fPIC or -dynamic on this platform" }}} Is this still necessary? If so, why? If not, we should remove it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13559 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler