Bug 215940 - rescue: crunchide is called from base system, not as buildtool
Summary: rescue: crunchide is called from base system, not as buildtool
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-10 14:34 UTC by Bjoern A. Zeeb
Modified: 2017-01-11 22:26 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjoern A. Zeeb freebsd_committer freebsd_triage 2017-01-10 14:34:00 UTC
When adding ad new architecture one will find that the crunchide called is from the base system rather than a temporary build tool from the obj tree.  The generated rescue/rescue/rescue.mk does call crunchide without PATH being set properly or prepended.

This means one has to patch crunchide to support the new architecture, install it natively in the base system, and only then can do the cross-buildworld for the new architecture.

I merely open this for documenting the problem in case someone feels like fixing it but it might save someone else an hour or two of head scratching in the future.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-01-10 14:41:15 UTC
A commit references this bug:

Author: bz
Date: Tue Jan 10 14:40:30 UTC 2017
New revision: 311876
URL: https://svnweb.freebsd.org/changeset/base/311876

Log:
  Teach crunchide about EM_S390 to make bootstrapping from future
  releases easier unless someone will fix the PR properly.

  MFC after:	3 days
  PR:		215940

Changes:
  head/usr.sbin/crunch/crunchide/exec_elf32.c
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-01-10 19:06:35 UTC
Crunchide is built from the tree based on ${BOOTSTRAPPING}. I thought this worked correctly e.g. for r277259[1] which fixed a 64-bit offset error.

[1] https://svnweb.freebsd.org/base?view=revision&revision=277259
Comment 3 Bjoern A. Zeeb freebsd_committer freebsd_triage 2017-01-11 22:26:16 UTC
You are right;  I removed crunch* from the base system to double check;  turns out my Makefile.inc1 had a typo.  I can confirm that BOOTSTRAPPING indeed works if you do it right :)