On Tue, Dec 03, 2002, Andrews, Martin wrote:

> > So, just to be clear, are you recommending that the *binary* openpkg
> > gcc-*.rpm be installed first ? Wouldn't that still be considered an
> > "alien" gcc if I'm installing subsequent RPMs into a dir
> > other than /cw
> > (or wherever it goes)?
> >
> > What I did (although I temporarily defined l_cc in rpmmacros
> > until I got
> > gcc built, it would be similar with the command line opts), was:
> >
> > - built make-*.src.rpm (because gcc-*src.rpm depends on it) using
> > /usr/local/bin/gcc
> >
> > - built gcc-3.2*.src.rpm using /usr/local/bin/gcc
> >
> > - installed the resulting gcc-3.2*.rpm
> >
> > - built rsync-*src.rpm using the newly installed openpkg
> > gcc-3.2 (this was
> > just to test if the new gcc worked)
> >
> > - Now, I've rebuilt gcc-3.2-*.src.rpm using the openpkg gcc-3.2, and I
> > plan on installing that (after uninstalling gcc-*.rpm).
> >
> > - after that, I plan on rebuilding rsync and various other src RPMs
> > (probably make as well, though I might have to force it
> > because of the gcc
> > dependency)
> >
> > Does that sound like a reasonable procedure for bootstrapping
> > from source?

> Rebuilding gcc with itself should be unneccessary as gcc does the same thing
> as part of its normal make (phase 1 of make is to build gcc with local
> compiler, phase 2 builds finall gcc with compiler from gcc). Avoiding this
> rebuild could save a lot of time. Rebuilding make with gcc is probably
> appropriate though.

Exactly. gcc bootstraps itself correctly with a three stage build, so
there is no need to rebuild gcc with itself because this is already done
internally. So, to summary the whole issue, the bootstrapping goes this
way:

You have to make sure that "make", "tar", "uudecode" and "cc" is found
in the standard vendor paths (just $PATH is not enough because OpenPKG
uses a strict sane build environment) or in <prefix>/bin. On platforms
where no "cc" is available, you (a) either have to install an alien "cc"
package to e.g. /usr/local from somewhere (on Solaris for instance via
www.sunfreeware.com) and use --define "with_cc /usr/local/bin/cc" _or_
(b) alternatively you have to establish the OpenPKG instance through
binary RPMs first by installing the packages "openpkg", "make" and "gcc"
(and this way result in an existing <prefix>/bin/cc). On platform which
already have a "cc" in vendor paths you can completely ignore all this
and just perform the straight-forward from-source building steps.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to