aboutsummaryrefslogtreecommitdiff
path: root/c89
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-06-20 22:07:59 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-06-20 22:07:59 +0100
commit06f9083246c2d705520ab82e8bd822fd2428e12f (patch)
treef697bd59435a0b12306f0b9b8996cfbf0ded07db /c89
parentgcc-config: finish comment lines (diff)
downloadgcc-config-06f9083246c2d705520ab82e8bd822fd2428e12f.tar.gz
gcc-config-06f9083246c2d705520ab82e8bd822fd2428e12f.tar.bz2
gcc-config-06f9083246c2d705520ab82e8bd822fd2428e12f.zip
gcc-config: install /usr/bin/c{89,99}, take over from toolchain.eclass
Reported-by: Kent Fredric Bug: https://bugs.gentoo.org/728722 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'c89')
-rwxr-xr-xc8922
1 files changed, 22 insertions, 0 deletions
diff --git a/c89 b/c89
new file mode 100755
index 0000000..34dcd60
--- /dev/null
+++ b/c89
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Managed by gcc-config-@PV@
+
+# Call the appropriate C compiler with options to accept ANSI/ISO C
+# The following options are the same (as of gcc-2.95):
+# -ansi
+# -std=c89
+# -std=iso9899:1990
+
+for i; do
+ case "$i" in
+ -ansi|-std=c89|-std=iso9899:1990)
+ ;;
+ -std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec @TOOLCHAIN_PREFIX@gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@"