In order to cross build the baseline mips rpms, please make sure

1. The build x86 machine is running RedHat 7.3. Here is the list of
additional rpms needed:

	expect
	gtk-doc
	tclx
	tetex-dvips
	tetex-latex

2. Do

# cd baseline
# make site.mk

Put the right values for SRPMS-DIR, TOOLPREFIX, VENDOR, RPMTOPDIR,
RPMTMPDIR and RPM-CPU in site.mk. Read common.mk for what they are used
for. Please add

BUILD-MIPS2=false

to site.mk if your mips machine doesn't support MIPS II instructions.
3. You have write/create permissions in TOOLPREFIX, TOOLPREFIX/.. and
RPMTOPDIR.
4. `findrpm' included here is in your PATH.
5. You need to build/install the native glibc rpms included here:

# cd baseline
# cd glibc
# make native

if your glibc is older than glibc 2.2.4. Please follow the recommended
procedure from Red Hat of upgrading the glibc rpms on RedHat to install
the newly built glibc rpms.

6. Install the current cross build tools if you haven't done so:

# cd baseline
# make build -f Makefile.init
# make install -f Makefile.init

If you install the precompiled toolchain rpms, TOOLPREFIX has to be
the prefix where the toolchain is installed.

To build the toolchain compatible with RedHat 6.2, you need to build and
install compat-gcc first:

# cd baseline/compat-gcc
# make native
# make install.native

and then put

REDHAT-6_2-COMPAT=yes

in site.mk before running

# make build -f Makefile.init

7. Put TOOLPREFIX/bin in your PATH.

8. Build 

  a. Type

  # cd baseline
  # make

  It will build the toolchain rpms for RPM-CPU and install the proper
  files from those rpms under TOOLPREFIX for the toolchain. Then it
  will build the baseline rpms. Or

  b. Type

  # cd baseline
  # make tools

  It will just build the toolchain rpms for RPM-CPU and install the
  proper files from those rpms under TOOLPREFIX for the toolchain.

9. To build the rpms which have to be built natively on the mips
machine, log in on the mips machine and do

# cd baseline
# make native

Please keep in mind that since there are circular dependencies between
glibc and gd, you have to build glibc again if you build the baseline
rpm from scratch for the first time since the full glibc build needs
proper header files and libraries from gd installed under TOOLPREFIX.
To rebuild glibc, just do

# cd baseline
# cd glibc
# make clobber
# make

In each rpm package directory, there are 2 special make targets which
are useful for modifying the package. They are "prepare" and "patch".
The "prepare" target will unpack the source rpm and apply all the
patches. It will give you a fresh source tree under $(RPMTOPDIR)/BUILD
with the original files backed up. The "patch" target is similar to
"prepare". The only difference is it will remove all the original files
after patches are applied. You can use those targets when making the
new changes.
