Re: autoconf: C99 format check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Julius,

* Julius Naperkowski wrote on Thu, Jan 15, 2009 at 02:22:54PM CET:
> I am trying to cross-compile git for mips on a x86 host. But it seems that it is
> impossible to pass the C99 Format check in the configure script when
> cross_compile mode is activated because the script quits even before it starts
> the testprogramm. Is this behavior intentional?

Cross compilation assumes that test programs can be compiled and linked,
but not executed on the build system, i.e., at configure time.  The
fourth argument of AC_RUN_IFELSE may be used to set a default test
result value in the cross compilation case, typically either a
pessimistic default, or one based on $host or so (using $host requires
AC_CANONICAL_HOST, and the config.{guess,sub} scripts).

As a workaround, you the user can pass preset results if you know what
features the host system will have, to configure.  git's configure
script uses three runtime tests.  You can set them with something like
  ./configure ac_cv_c_c99_format=yes \
              ac_cv_fread_reads_directories=no \
              ac_cv_snprintf_returns_bogus=no --host=... ...

although I'm not quite sure if uclibc's *printf functions indeed do
support C99 size specifiers (I think they do though).

I can post a patch to add sane default settings for AC_RUN_IFELSE in
cross compile setups, this weekend.

Cheers,
Ralf
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux