Merge "Be more restrictive about max frame size."

This commit is contained in:
Treehugger Robot 2016-08-17 17:29:25 +00:00 committed by Gerrit Code Review
commit a6b73d36ef

View file

@ -39,6 +39,7 @@ libc_common_flags = [
"-Wextra", "-Wextra",
"-Wunused", "-Wunused",
"-Wno-deprecated-declarations", "-Wno-deprecated-declarations",
"-Wframe-larger-than=2048",
// Try to catch typical 32-bit assumptions that break with 64-bit pointers. // Try to catch typical 32-bit assumptions that break with 64-bit pointers.
"-Werror=pointer-to-int-cast", "-Werror=pointer-to-int-cast",
@ -175,6 +176,7 @@ cc_library_static {
"-DINET6", "-DINET6",
"-Wno-unused-parameter", "-Wno-unused-parameter",
"-include netbsd-compat.h", "-include netbsd-compat.h",
"-Wframe-larger-than=66000",
], ],
local_include_dirs: [ local_include_dirs: [
@ -203,7 +205,6 @@ cc_library_static {
"upstream-freebsd/lib/libc/stdlib/getopt_long.c", "upstream-freebsd/lib/libc/stdlib/getopt_long.c",
"upstream-freebsd/lib/libc/stdlib/qsort.c", "upstream-freebsd/lib/libc/stdlib/qsort.c",
"upstream-freebsd/lib/libc/stdlib/quick_exit.c", "upstream-freebsd/lib/libc/stdlib/quick_exit.c",
"upstream-freebsd/lib/libc/stdlib/realpath.c",
"upstream-freebsd/lib/libc/string/wcpcpy.c", "upstream-freebsd/lib/libc/string/wcpcpy.c",
"upstream-freebsd/lib/libc/string/wcpncpy.c", "upstream-freebsd/lib/libc/string/wcpncpy.c",
"upstream-freebsd/lib/libc/string/wcscasecmp.c", "upstream-freebsd/lib/libc/string/wcscasecmp.c",
@ -274,6 +275,25 @@ cc_library_static {
name: "libc_freebsd", name: "libc_freebsd",
} }
cc_library_static {
defaults: ["libc_defaults"],
srcs: [
"upstream-freebsd/lib/libc/stdlib/realpath.c",
],
cflags: [
"-Wno-sign-compare",
"-include freebsd-compat.h",
"-Wframe-larger-than=15000",
],
local_include_dirs: [
"upstream-freebsd/android/include",
],
name: "libc_freebsd_large_stack",
}
// ======================================================== // ========================================================
// libc_netbsd.a - upstream NetBSD C library code // libc_netbsd.a - upstream NetBSD C library code
// ======================================================== // ========================================================
@ -358,7 +378,6 @@ cc_library_static {
"upstream-openbsd/lib/libc/gen/daemon.c", "upstream-openbsd/lib/libc/gen/daemon.c",
"upstream-openbsd/lib/libc/gen/err.c", "upstream-openbsd/lib/libc/gen/err.c",
"upstream-openbsd/lib/libc/gen/errx.c", "upstream-openbsd/lib/libc/gen/errx.c",
"upstream-openbsd/lib/libc/gen/exec.c",
"upstream-openbsd/lib/libc/gen/fnmatch.c", "upstream-openbsd/lib/libc/gen/fnmatch.c",
"upstream-openbsd/lib/libc/gen/ftok.c", "upstream-openbsd/lib/libc/gen/ftok.c",
"upstream-openbsd/lib/libc/gen/getprogname.c", "upstream-openbsd/lib/libc/gen/getprogname.c",
@ -434,10 +453,7 @@ cc_library_static {
"upstream-openbsd/lib/libc/stdio/ungetwc.c", "upstream-openbsd/lib/libc/stdio/ungetwc.c",
"upstream-openbsd/lib/libc/stdio/vasprintf.c", "upstream-openbsd/lib/libc/stdio/vasprintf.c",
"upstream-openbsd/lib/libc/stdio/vdprintf.c", "upstream-openbsd/lib/libc/stdio/vdprintf.c",
"upstream-openbsd/lib/libc/stdio/vfprintf.c",
"upstream-openbsd/lib/libc/stdio/vfscanf.c", "upstream-openbsd/lib/libc/stdio/vfscanf.c",
"upstream-openbsd/lib/libc/stdio/vfwprintf.c",
"upstream-openbsd/lib/libc/stdio/vfwscanf.c",
"upstream-openbsd/lib/libc/stdio/vsscanf.c", "upstream-openbsd/lib/libc/stdio/vsscanf.c",
"upstream-openbsd/lib/libc/stdio/vswprintf.c", "upstream-openbsd/lib/libc/stdio/vswprintf.c",
"upstream-openbsd/lib/libc/stdio/vswscanf.c", "upstream-openbsd/lib/libc/stdio/vswscanf.c",
@ -498,6 +514,29 @@ cc_library_static {
], ],
} }
cc_library_static {
name: "libc_openbsd_large_stack",
defaults: ["libc_defaults"],
srcs: [
"upstream-openbsd/lib/libc/gen/exec.c",
"upstream-openbsd/lib/libc/stdio/vfprintf.c",
"upstream-openbsd/lib/libc/stdio/vfwprintf.c",
"upstream-openbsd/lib/libc/stdio/vfwscanf.c",
],
cflags: [
"-include openbsd-compat.h",
"-Wno-sign-compare",
"-Wframe-larger-than=5000",
],
local_include_dirs: [
"stdio",
"upstream-openbsd/android/include",
"upstream-openbsd/lib/libc/include",
"upstream-openbsd/lib/libc/gdtoa/",
],
}
// ======================================================== // ========================================================
// libc_openbsd.a - upstream OpenBSD C library code // libc_openbsd.a - upstream OpenBSD C library code
// ======================================================== // ========================================================
@ -644,10 +683,7 @@ cc_library_static {
local_include_dirs: [ local_include_dirs: [
"private", "private",
"stdio",
"upstream-openbsd/android/include", "upstream-openbsd/android/include",
"upstream-openbsd/lib/libc/include",
"upstream-openbsd/lib/libc/gdtoa/",
], ],
name: "libc_openbsd", name: "libc_openbsd",
@ -735,7 +771,6 @@ cc_library_static {
"bionic/strnlen.c", "bionic/strnlen.c",
"bionic/strrchr.cpp", "bionic/strrchr.cpp",
], ],
cflags: ["-Wframe-larger-than=2048"],
arch: { arch: {
arm: { arm: {
@ -1330,7 +1365,6 @@ cc_library_static {
"bionic/wctype.cpp", "bionic/wctype.cpp",
"bionic/wmempcpy.cpp", "bionic/wmempcpy.cpp",
], ],
cflags: ["-Wframe-larger-than=2048"],
multilib: { multilib: {
lib32: { lib32: {
@ -1380,7 +1414,6 @@ cc_library_static {
"bionic/pthread_sigmask.cpp", "bionic/pthread_sigmask.cpp",
"bionic/pthread_spinlock.cpp", "bionic/pthread_spinlock.cpp",
], ],
cflags: ["-Wframe-larger-than=2048"],
cppflags: ["-Wold-style-cast"], cppflags: ["-Wold-style-cast"],
include_dirs: ["bionic/libstdc++/include"], include_dirs: ["bionic/libstdc++/include"],
@ -1475,9 +1508,11 @@ cc_library_static {
whole_static_libs: [ whole_static_libs: [
"libc_bionic_ndk", "libc_bionic_ndk",
"libc_freebsd", "libc_freebsd",
"libc_freebsd_large_stack",
"libc_gdtoa", "libc_gdtoa",
"libc_malloc", "libc_malloc",
"libc_netbsd", "libc_netbsd",
"libc_openbsd_large_stack",
"libc_openbsd_ndk", "libc_openbsd_ndk",
"libc_stack_protector", "libc_stack_protector",
"libc_syscalls", "libc_syscalls",
@ -1507,10 +1542,12 @@ cc_library_static {
"libc_bionic_ndk", "libc_bionic_ndk",
"libc_dns", "libc_dns",
"libc_freebsd", "libc_freebsd",
"libc_freebsd_large_stack",
"libc_gdtoa", "libc_gdtoa",
"libc_malloc", "libc_malloc",
"libc_netbsd", "libc_netbsd",
"libc_openbsd", "libc_openbsd",
"libc_openbsd_large_stack",
"libc_openbsd_ndk", "libc_openbsd_ndk",
"libc_pthread", "libc_pthread",
"libc_stack_protector", "libc_stack_protector",