Cross-compiling and configure.ac macros

Jason Evans jasone at canonware.com
Thu Apr 14 23:11:15 PDT 2011


On 04/14/2011 05:16 AM, Andreas Vinsander wrote:
> I am trying to cross-compile jemalloc for evaluation on an embedded
> device running a Linux home brew distro.
>
> I have some problems with the way jemalloc tests for various support
> of the host (target) system.

For a first pass, can you run configure without the cross compiler 
specified, then hack up Makefile and include/jemalloc/jemalloc_defs.h to 
do the right thing for your platform?

> So far I have modified jemalloc-2.2.1 configure.ac as seen in the
> attached patch, but there still exists a call to AC_RUN_IFELSE.

The one remaining AC_RUN_IFELSE is for page size detection, right?  I 
think it's reasonable to just specify a default of 12 (and maybe even 
allow an environment variable to override that default) if the test fails.

> What is the best way to handle it? To use autoconf cache and supply a
> default value when cross-compiling?

How would the autoconf cache help here?  Isn't it still necessary for 
the test to have successfully run at some point for the cache to have a 
valid result?

Thanks,
Jason



More information about the jemalloc-discuss mailing list