This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: gcc4: cc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Blake wrote:
> According to Yaakov (Cygwin/X) on 3/17/2009 10:52 PM:
>> Dave Korn wrote:
>>> Ah, thanks for pointing this out. (The packages are of course broken as far
>>> as portability is concerned, as upstream GCC does not anywhere provide a 'cc'
>>> executable; it's presence in the gcc-3 package is caused by the build script
>>> creating a symlink as a convenience, so it's wrong in general to assume that
>>> there "must be" an executable called 'cc' in the PATH.) I'll add it back into
>>> the next release.
>> Actually, SUSv2 requires a cc and c89; SUSv3 mentions only a c99.
>
> So it would be nice to have all three names. And perhaps c89 (but not the
> others) should imply --std=gnu89.
>
Just as a point of reference, Gentoo Linux provides c89 and c99 as shell
scripts, which contain the following:
- ----- 8< ----- /usr/bin/c89 ----- 8< -----
#! /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 "$@"
- ----- 8< ----- /usr/bin/c99 ----- 8< -----
#! /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+"$@"}
- ----- 8< ---------- 8< ---------- 8< -----
- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknBXd0ACgkQOypDUo0oQOqZFgCeNL1a3syrYs1d6lG75tIhM834
DpEAnjmvgY4vfxwZWadv2lYRNpYZa/v6
=OZJf
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/