From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Julius Naperkowski <j.nap@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: autoconf: C99 format check
Date: Fri, 16 Jan 2009 10:41:10 +0100 [thread overview]
Message-ID: <20090116094110.GD25275@ins.uni-bonn.de> (raw)
In-Reply-To: <loom.20090115T123123-915@post.gmane.org>
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
next prev parent reply other threads:[~2009-01-16 10:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 13:22 autoconf: C99 format check Julius Naperkowski
2009-01-16 9:41 ` Ralf Wildenhues [this message]
2009-01-19 20:34 ` [PATCH] Provide pessimistic defaults for cross compilation tests Ralf Wildenhues
2009-01-19 23:39 ` Johannes Schindelin
2009-01-20 2:49 ` Junio C Hamano
2009-01-20 6:59 ` Ralf Wildenhues
2009-01-20 6:50 ` Junio C Hamano
2009-01-20 7:04 ` Ralf Wildenhues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090116094110.GD25275@ins.uni-bonn.de \
--to=ralf.wildenhues@gmx.de \
--cc=git@vger.kernel.org \
--cc=j.nap@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).