This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm-elf cross compiler


"Aaron J. Grier" wrote:
> > The problems start when i try to compile more complex programs that
> > need their configure script to be run. configure fails with :
> >       configure: error: can not run test program while cross compiling
> > I understand why it can't run test programs, and i have gathered that
> > there should be some header files that define things like endian-ness.
> > Do these come with newlib or gcc? Do i have to set them up myself?

You can override most of the tests in question by setting the
proper environment variables (unless the autoconf script for
the project is poorly written).  For instance, here are the definitions
Michael Taht uses when cross-compiling glib (not glibc, mind you)
along with patches to get rid of cross-compile-unfriendly stuff:

export ac_cv_func_getpgrp_void='yes'
export ac_cv_func_setvbuf_reversed='no'
export ac_cv_sys_restartable_syscalls='yes'
export ac_cv_func_getpwuid_r='yes'
export glib_cv_has__inline='yes'
export glib_cv_has__inline__='yes'
export glib_cv_hasinline='yes'
export glib_cv_sane_realloc='yes'
export glib_cv___va_copy='yes'
export glib_cv_va_copy='no'
export glib_cv_va_val_copy='yes'
export glib_cv_sizeof_gmutex=24
export glib_cv_rtldglobal_broken='no'
export glib_cv_uscore='no'
export ac_cv_sizeof_pthread_mutex_t=24
export ac_cv_sizeof_fpos_t=12
export ac_cv_sizeof_float=4
export ac_cv_sizeof_char=1
export ac_cv_sizeof_void_p=4
export ac_cv_sizeof_int=4
export ac_cv_sizeof_long_long=8
export ac_cv_sizeof_off_t=4
export ac_cv_sizeof_pthread_t=4
export ac_cv_sizeof_short=2
export ac_cv_sizeof_double=8
export ac_cv_page_size=4096
export ac_cv_sizeof_wchar_t=4
export ac_cv_sizeof_uintptr_t=4
export ac_cv_sizeof_long=4

To figure out what definitions you need, you'll probably
have to dive in and start learning autoconf.
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]