git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Provide pessimistic defaults for cross compilation tests.

From
RWRalf Wildenhues <ralf.wildenhues@gmx.de>
Date
Jan 19, 2009, 20:34 UTC
Message-ID
<20090119203400.GA3539@ins.uni-bonn.de>
In-Reply-To
<20090116094110.GD25275@ins.uni-bonn.de>

In a cross compile setup, configure tests that run programs cannot be executed; in that case, provide pessimistic default values.

Bug reported by Julius Naperkowski. ---

> I can post a patch to add sane default settings for AC_RUN_IFELSE in
> cross compile setups, this weekend.
 configure.ac |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 363547c..4a208d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -360,6 +360,7 @@ AC_RUN_IFELSE(
 		else if (strcmp(buf, "12345"))
 		  return 2;]])],
 	[ac_cv_c_c99_format=yes],
+	[ac_cv_c_c99_format=no],
 	[ac_cv_c_c99_format=no])
 ])
 if test $ac_cv_c_c99_format = no; then
@@ -380,6 +381,7 @@ AC_RUN_IFELSE(
 		FILE *f = fopen(".", "r");
 		return f && fread(&c, 1, 1, f)]])],
 	[ac_cv_fread_reads_directories=no],
+	[ac_cv_fread_reads_directories=yes],
 	[ac_cv_fread_reads_directories=yes])
 ])
 if test $ac_cv_fread_reads_directories = yes; then
@@ -414,6 +416,7 @@ AC_RUN_IFELSE(
 		  if (snprintf(buf, 3, "%s", "12345") != 5
 		      || strcmp(buf, "12")) return 1]])],
 	[ac_cv_snprintf_returns_bogus=no],
+	[ac_cv_snprintf_returns_bogus=yes],
 	[ac_cv_snprintf_returns_bogus=yes])
 ])
 if test $ac_cv_snprintf_returns_bogus = yes; then
-- 
1.6.1.137.g3d9e8
Previous: Ralf WildenhuesNext: Johannes Schindelin
Message 3 of 8 in “autoconf: C99 format check”
  1. Julius NaperkowskiJan 15, 2009
  2. Ralf WildenhuesJan 16, 2009
  3. Provide pessimistic defaults for cross compilation tests.Ralf Wildenhues, Jan 19, 2009
  4. Johannes SchindelinJan 19, 2009
  5. Junio C HamanoJan 20, 2009
  6. Ralf WildenhuesJan 20, 2009
  7. Junio C HamanoJan 20, 2009
  8. Ralf WildenhuesJan 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.