Description: in examples, require the same major version for Ada and C compilers
 This cannot be forwarded because /usr/bin/gcc-MAJOR is specific to Debian.
Forwarded: not-needed
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/examples/ada_cpp/Makefile
+++ b/examples/ada_cpp/Makefile
@@ -2,8 +2,9 @@
 	gprbuild -Panimals $(GPRBUILDFLAGS)
 	gprbuild -Pexcept $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C++
+	gprconfig --batch --config Ada --config C++,,,,g++-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -Panimals
--- a/examples/ada_f77/Makefile
+++ b/examples/ada_f77/Makefile
@@ -1,8 +1,9 @@
 all: default.cgpr
 	gprbuild -p -Pft $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config Fortran
+	gprconfig --batch --config Ada --config ,,,,gfortran-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -r -Pft
--- a/examples/first_steps/Makefile
+++ b/examples/first_steps/Makefile
@@ -2,8 +2,9 @@
 	gprbuild -p -Pc_main $(GPRBUILDFLAGS)
 	gprbuild -p -Pada_main $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -Pc_main
--- a/examples/libraries/Makefile
+++ b/examples/libraries/Makefile
@@ -5,8 +5,9 @@
 	gprbuild -p -Pmain3 $(GPRBUILDFLAGS)
 	gprbuild -p -Pmain4 $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -r -Pmain0
--- a/examples/matrix/Makefile
+++ b/examples/matrix/Makefile
@@ -1,8 +1,9 @@
 all: default.cgpr
 	gprbuild -p -Pmatrix $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C --config Fortran
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major) --config Fortran,,,,gfortran-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -Pmatrix
--- a/examples/namings/Makefile
+++ b/examples/namings/Makefile
@@ -3,8 +3,9 @@
 	gprbuild -p -Pnamings -XC1=case2 $(GPRBUILDFLAGS)
 	gprbuild -p -Pnamings -XC1=case3 $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -Pnamings -XC1=case1
--- a/examples/scenarios/Makefile
+++ b/examples/scenarios/Makefile
@@ -3,8 +3,9 @@
 	gprbuild -p -Pmain -XLIB=dynamic $(GPRBUILDFLAGS)
 
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -r -Pmain -XLIB=static
--- a/examples/subsystems/Makefile
+++ b/examples/subsystems/Makefile
@@ -2,8 +2,9 @@
 	gprbuild -p -Pc_main $(GPRBUILDFLAGS)
 	gprbuild -p -Pada_main $(GPRBUILDFLAGS)
 
+gcc_major != gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
 default.cgpr:
-	gprconfig --batch --config Ada --config C
+	gprconfig --batch --config Ada --config C,,,,gcc-$(gcc_major)
 
 clean: default.cgpr
 	gprclean -r -Pc_main
