Subject: cross-compile!

From: "Sun, Lei" <[email-masked]>
Date: Mon, 24 Jul 2000 13:57:05 -0400

Hi:
  Sorry for so many questions.
  I have a generic questions about cross-compile source package for
arm-linux.  I have tool chain, compiler, glibc installed on my host machine
(redhat linux 6.2) in /home/arm/ directory. 
  some packages can be compiled by just specifying the compiler to be
arm-linux-gcc, but some couldn't. My questions are:
  1. sometimes, the make try to execute program generated during compiling,
since it's cross-compile, it couldn't execute the binary, so it existed. how
to solve this problem ( the make -i option could work, but sometimes the
package need some files generated by the compiled binary program) ?
  2. sometimes, it's couldn't find some Lib or header file, what is the
search creteria of the lib and header for the cross-compilers? 
  due to the resources limites, I can't install compiler on my target. In
that case, things could be trival.
  Thank you! Any hint or suggestion is appreciated!!
Lei Sun

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Erik Mouw <[email-masked]>
Date: Tue 25 Jul 2000 13:56:31 +0100 (MDT)

> package need some files generated by the compiled binary program) ?

For GNU autoconf-ed packages (the ones with a configure script), you
should also tell the package that you're actually cross compiling by
specifying the target platform (arm-unknown-linux-gnu):

  setenv CC arm-linux-gcc
  ./configure [funny options] arm-unknown-linux-gnu

With a properly crafted configure script, the binaries needed to generate
the source files will be compiled with the system's native compiler, while
the final binary will be compiled with the cross compiler.

If that still doesn't work (like with bash), you need a native platform to
get things compiled. Compaq CRL has some hosts online to do this:

   skiffcluster1.handhelds.org
   skiffcluster2.handhelds.org

The username is:
     guest

The password is:
      <cr>

Jim Stud also has a Debian box which you can use for cross compiles.

> that case, things could be trival.

Use "arm-linux-gcc -pring-search-dirs" and the compiler will tell you
about its directories.

Erik

-- 
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."
  -- Duncan Simpson on BugTraq