ada-link-lib.dpatch exposes a minor bug in the build machinery for the gnat tools.
One of the Ada packages that make up the gnat tools is indepsw (platform-independent switches). It has one spec, indepsw.ads, and several bodies to choose from depending on the platform. Before the patch, src/gcc/ada/Makefile.in would select a body file by means of the variable TOOLS_TARGET_PAIRS. On Debian GNU/Linux, the body selected was indepsw-gnu.adb. After the patch, TOOLS_TARGET_PAIRS is removed, and the body selection is done by src/gnattools/configure, which is generated from configure.ac in the same directory. This machinery has been there since 2005-02-26, but src/gcc/ada/Makefile.in seems to have diverged since then, and configure incorrectly selects indepsw-linux.adb instead of indepsw-gnu.adb. Reported upstream as PR ada/27300. This patch fixes that by adding the relevant bits to ada-link-lib.dpatch. -- Ludovic Brenta. Index: patches/ada-link-lib.dpatch =================================================================== RCS file: /var/lib/cvs/gcc-debian/F-E104505123C347D1FD56DA709B5585A9.dpatch,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- patches/ada-link-lib.dpatch 13 Apr 2006 15:31:36 -0000 1.14 +++ patches/ada-link-lib.dpatch 25 Apr 2006 07:44:02 -0000 1.15 @@ -9,6 +9,8 @@ # DP: - Build the GNAT tools in their top-level directory; do not use # DP: recursive makefiles. # DP: - Link the GNAT tools dynamically. +# DP: - Fix a bug in src/gnattools/configure.ac whereby a nonexistent version +# DP: of indepsw's body was selected. Regenerate configure. (PR ada/27300) # This patch seems large, but the hunks in Makefile.in are actually # generated from Makefile.def using autogen. Similarly, the changes @@ -756,6 +758,92 @@ -../../gnat.hlp: ../../vms_help$(exeext) - ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \ - $(fsrcdir)/vms_data.ads ../../gnat.hlp +--- gnattools/configure~ ++++ gnattools/configure 2006-04-23 14:30:01.000000000 +0200 +@@ -1455,21 +1455,13 @@ + # These demand that AC_CANONICAL_SYSTEM be called beforehand. + + #### +-# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) +-# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host. +-# Code is pretty much lifted from autoconf2.53. +- +- +- +-#### +-# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) +-# Like AC_CHECK_TOOL, but requires the prefix if build!=host. +- ++# NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) ++# Like plain AC_CHECK_TOOLS, but require prefix if build!=target. + + + #### +-# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) +-# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target. ++# NCN_STRICT_CHECK_TARGET_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) ++# Like CVS Autoconf AC_CHECK_TARGET_TOOLS, but require prefix if build!=target. + + + ### +@@ -1501,6 +1493,7 @@ + + + ++ + case ${build_alias} in + "") build_noncanonical=${build} ;; + *) build_noncanonical=${build_alias} ;; +@@ -1574,21 +1567,10 @@ + *86-*-solaris2*) + TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb" + ;; +- *86-*-linux* \ +- | powerpc*-*-linux*) ++ *-*-linux*) + TOOLS_TARGET_PAIRS="\ + mlib-tgt.adb<mlib-tgt-linux.adb \ +- indepsw.adb<indepsw-linux.adb" +- ;; +- *ia64-*-linux* \ +- | alpha*-*-linux ) +- TOOLS_TARGET_PAIRS="\ +- mlib-tgt.adb<mlib-tgt-linux.adb \ +- indepsw.adb<indepsw-linux.adb" +- ;; +- *x86_64-*-linux* \ +- | s390*-*-linux*) +- TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-linux.adb" ++ indepsw.adb<indepsw-gnu.adb" + ;; + *86-*-freebsd*) + TOOLS_TARGET_PAIRS="\ +--- gnattools/configure.ac~ 2005-02-26 22:43:33.000000000 +0100 ++++ gnattools/configure.ac 2006-04-23 14:29:03.000000000 +0200 +@@ -91,21 +91,10 @@ + *86-*-solaris2*) + TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb" + ;; +- *86-*-linux* \ +- | powerpc*-*-linux*) ++ *-*-linux*) + TOOLS_TARGET_PAIRS="\ + mlib-tgt.adb<mlib-tgt-linux.adb \ +- indepsw.adb<indepsw-linux.adb" +- ;; +- *ia64-*-linux* \ +- | alpha*-*-linux ) +- TOOLS_TARGET_PAIRS="\ +- mlib-tgt.adb<mlib-tgt-linux.adb \ +- indepsw.adb<indepsw-linux.adb" +- ;; +- *x86_64-*-linux* \ +- | s390*-*-linux*) +- TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-linux.adb" ++ indepsw.adb<indepsw-gnu.adb" + ;; + *86-*-freebsd*) + TOOLS_TARGET_PAIRS="\ --- gnattools/Makefile.in~ +++ gnattools/Makefile.in 2006-04-13 17:15:59.000000000 +0200 @@ -18,6 +18,8 @@ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]