Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 1999 20:02:39 +0200
From:      Marcel Moolenaar <marcel@scc.nl>
To:        "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: new sigset_t and upgrading: a proposal
Message-ID:  <37F3A5BF.A1AF21E3@scc.nl>
References:  <199909301325.GAA23273@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
"Rodney W. Grimes" wrote:

> IMHO, the only ``correct'' fix for the latest incarnation of the
> problem is to finally once and for all fix the cross compilation
> environment instead of using a half cooked tools: target to deal
> with certain problems.

brainstorm:

Upgrading cannot be solved if it is approached as being nothing more
than a cross-compilation. This can be easily seen by the following
cross-compilation prerequisites:

1. A compiler C running on machine 1 and capable of generating code
   for machine 2 (the compiler includes headers and libraries),
2. Source code compatible with compiler C, but also with machine 2.

The problem is that upgrading can violate the first part of rule 2
(source code compatible with the compiler), because you have new sources
(say -current) which you want to compile with an old compiler (say
-stable). Think of having ANSI C extensions without the proper support
for it in the compiler.

The current build-tools target tries to solve that by creating a
compiler C' by using cross-compilation. The result violates rule 1:
Compiler C' is build for machine 2 and not for machine 1 and therefore
should not be used on machine 1. This is where the discussion is all
about.

So, as long as rule 2 is not violated, cross-compilation can be used to
to build a -current system on -stable and thus also to handle upgrades.
The problem is in the case where rule 2 is violated. What's needed is
the ability to "port" the proper tools to machine 1. Well, the first
thing that comes to mind is the ports collection...

Example: If gcc on -stable can not be used to build a -current world,
then egcs must be installed from the ports collection and build as part
of the upgrade/cross-compilation. the egcs port does not violate rule 1
and since egcs is used on -current, rule 2 is also not violated. The
build process uses egcs to do the cross-compilation.

This implies that:
1. The ports collection must contain ports for all the tools that are
   needed for doing cross-compilations and/or upgrades from any
supported
   source version to any supported target version.
2. An easy, yet flexible way must be used to be able to tell whether
   ports must be installed or not. Simple rules like
	".if $source < srcvers .and $target > trgvers .then install egcs"
   where $source = `sysctl kern.osreldate` and so on, may be sufficient.

Am I being clear?
Do I make any sense? :-)
Does this in fact cover it?
Can it be done?

BTW: I'm running a make buildworld on -stable with -current sources. I'm
making assumptions I like to see verified...

> I furthermore think that if you put your mindset in the frame that this
> is just another engineering problem you'll come up with the ``right
> solution'' that will make everyone happy.

You don't have to be a committer for long to know that you can't make
everyone happy :-)

-- 
Marcel Moolenaar                        mailto:marcel@scc.nl
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:marcel@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37F3A5BF.A1AF21E3>