FS#19107 - [gcc] should provide c99
Attached to Project:
Arch Linux
Opened by Xavier (shining) - Thursday, 15 April 2010, 00:37 GMT
Last edited by Allan McRae (Allan) - Friday, 16 April 2010, 12:09 GMT
Opened by Xavier (shining) - Thursday, 15 April 2010, 00:37 GMT
Last edited by Allan McRae (Allan) - Friday, 16 April 2010, 12:09 GMT
|
Details
This is needed for better posix conformance.. and for
compatibility with build scripts that use c99.
http://pwet.fr/man/linux/commandes/posix/c99 On systems providing POSIX Conformance (see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 2, Conformance), c99 is required only with the C-Language Development option; XSI-conformant systems always provide c99. Maybe c89 could be added too for completeness. |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 16 April 2010, 12:09 GMT
Reason for closing: Implemented
Additional comments about closing: gcc-4.5.0-1
Friday, 16 April 2010, 12:09 GMT
Reason for closing: Implemented
Additional comments about closing: gcc-4.5.0-1
For my reference:
cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF"
#!/bin/sh
fl="-std=c89"
for opt; do
case "$opt" in
-ansi|-std=c89|-std=iso9899:1990) fl="";;
-std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
EOF
cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF"
#!/bin/sh
fl="-std=c99"
for opt; do
case "$opt" in
-std=c99|-std=iso9899:1999) fl="";;
-std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
EOF
chmod 755 %{buildroot}%{_prefix}/bin/c?9