[GHC] #7700: iOS patch no 3: enable/disable terminfo more precisely by os

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- When cross compiling to iOS, HostOS = darwin and TargetOS = ios. darwin has termios but ios doesn't. So we need termios built in stage 0 but not stage 1, but the makefiles don't currently allow for that. This patch makes it so termios is selected by the right OS for the right stage. I've refactored how Windows is handled here, so e.g. the termios selection should work correctly for both native windows and a Linux -> mingw32 cross compile (though I haven't tested it). Linux -> Windows mirrors darwin -> ios, in that it's termios -> no termios. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- Changes (by StephenBlackheath): * status: new => patch Comment: Thanks for the previous commits and apologies for forgetting a ;; I hope this makes sense. The reason why I can't just leave out $(eval $(call addPackage,terminfo)) like the existing code does with Windows is that if we do that, then the terminfo never gets included at all. That's because it doesn't get added to PACKAGES_STAGE1 so the code below never includes the module. That's no good to us because we need it built in stage 0. {{{ ifneq "$(CLEANING)" "YES" BUILD_DIRS += \ $(patsubst %, libraries/%, $(PACKAGES_STAGE1)) endif }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: infoneeded Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- Changes (by StephenBlackheath): * status: patch => infoneeded -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ------------------------------+--------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: ------------------------------+--------------------------------------------- Changes (by StephenBlackheath): * status: infoneeded => patch Comment: That was tricky. With 3e I tested a native linux build and an ios cross build to the start of the stage2 compiler, so I'm very confident now. So, please review. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ----------------------------------+----------------------------------------- Changes (by simonmar): * difficulty: => Unknown Comment: Things have got complicated in this bit of the build system with lots of exceptions, I think it needs a good refactoring. We should specify the stages for each package separately, perhaps. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ----------------------------------+----------------------------------------- Changes (by StephenBlackheath): * type: bug => feature request -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: igloo Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Changes (by igloo): * owner: => igloo -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os
----------------------------------+-----------------------------------------
Reporter: StephenBlackheath | Owner: igloo
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking: 7724
Related: |
----------------------------------+-----------------------------------------
Comment(by ian@…):
commit dd9da49ceda5bd0d6c860604ace0ca9829199fe5
{{{
Author: Ian Lynagh

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: igloo Type: feature request | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed * milestone: => 7.8.1 Comment: Thanks for the patch. I've refactored that area of the build system, as Simon suggested, and I think it has the behaviour you want now. Please let me know if not. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by StephenBlackheath): * owner: igloo => * status: closed => new * resolution: fixed => Comment: Your changes don't quite fix it for darwin -> iOS, because of this sequence of events: 1. On a darwin -> iOS, PACKAGES_STAGE0 gets terminfo but PACKAGES_STAGE1 doesn't. 2. This line works for everything in PACKAGES_STAGE1, but there's no similar line for PACKAGES_STAGE0 {{{BUILD_DIRS += $(patsubst %, libraries/%, $(PACKAGES_STAGE1))}}} 3. So {{{libraries/terminfo}}} never gets added to BUILD_DIRS. The output is this: {{{ Configuring ghc-pkg-6.9... ghc-cabal: At least the following dependencies are missing: terminfo ==0.3.2.5 make[1]: *** [utils/ghc-pkg/dist/package-data.mk] Error 1 make: *** [all] Error 2 }}} I attach a patch to fix it. When working on it before I suspected some order dependence in the inclusion of the build dirs, and I haven't sanity tested a complete build yet. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by StephenBlackheath): * status: new => patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: igloo Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by igloo): * owner: => igloo -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: igloo Type: feature request | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Comment(by StephenBlackheath): I completed a darwin -> iOS cross build successfully with this patch, so there's a good chance the potential slight change in ordering of BUILD_DIRS is OK. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7700: iOS patch no 3: enable/disable terminfo more precisely by os
--------------------------------+-------------------------------------------
Reporter: StephenBlackheath | Owner: igloo
Type: feature request | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: 7724 | Related:
--------------------------------+-------------------------------------------
Comment(by ian@…):
commit 056997a285a368f5f78905b4b325a3258484f71d
{{{
Author: Ian Lynagh

#7700: iOS patch no 3: enable/disable terminfo more precisely by os --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: igloo Type: feature request | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed Comment: There was a potential dependency problem with the haddock rules, but I've fixed that, and added the STAGE0 packages to BUILD_DIRS. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7700#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC