On Sat, 24 Nov 2001, Guy Harris wrote:
> > Following is a patch that fixes a few minor but annoying problems with
> > the libpcap's configure script. It properly names "$host" the system
> > libpcap to be run on ("$target" only makes sense for compilation tools
> > which may create binaries for a system different from the one they are
> > intended to run on).
>
> I wasn't aware that we didn't support cross-compiling; as such, I'd
> expect that we *should* be checking $target_cpu.
Nope. See `info standards' for the definition of $build*, $host* and
$target* macros. Basically, $build* refer to the system compilation is
being performed on, $host* refer to the system compiled binaries are to
run on and $target* refer to the system compiled binaries will handle. As
such $target* usually have a meaning a meaning for developemt tool only.
So far packages that make use of $target* I know of are binutils, gcc,
gdb and ksymoops (a Linux run-time error disassembler). Let's take
binutils as an example. I compile it in several ways, following are
examples of configure invocations:
1. `./configure --build=mipsel-linux --host=mipsel-linux
--target=mipsel-linux' will build native mipsel-linux binutils on
mipsel-linux.
2. `./configure --build=i386-linux --host=mipsel-linux
--target=mipsel-linux' will cross-build native mipsel-linux binutils on
i386-linux.
3. `./configure --build=i386-linux --host=i386-linux
--target=mipsel-linux' will build mipsel-linux cross-binutils on
i386-linux.
4. `./configure --build=mipsel-linux --host=i386-linux
--target=mipsel-linux' will cross-build mipsel-linux cross-binutils for
i386-linux on mipsel-linux.
As you see, only if $build != $host a cross-compilation is performed.
> If you're not cross-compiling, would not $target_cpu and $host_cpu be
> the same?
Not necessarily, but $build_cpu and $host_cpu will.
If you have additional questions then feel free to ask. Also note I have
a similar patch for tcpdump -- I haven't ported it to the current beta
yet, but I should have it ready in a few days.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [EMAIL PROTECTED], PGP key available +
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe