[asterisk-dev] Cross-compiling for embedded platforms using openWRT

Brian Capouch brianc at palaver.net
Mon Jan 1 18:44:10 MST 2007


Kevin P. Fleming wrote:
> Brian Capouch wrote:
> 
>>I'm trying to find a kludge to get around this, but it seems to me that
>>pieces of configure scripts that actually *execute* code (a la
>>pg_config) are going to be problematical whenever one is building in a
>>cross-compiling environment.
> 
> 
> You are correct, that will be a problem. If you are building pgsql
> libraries for a cross-compile environment, you'll need to build the
> parts of those libraries that are executed at build time (pg_config as
> an example) for the host instead of the target. It is possible, though
> unlikely, that the Postgres build system already knows how to do this.
> 
> For autoconf-style configure scripts, this is why there is a difference
> (a big one) between --host and --target; if the PG build system
> supported --host and --target, you could set --host to be your build
> host (presumably x86) and --target to be mipsel, and then it would build
> pg_config for --host and the actual libraries for --target.

Not to pick on pg_config, but thinking about this a bit makes me wonder 
if there's some heuristic used (or that should/could be used) by a 
developer in terms of *knowing* to build for either the host or the target.

In other words, how does one know that pg_config ought to be built for 
the host instead of the target--I'm not super-familiar with it.  Perhaps 
its only function in life is to inform build scripts?

Thx.

B.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the asterisk-dev mailing list