Subject: Re: mips-tfile

From: "Steven Liu" <[email-masked]>
Date: Thu, 17 May 2001 18:09:17 -0700

Hi, All:

I have a question about GCC:

How can we make gcc do not use the MIPS instructions lwl, lwr, swl, and swr?

Thanks,

Steven
----- Original Message -----
From: "Keith M Wesolowski" <[email-masked]>
To: "Steven Liu" <[email-masked]>
Cc: <[email-masked]>
Sent: Monday, March 05, 2001 9:55 PM
Subject: Re: mips-tfile

> On Mon, Mar 05, 2001 at 04:49:28AM -0800, Steven Liu wrote:
>
> > I am working on cross-compiler for mips R3000 on Linux now and meet a
problem in egcs.
> >
> > My host system is i386 with Rad Hat 7.0 installed.
> >
> > First, I successfully built and installed binutils-2.8.1 by using
> > binutils-2.8.1.tar.gz and egcs-mips-linux-1.1.2-2.i386.rpm. This created
> > bin, lib, mips-linux subdirectories.
>
> This makes no sense...how/why did you use an rpm of egcs to build
> binutils from source?  That doesn't really make any sense.  Could you
> please indicate what exact files you are using and where you got them
> from?  If you are applying patches, please mention those as well.
>
> > Second, I installed the linux kernel source code for mips by using
> > linux-2.2.14-000715.tar.gz and configured it and enabled
> > CONFIG_CROSSCOMPILE.  Made soft links: let  mips-linux/include/asm
> > pointd to linux-2.2.14-000715/include/asm-mips and
> > mips-linux/include/linux pointd to linux-2.2.14-000715/include/linux.
>
> This is not needed to build either gcc or the kernel.
>
> > Third, unziped the egcs-1.1.2.tar.gz, added the patch
> > egcs-mips-linux-1.1.2-2.i386.rpm and configured it as following:
> >      ./configure --prefix=3D/home/sliu --with-newlib --target=mips-linux
> > and made it this way:
> >      make SUBDIRS=3D"libiberty texinfo gcc" ALL_TARGET_MODULES=3D =
> > CONFIGURE_TARGET_MODULES=3D INSTALL_TARGET_MODULES=3D LANGUAGES=3D"c"
>
> What are you doing with both an rpm and a source tarball?  An RPM is
> surely not a patch.  Also, it is traditional to build gcc outside the
> source directory; it's possible that that is a source of trouble.  The
> random "3D" in your output there is either another source of trouble
> or an artifact of your mailer; in either case it should be fixed.
>
> If you are having trouble building a cross-toolchain, you might
> consider getting make-cross from
> ftp://oss.sgi.com/pub/linux/mips/mips-linux/simple/crossdev - it takes
> most of the hard parts out of it.  There's also a source toolchain
> there that seems to work fairly well; it compiles glibc, for example,
> which no version of egcs 1.1.2 I have seen will.  Of course, if you
> want to use different versions you can do that as well.
>
> --
> Keith M Wesolowski <[email-masked]> http://foobazco.org/~wesolows
> ------(( Project Foobazco Coordinator and Network Administrator ))------
> "I should have crushed his marketing-addled skull with a fucking bat."
>

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 17 May 2001 22:31:39 -0300

> How can we make gcc do not use the MIPS instructions lwl, lwr, swl, and swr?

Modify gcc.  Unless you're using a new flavour (And I'm tempted to use some
curseword instead ...) of a cpu core without lwl/lwr/swl/swr there should
never be a reason to avoid those instructions.

  Ralf

---

From: "Steven Liu" <[email-masked]>
Date: Fri, 18 May 2001 16:42:37 -0700

Hi ALL:

I have a question regarding MIPS Makefile.

In the Makefile of the Linux build directory, there are two Macros of C
compiler flags: HOSTCFLAGS and CFLAGS.

What are their purpose and difference? In another words, what is host gcc?
Why do we use host gcc in building the target kernel?

If you could give me any help, I would be very pleased.

Thank you.

Steven Liu

---

From: Justin Carlson <[email-masked]>
Date: Fri, 18 May 2001 16:50:25 -0700

> Why do we use host gcc in building the target kernel?

See Documentation/kbuild/makefiles.txt.

-Justin

---

From: Ralf Baechle <[email-masked]>
Date: Sat, 19 May 2001 00:23:05 -0300

> Why do we use host gcc in building the target kernel?

During the build process of the kernel some tools like scripts/mkdep and
others are built which are running on the compile machine, not the target
machine.  The variable HOSTCFLAGS takes some extra compiler options to be
passed for such compilations.

  Ralf