Merge changes I73a39c6d,Iab2af242
* changes:
Fix test build break.
extend the PTRDIFF_MAX size check to mremap
diff --git a/libc/Android.bp b/libc/Android.bp
index d1228af..2de8cf6 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -177,6 +177,7 @@
"-DALL_STATE",
// Include tzsetwall, timelocal, timegm, time2posix, and posix2time.
"-DSTD_INSPIRED",
+ // Obviously, we want to be thread-safe.
"-DTHREAD_SAFE",
// The name of the tm_gmtoff field in our struct tm.
"-DTM_GMTOFF=tm_gmtoff",
@@ -184,6 +185,9 @@
"-DTZDIR=\\\"/system/usr/share/zoneinfo\\\"",
// Include timezone and daylight globals.
"-DUSG_COMPAT=1",
+ // Use the empty string (instead of " ") as the timezone abbreviation
+ // fallback.
+ "-DWILDABBR=\\\"\\\"",
"-DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU",
"-Dlint",
],
@@ -1460,9 +1464,13 @@
cflags: ["-Wframe-larger-than=2048"],
cppflags: ["-Wold-style-cast"],
include_dirs: ["bionic/libstdc++/include"],
- // TODO: Clang tries to use __tls_get_addr which is not supported yet
- // remove after it is implemented.
- clang: false,
+
+ arch: {
+ arm64: {
+ // b/25662915, clang compiled __cxa_thread_atexit_impl.cpp still failed.
+ clang: false,
+ },
+ },
}
// ========================================================
@@ -1478,6 +1486,7 @@
srcs: [
"bionic/pthread_atfork.cpp",
"bionic/pthread_attr.cpp",
+ "bionic/pthread_barrier.cpp",
"bionic/pthread_cond.cpp",
"bionic/pthread_create.cpp",
"bionic/pthread_detach.cpp",
@@ -1497,6 +1506,7 @@
"bionic/pthread_setname_np.cpp",
"bionic/pthread_setschedparam.cpp",
"bionic/pthread_sigmask.cpp",
+ "bionic/pthread_spinlock.cpp",
],
cflags: ["-Wframe-larger-than=2048"],
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index a683748..8f1ee95 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -110,6 +110,7 @@
// Initialize libc globals that are needed in both the linker and in libc.
// In dynamic binaries, this is run at least twice for different copies of the
// globals, once for the linker's copy and once for the one in libc.so.
+ __libc_auxv = args.auxv;
__libc_globals.initialize();
__libc_globals.mutate([&args](libc_globals* globals) {
__libc_init_vdso(globals, args);
@@ -121,7 +122,6 @@
// Initialize various globals.
environ = args.envp;
errno = 0;
- __libc_auxv = args.auxv;
__progname = args.argv[0] ? args.argv[0] : "<unknown>";
__abort_message_ptr = args.abort_message_ptr;
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 9cc4aba..1ecf65b 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -125,9 +125,11 @@
static const char* const kDefaultLdPaths[] = {
#if defined(__LP64__)
+ "/odm/lib64",
"/vendor/lib64",
"/system/lib64",
#else
+ "/odm/lib",
"/vendor/lib",
"/system/lib",
#endif
@@ -136,11 +138,15 @@
static const char* const kAsanDefaultLdPaths[] = {
#if defined(__LP64__)
+ "/data/odm/lib64",
+ "/odm/lib64",
"/data/vendor/lib64",
"/vendor/lib64",
"/data/lib64",
"/system/lib64",
#else
+ "/data/odm/lib",
+ "/odm/lib",
"/data/vendor/lib",
"/vendor/lib",
"/data/lib",