diff options
Diffstat (limited to 'sys-devel/base-gcc/files')
-rwxr-xr-x | sys-devel/base-gcc/files/c89 | 20 | ||||
-rwxr-xr-x | sys-devel/base-gcc/files/c99 | 21 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sys-devel/base-gcc/files/c89 b/sys-devel/base-gcc/files/c89 new file mode 100755 index 00000000..cee0325f --- /dev/null +++ b/sys-devel/base-gcc/files/c89 @@ -0,0 +1,20 @@ +#! /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 + +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 gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/sys-devel/base-gcc/files/c99 b/sys-devel/base-gcc/files/c99 new file mode 100755 index 00000000..c9542095 --- /dev/null +++ b/sys-devel/base-gcc/files/c99 @@ -0,0 +1,21 @@ +#! /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 + +for i; do + case "$i" in + -std=c9[9x]|-std=iso9899:199[9x]) + ;; + -ansi|-std=*) + echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i" + exit 1 + ;; + esac +done + +exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"} |