Now that GNAT supports multilib configurations, it is possible to build a 32-bit Ada compiler on a biarch 64-bit system starting with the 64-bit compiler, by adding -m32 to the configure variables CC, CXX, etc... except that this miserably breaks for GNATBIND and GNATMAKE.
Fixed thusly, tested on i586-suse-linux, applied as obvious on mainline, 4.6 and 4.5 branches. 2011-12-18 Eric Botcazou <ebotca...@adacore.com> * configure: Regenerate. config/ * acx.m4 (Test for GNAT): Update comment and add quotes in final test. -- Eric Botcazou
Index: acx.m4 =================================================================== --- acx.m4 (revision 182433) +++ acx.m4 (working copy) @@ -356,9 +356,9 @@ m4_define([AC_CHECK_HEADER],m4_defn([_AC ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # Test for GNAT. -# We require the gnatbind program, and a compiler driver that -# understands Ada. We use the user's CC setting, already found, -# and possibly add $1 to the command-line parameters. +# We require the gnatbind & gnatmake programs, as well as a compiler driver +# that understands Ada. We use the user's CC setting, already found, and +# possibly add $1 to the command-line parameters. # # Sets the shell variable have_gnat to yes or no as appropriate, and # substitutes GNATBIND and GNATMAKE. @@ -387,7 +387,7 @@ if test x"$errors" = x && test -f confte fi rm -f conftest.*]) -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then have_gnat=yes else have_gnat=no