file desecribing the build machine.
* configure: Regenerate.
* lf.c: Include build-config.h instead of config.h.
* dgen.c: Likewise.
* igen.c: Likewise.
* misc.c: Likewise.
* misc.h: Likewise.
* filter.c: Likewise.
* table.c: Likewise.
+2009-11-13 Nathan Froyd <froydnj@codesourcery.com>
+
+ * configure.ac: If build != host, create a separate build-config.h
+ file desecribing the build machine.
+ * configure: Regenerate.
+ * lf.c: Include build-config.h instead of config.h.
+ * dgen.c: Likewise.
+ * igen.c: Likewise.
+ * misc.c: Likewise.
+ * misc.h: Likewise.
+ * filter.c: Likewise.
+ * table.c: Likewise.
+
2009-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* std-config.h: Fix spelling error.
sim_fpu=
fi
+# Since we run commands on the build system, we have to create a
+# separate config header for the build system if build != host.
+if test x$host = x$build; then
+ ac_config_commands="$ac_config_commands build-config.h"
+
+else
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
+ mv config.h ../build-config.h
+ cd ..
+ rm -rf $tempdir
+fi
+
do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ "build-config.h") CONFIG_COMMANDS="$CONFIG_COMMANDS build-config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
case $ac_file$ac_mode in
+ "build-config.h":C) cp config.h build-config.h ;;
"default":C) case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac ;;
esac
sim_fpu=
fi
+# Since we run commands on the build system, we have to create a
+# separate config header for the build system if build != host.
+if test x$host = x$build; then
+ AC_CONFIG_COMMANDS([build-config.h],[cp config.h build-config.h])
+else
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /* | [A-Za-z]:[\\/]* ) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
+ mv config.h ../build-config.h
+ cd ..
+ rm -rf $tempdir
+fi
+
dnl Check for exe extension
AC_EXEEXT
#include <ctype.h>
#include <stdarg.h>
-#include "config.h"
+#include "build-config.h"
#include "misc.h"
#include "lf.h"
#include "table.h"
#include <stdio.h>
-#include "config.h"
+#include "build-config.h"
#ifdef HAVE_STRING_H
#include <string.h>
#include "misc.h"
#include "lf.h"
#include "table.h"
-#include "config.h"
+#include "build-config.h"
#include "filter.h"
#include <stdarg.h>
#include <ctype.h>
-#include "config.h"
+#include "build-config.h"
#include "misc.h"
#include "lf.h"
#include <stdarg.h>
#include <ctype.h>
-#include "config.h"
+#include "build-config.h"
#include "misc.h"
#ifdef HAVE_STDLIB_H
/* Frustrating header junk */
-#include "config.h"
+#include "build-config.h"
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
#include <ctype.h>
-#include "config.h"
+#include "build-config.h"
#include "misc.h"
#include "lf.h"
#include "table.h"