[GHC] #7720: iOS patch no 9: Linking

#7720: iOS patch no 9: Linking ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Other | Architecture: arm Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- These are all the changes necessary to make the iOS cross compiler link in the right way for iOS. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Other | Architecture: arm Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- Changes (by StephenBlackheath): * status: new => patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking
------------------------------+---------------------------------------------
Reporter: StephenBlackheath | Owner:
Type: feature request | Status: patch
Priority: normal | Component: Compiler
Version: 7.7 | Keywords:
Os: Other | Architecture: arm
Failure: None/Unknown | Blockedby:
Blocking: 7724 | Related:
------------------------------+---------------------------------------------
Comment(by ian@…):
commit ff1de4cf60be4defda1945eb1dea55d056895c64
{{{
Author: Ian Lynagh

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Changes (by igloo): * difficulty: => Unknown Comment: I've applied the frameworks parts of this patch. I'm a little confused by the rest, though. Does compiling a program on iOS result in a `.a` file? Does the user then have to manually do something else with that? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Comment(by StephenBlackheath): That's correct. Xcode wants to generate the executable itself, packaged up with resources (graphics, etc) and then signed. What we do is have ghc generate a .a file which we then manually link into an Xcode project. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Changes (by igloo): * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Comment(by igloo): 9b is the remainder of the patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Comment(by igloo): This bit is a rather unpleasant kludge, and will presumably fail with packages that use other libraries: {{{ opt `notElem` ["-ldl", "-liconv", "-lm", "-lpthread"] }}} In `main/DriverPipeline.hs`, `linkBinary` does {{{ pkg_link_opts <- getPackageLinkOpts dflags dep_packages }}} which ultimately gives us {{{ map ("-l" ++) (packageHsLibs dflags p ++ extraLibraries p) ++ ldOptions p }}} If you instead use `[]`, instead of calling `getPackageLinkOpts`, on iOS, then does that work? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Os: Other Architecture: arm | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Comment(by StephenBlackheath): igloo: Yes, it is an unpleasant kludge. getPackageLinkOpts could be modified to give [], and I think that would be very likely to work (currently it gives some -l options, which doesn't make any sense, since none of them will work.) So I think your idea is a much better one than mine. So, are you prepared to do that? I'll re-test it and see if any -l's are creeping in from other places. If you want me to prepare a patch for this, let me know. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking
----------------------------------+-----------------------------------------
Reporter: StephenBlackheath | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Keywords: | Os: Other
Architecture: arm | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking: 7724
Related: |
----------------------------------+-----------------------------------------
Comment(by ian@…):
commit e5944d9f04bc6f6e62367be71d5b76e7d0473ee2
{{{
Author: Ian Lynagh

#7720: iOS patch no 9: Linking --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Os: Other | Architecture: arm Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed Comment: OK, done. Let me know if you still have problems. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7720: iOS patch no 9: Linking --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Os: Other | Architecture: arm Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Comment(by StephenBlackheath): Thanks - I'll re-test. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7720#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC