#7709 closed feature request (fixed)

ios patch no 7: Omit ghc-pwd from final stage when cross compiling

Reported by: StephenBlackheath Owned by: igloo
Priority: normal Milestone: 7.8.1
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: #7724 Related Tickets:

Description

Without this patch, we get this error when cross compiling:

"cp" -p utils/ghc-pwd/dist-install/build/tmp/ghc-pwd inplace/bin/ghc-pwd
cp: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd: No such file or directory
make[1]: *** [inplace/bin/ghc-pwd] Error 1
make: *** [all] Error 2

Attachments (1)

ios-patch-7a-omit-ghc-pwd-from-final-for-cross-compile.patch (554 bytes) - added by StephenBlackheath 14 months ago.
iOS patch 7 rev a: Omit ghc-pwd from final stage when cross compiling

Download all attachments as: .zip

Change History (12)

Changed 14 months ago by StephenBlackheath

iOS patch 7 rev a: Omit ghc-pwd from final stage when cross compiling

comment:1 Changed 14 months ago by StephenBlackheath

  • Status changed from new to patch

comment:2 Changed 14 months ago by StephenBlackheath

  • Type changed from bug to feature request

comment:3 Changed 14 months ago by StephenBlackheath

  • Blocking 7724 added

comment:4 Changed 14 months ago by igloo

  • Difficulty set to Unknown

I'm confused about what's going on here. Why isn't ghc-pwd built when cross-compiling?

comment:5 Changed 14 months ago by StephenBlackheath

  • Owner set to StephenBlackheath

Sorry - I am pretty sure I got this wrong. I'll have to figure it out and get back to you.

comment:6 Changed 14 months ago by igloo

  • Owner StephenBlackheath deleted
  • Status changed from patch to new

OK, thanks

comment:7 Changed 14 months ago by StephenBlackheath

Here's what's going on: ghc-pwd is built in the final stage and so it's for the target. Our iOS compiler generates .a files in place of executables, so it produces ghc-pwd.a.

Unfortunately it's not as simple as just changing exeext to .a, because we need to make sure a different exeext is used for host and target executables.

Should I just go through all the exeexts and change them based on whether it's host or target? Or is it better to keep it simple and come up with a way to avoid ghc-pwd being installed into inplace/bin/ when Stage1Only=YES is selected in mk/build.mk (as we do when building cross compilers)?

comment:8 Changed 14 months ago by igloo

  • Owner set to igloo

Ah, I see. We'd also have problems if anyone wanted to cross-compile to/from Windows.

I think we may be able to do this in a tidier way; I'll take a look.

comment:9 Changed 13 months ago by igloo

  • Milestone set to 7.8.1

comment:10 Changed 12 months ago by ian@…

commit d65a61dfa99e613a3f16b85e592b1e35270d4098

Author: Ian Lynagh <ian@well-typed.com>
Date:   Sat Apr 20 18:51:18 2013 +0100

    Use different exeext variables for each stage; fixes #7709
    
    Currently they are all set to the same value, but when cross-compiling
    they could be set to different values.

 driver/ghci/ghc.mk     |    2 +-
 mk/project.mk.in       |    5 ++++-
 rules/build-prog.mk    |    2 +-
 utils/ghc-cabal/ghc.mk |    5 +++--
 utils/runghc/ghc.mk    |    2 +-
 5 files changed, 10 insertions(+), 6 deletions(-)

comment:11 Changed 12 months ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Done

Note: See TracTickets for help on using tickets.