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:
committed by
Keith Winstein
parent
62b6137ff5
commit
d2434d1a79
@@ -101,6 +101,17 @@ AS_IF([test x"$hardening" != x"no"], [
|
||||
AC_SUBST([HARDEN_CFLAGS])
|
||||
AC_SUBST([HARDEN_LDFLAGS])
|
||||
|
||||
# Also check for a few non-hardening-related flags.
|
||||
MISC_CXXFLAGS=""
|
||||
AC_LANG_PUSH(C++)
|
||||
AX_CHECK_COMPILE_FLAG([-fno-default-inline],
|
||||
[MISC_CXXFLAGS="$MISC_CXXFLAGS -fno-default-inline"], [], [-Werror])
|
||||
AX_CHECK_COMPILE_FLAG([-pipe],
|
||||
[MISC_CXXFLAGS="$MISC_CXXFLAGS -pipe"], [], [-Werror])
|
||||
AC_LANG_POP(C++)
|
||||
AC_SUBST([MISC_CXXFLAGS])
|
||||
|
||||
# End of flag tests.
|
||||
CC="$saved_CC"
|
||||
CXX="$saved_CXX"
|
||||
LD="$saved_LD"
|
||||
|
||||
Reference in New Issue
Block a user