Check compiler support for -fno-default-inline and -pipe

clang was spewing warnings about the unrecognized -fno-default-inline.  (Oddly,
it warns only with -c, not when compiling directly to an executable.)  For
completeness we also check -pipe, even though clang is OK with that one.

It should be fine to omit either flag.  gcc -fno-default-inline drops the
implicit 'inline' annotation on functions defined inside a class scope, but
'inline' is only a hint anyway.  -fno-default-inline does not change linkage.
-pipe is merely a compile speed optimization.
This commit is contained in:
Keegan McAllister
2012-04-08 00:42:10 -04:00
committed by Keith Winstein
parent 62b6137ff5
commit d2434d1a79
10 changed files with 20 additions and 9 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
AM_CPPFLAGS = $(protobuf_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) -fno-default-inline -pipe
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS)
AM_LDFLAGS = $(HARDEN_LDFLAGS)
if BUILD_EXAMPLES