summaryrefslogtreecommitdiffstats
path: root/debian/ada/gnatgcc
diff options
context:
space:
mode:
Diffstat (limited to 'debian/ada/gnatgcc')
-rw-r--r--debian/ada/gnatgcc19
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/ada/gnatgcc b/debian/ada/gnatgcc
new file mode 100644
index 0000000..9aae5dc
--- /dev/null
+++ b/debian/ada/gnatgcc
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Installed as /usr/bin/$DEB_HOST_GNU_TYPE-gnatgcc
+# and symlinked as /usr/bin/gnatgcc.
+set -Cefu
+
+cat <<EOF
+
+Warning: gnatgcc is deprecated.
+Please call gcc-MAJOR directly.
+For GPR projects, this should be sufficient:
+# gprconfig --batch --config=Ada --config=C,,,,MAJOR
+MAJOR is the output of
+# gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q'
+
+EOF
+
+host=$(basename "$0" | sed 's/gnatgcc$//')
+major=$(${host}gnatmake --version | sed 's/.* \([0-9]\+\).*/\1/;q')
+exec ${host}gcc-$major "$@"