Fix binary distributions of cross compilers
AbandonedPublic

Authored by angerman on Oct 2 2017, 7:24 AM.

Details

Reviewers
hvr
bgamari
austin
Summary
  • copy over the original settings file Otherwise most of the custom cross compiler toolchain will be screwed up upon install. I'd rather have someone complain about a proper target-prefixed tool being missing, than getting garbaled output and a slew of strange errors because the final configure selected tools on the install machine just don't match up.
  • persist target-prefix. For cross compilers, retain the $target- prefix. This allows installing multiple cross compierls targetting different targets alongside each other.
angerman created this revision.Oct 2 2017, 7:24 AM
bgamari requested changes to this revision.Oct 2 2017, 8:34 PM

A few small issues.

ghc.mk
1066

"Configure at install"?

1069

I really wish that we wouldn't conflate Stage1Only and cross compiling. There are perfectly good reasons for only wanting a stage 1 comailer other than cross compiling. Wouldn't CrossCompiling be more appropriate here?

This revision now requires changes to proceed.Oct 2 2017, 8:34 PM
angerman added inline comments.Oct 2 2017, 8:42 PM
ghc.mk
1066

When installing a binary distribution, you usually do

$ tar xzf ghc-...
ghc-... $ ./configure --prefix # <-- this configure
ghc-... $ make install

that's where we start to pick up new tools from the
environment (e.g. ld, ar,... all non-target prefixed).

1069

Let's use ifeq "$(Stage1Only) $(CrossCompiling)" "YES YES"?
As far as I understood @trofi in D4048, CrossCompiling can also mean, cross compiling ghc, not just builing a cross compiler.

bgamari added inline comments.Oct 3 2017, 9:51 AM
ghc.mk
1066

Ahhh, I see what you mean. Perhaps you could rephrase this to

We do this because the bindist configure by default picks up ...

1069

Yes, that sounds reasonable.

angerman updated this revision to Diff 14253.Oct 3 2017, 8:55 PM
  • adjust to change requests
angerman marked 6 inline comments as done.Oct 3 2017, 8:56 PM
bgamari added inline comments.Oct 16 2017, 11:46 AM
distrib/configure.ac.in
37–38

Perhaps this TODO should be dropped?

angerman added inline comments.Oct 17 2017, 7:56 AM
distrib/configure.ac.in
37–38

I guess we *could* do this. I'm not sure we *should*. As mentioned elsewhere Stage1Only=YES is not identical to CrossCompiling. However @Stage1Only@ is not available, and we have to resort to @CrossCompiling@.

However, maybe we want to remove it, as Stage1Only => CrossCompiling isn't always true either.

angerman updated this revision to Diff 14387.Oct 18 2017, 8:16 AM
  • Drop comment
angerman marked 2 inline comments as done.Oct 18 2017, 8:17 AM
angerman updated this revision to Diff 14425.Oct 19 2017, 9:30 PM
  • Rebase. Depends on D4048
bgamari requested changes to this revision.Nov 2 2017, 11:12 AM

Hmm, it looks like Harbormaster still fails to build this.

This revision now requires changes to proceed.Nov 2 2017, 11:12 AM
austin resigned from this revision.Nov 9 2017, 5:40 PM
angerman abandoned this revision.Nov 9 2017, 8:37 PM

I'll focus on getting this solved in my hadrian fork