[GHC] #13559: Remove LLVM/-fPIC check in DynFlags
#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
#13559: Remove LLVM/-fPIC check in DynFlags -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by angerman): I'll push a diff tomorrow that removes that code, as well as some other iOS specific annoyance. I'll also try to do some additional testing. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13559#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13559: Remove LLVM/-fPIC check in DynFlags -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"68c00a1b38707b2a5c813cbe3da3ffb7d97893b6/ghc" 68c00a1b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="68c00a1b38707b2a5c813cbe3da3ffb7d97893b6" Drop special handling of iOS iOS at least since iOS8 (we are currently at iOS10.3), allows for dynamic libaries, hence any artificail restriction on dyanmic libraries should be lifted. Please ping me with any iOS related issues that should potentially resurface. The iOS toolchain has considerably changed over the years, and I'm willing to drop work arounds in good faith. Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13559, #7722 Differential Revision: https://phabricator.haskell.org/D3451 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13559#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13559: Remove LLVM/-fPIC check in DynFlags -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: task | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler (LLVM) | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.4.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13559#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC