Description: add target normalization rules to detect default compilers.
 This fixes new occurrences of #760006, hopefully more definitely.
 The default gprconfig target is taken from
 System.OS_Constants.Target_Name and contains the vendor id.
 It is compared to the output of GCC -dumpmachine which does not.
 The added regular expressions should tell gprbuild to accept such
 differences.
 .
 These Debian targetsets must come before conflicting upstream targetsets.
 Also, more selective expressions like i686-linux-gnu must come before
 less selective expressions like i686-*-gnu for Hurd.
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/share/gprconfig/targetset.xml
+++ b/share/gprconfig/targetset.xml
@@ -2,6 +2,193 @@
 
 <gprconfig>
 
+  <!-- Debian alpha -->
+  <targetset canonical="alpha-linux-gnu">
+    <target>alpha-linux-gnu</target>
+    <target>alpha-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian amd64 -->
+  <targetset canonical="x86_64-linux-gnu">
+    <target>x86_64-linux-gnu</target>
+    <target>x86_64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian arm -->
+  <targetset canonical="arm-linux-gnu">
+    <target>arm-linux-gnu</target>
+    <target>arm-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian arm64 -->
+  <targetset canonical="aarch64-linux-gnu">
+    <target>aarch64-linux-gnu</target>
+    <target>aarch64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian arm64ilp32 -->
+  <targetset canonical="aarch64-linux-gnu_ilp32">
+    <target>aarch64-linux-gnu_ilp32</target>
+    <target>aarch64-.*-linux-gnu_ilp32</target>
+  </targetset>
+  <!-- Debian armel -->
+  <targetset canonical="arm-linux-gnueabi">
+    <target>arm-linux-gnueabi</target>
+    <target>arm-.*-linux-gnueabi</target>
+  </targetset>
+  <!-- Debian armhf -->
+  <targetset canonical="arm-linux-gnueabihf">
+    <target>arm-linux-gnueabihf</target>
+    <target>arm-.*-linux-gnueabihf</target>
+  </targetset>
+  <!-- Debian hppa -->
+  <targetset canonical="hppa-linux-gnu">
+    <target>hppa-linux-gnu</target>
+    <target>hppa-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian i386 -->
+  <targetset canonical="i686-linux-gnu">
+    <target>i686-linux-gnu</target>
+    <target>i686-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian ia64 -->
+  <targetset canonical="ia64-linux-gnu">
+    <target>ia64-linux-gnu</target>
+    <target>ia64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian kfreebsd-amd64 -->
+  <targetset canonical="x86_64-kfreebsd-gnu">
+    <target>x86_64-kfreebsd-gnu</target>
+    <target>x86_64-.*-kfreebsd-gnu</target>
+  </targetset>
+  <!-- Debian kfreebsd-i386 -->
+  <targetset canonical="i686-kfreebsd-gnu">
+    <target>i686-kfreebsd-gnu</target>
+    <target>i686-.*-kfreebsd-gnu</target>
+  </targetset>
+  <!-- Debian hurd-i386 -->
+  <!-- must come after more selective regular expressions -->
+  <targetset canonical="i686-gnu">
+    <target>i686-gnu</target>
+    <target>i686-.*-gnu</target>
+  </targetset>
+  <!-- Debian m68k -->
+  <targetset canonical="m68k-linux-gnu">
+    <target>m68k-linux-gnu</target>
+    <target>m68k-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian mips -->
+  <targetset canonical="mips-linux-gnu">
+    <target>mips-linux-gnu</target>
+    <target>mips-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian mipsel -->
+  <targetset canonical="mipsel-linux-gnu">
+    <target>mipsel-linux-gnu</target>
+    <target>mipsel-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian mips64 -->
+  <targetset canonical="mips64-linux-gnuabi64">
+    <target>mips64-linux-gnuabi64</target>
+    <target>mips64-.*-linux-gnuabi64</target>
+  </targetset>
+  <!-- Debian mips64el -->
+  <targetset canonical="mips64el-linux-gnuabi64">
+    <target>mips64el-linux-gnuabi64</target>
+    <target>mips64el-.*-linux-gnuabi64</target>
+  </targetset>
+  <!-- Debian mipsn32 -->
+  <targetset canonical="mips64-linux-gnuabin32">
+    <target>mips64-linux-gnuabin32</target>
+    <target>mips64-.*-linux-gnuabin32</target>
+  </targetset>
+  <!-- Debian mipsn32el -->
+  <targetset canonical="mips64el-linux-gnuabin32">
+    <target>mips64el-linux-gnuabin32</target>
+    <target>mips64el-.*-linux-gnuabin32</target>
+  </targetset>
+  <!-- Debian mipsr6 -->
+  <targetset canonical="mipsisa32r6-linux-gnu">
+    <target>mipsisa32r6-linux-gnu</target>
+    <target>mipsisa32r6-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian mipsr6el -->
+  <targetset canonical="mipsisa32r6el-linux-gnu">
+    <target>mipsisa32r6el-linux-gnu</target>
+    <target>mipsisa32r6el-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian mips64r6 -->
+  <targetset canonical="mipsisa64r6-linux-gnuabi64">
+    <target>mipsisa64r6-linux-gnuabi64</target>
+    <target>mipsisa64r6-.*-linux-gnuabi64</target>
+  </targetset>
+  <!-- Debian mips64r6el -->
+  <targetset canonical="mipsisa64r6el-linux-gnuabi64">
+    <target>mipsisa64r6el-linux-gnuabi64</target>
+    <target>mipsisa64r6el-.*-linux-gnuabi64</target>
+  </targetset>
+  <!-- Debian mipsn32r6 -->
+  <targetset canonical="mipsisa64r6-linux-gnuabin32">
+    <target>mipsisa64r6-linux-gnuabin32</target>
+    <target>mipsisa64r6-.*-linux-gnuabin32</target>
+  </targetset>
+  <!-- Debian mipsn32r6el -->
+  <targetset canonical="mipsisa64r6el-linux-gnuabin32">
+    <target>mipsisa64r6el-linux-gnuabin32</target>
+    <target>mipsisa64r6el-.*-linux-gnuabin32</target>
+  </targetset>
+  <!-- Debian powerpc -->
+  <targetset canonical="powerpc-linux-gnu">
+    <target>powerpc-linux-gnu</target>
+    <target>powerpc-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian powerpcspe -->
+  <targetset canonical="powerpc-linux-gnuspe">
+    <target>powerpc-linux-gnuspe</target>
+    <target>powerpc-.*-linux-gnuspe</target>
+  </targetset>
+  <!-- Debian ppc64 -->
+  <targetset canonical="powerpc64-linux-gnu">
+    <target>powerpc64-linux-gnu</target>
+    <target>powerpc64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian ppc64el -->
+  <targetset canonical="powerpc64le-linux-gnu">
+    <target>powerpc64le-linux-gnu</target>
+    <target>powerpc64le-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian riscv64 -->
+  <targetset canonical="riscv64-linux-gnu">
+    <target>riscv64-linux-gnu</target>
+    <target>riscv64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian s390 -->
+  <targetset canonical="s390-linux-gnu">
+    <target>s390-linux-gnu</target>
+    <target>s390-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian s390x -->
+  <targetset canonical="s390x-linux-gnu">
+    <target>s390x-linux-gnu</target>
+    <target>s390x-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian sh4 -->
+  <targetset canonical="sh4-linux-gnu">
+    <target>sh4-linux-gnu</target>
+    <target>sh4-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian sparc -->
+  <targetset canonical="sparc-linux-gnu">
+    <target>sparc-linux-gnu</target>
+    <target>sparc-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian sparc64 -->
+  <targetset canonical="sparc64-linux-gnu">
+    <target>sparc64-linux-gnu</target>
+    <target>sparc64-.*-linux-gnu</target>
+  </targetset>
+  <!-- Debian x32 -->
+  <targetset canonical="x86_64-linux-gnux32">
+    <target>x86_64-linux-gnux32</target>
+    <target>x86_64-.*-linux-gnux32</target>
+  </targetset>
+
 <!-- Add elinos ports *before* native ports to
      be matched before native compiler -->
  <!-- x86-elinos-.* -->
