Bug 719659 - Add -std=gnu99 to CFLAGS so that gcc and friends permit use of C99 constructs without warnings. This doesn't mean that everything in C99 is permitted now -- only the stuff supported by all the compilers we care about, including MSVC. r=espindola

--HG--
extra : rebase_source : 5fdfd130f529e1dfbc9ec48ecc9e83186c844c39
This commit is contained in:
Jeff Walden 2013-01-16 17:01:52 -08:00
parent 850da9c953
commit f9df2fd3e0
2 changed files with 6 additions and 0 deletions

View File

@ -1381,6 +1381,9 @@ dnl ========================================================
dnl GNU specific defaults
dnl ========================================================
if test "$GNU_CC"; then
# Per bug 719659 comment 2, some of the headers on ancient build machines
# may require gnu89 inline semantics. But otherwise, we use C99.
CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline"
# FIXME: Let us build with strict aliasing. bug 414641.
CFLAGS="$CFLAGS -fno-strict-aliasing"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'

View File

@ -1173,6 +1173,9 @@ dnl ========================================================
dnl GNU specific defaults
dnl ========================================================
if test "$GNU_CC"; then
# Per bug 719659 comment 2, some of the headers on ancient build machines
# may require gnu89 inline semantics. But otherwise, we use C99.
CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline"
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
DSO_LDOPTS='-shared'