summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-07-15 23:04:36 +0000
committerMike Frysinger <vapier@gentoo.org>2006-07-15 23:04:36 +0000
commitf1371478a9345aa3d0fb0613ba0de2f6b1c255ac (patch)
tree6980e7e7386dc93408ec8696cc361393badca6d6 /sys-devel/gcc
parentStable x86 bug #139751 (diff)
downloadgentoo-2-f1371478a9345aa3d0fb0613ba0de2f6b1c255ac.tar.gz
gentoo-2-f1371478a9345aa3d0fb0613ba0de2f6b1c255ac.tar.bz2
gentoo-2-f1371478a9345aa3d0fb0613ba0de2f6b1c255ac.zip
install c89/c99 wrappers from Debian #139619
Diffstat (limited to 'sys-devel/gcc')
-rwxr-xr-xsys-devel/gcc/files/c8923
-rwxr-xr-xsys-devel/gcc/files/c9924
2 files changed, 47 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/c89 b/sys-devel/gcc/files/c89
new file mode 100755
index 000000000000..d0a3c1e634ee
--- /dev/null
+++ b/sys-devel/gcc/files/c89
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# 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
+
+extra_flag=-std=c89
+
+for i; do
+ case "$i" in
+ -ansi|-std=c89|-std=iso9899:1990)
+ extra_flag=
+ ;;
+ -std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec gcc $extra_flag ${1+"$@"}
diff --git a/sys-devel/gcc/files/c99 b/sys-devel/gcc/files/c99
new file mode 100755
index 000000000000..2edf5cd2f00f
--- /dev/null
+++ b/sys-devel/gcc/files/c99
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Call the appropriate C compiler with options to accept ANSI/ISO C
+# The following options are the same (as of gcc-3.3):
+# -std=c99
+# -std=c9x
+# -std=iso9899:1999
+# -std=iso9899:199x
+
+extra_flag=-std=c99
+
+for i; do
+ case "$i" in
+ -std=c9[9x]|-std=iso9899:199[9x])
+ extra_flag=
+ ;;
+ -std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec gcc $extra_flag ${1+"$@"}