Merge "Revert "Update LLVM to clang-r407598b.""
diff --git a/docs/changelogs/Changelog-r22.md b/docs/changelogs/Changelog-r22.md
index 7fd7620..328aec0 100644
--- a/docs/changelogs/Changelog-r22.md
+++ b/docs/changelogs/Changelog-r22.md
@@ -21,8 +21,13 @@
## r22b
- * [Issue 1427]: Fix Clang auto-detection for CMake 3.19 and older for Windows.
+ * [Issue 1388]: Fixed LLVM's incorrect conversion to list files for long command
+ lines on Windows.
+ * [Issue 1391]: Fixed missing symbols from libz.a.
+ * [Issue 1427]: Fixed Clang auto-detection for CMake 3.19 and older for Windows.
+[Issue 1388]: https://github.com/android/ndk/issues/1388
+[Issue 1391]: https://github.com/android/ndk/issues/1391
[Issue 1427]: https://github.com/android/ndk/issues/1427
## Changes
@@ -53,9 +58,6 @@
stripping, so most users will need to upgrade to Android Gradle Plugin
version 4.0 or newer to get the fix.
-* [Issue 929]: `find_library` now prefers shared libraries from the sysroot over
- static libraries.
-
* [Issue 1130]: Fixed undefined references to new that could occur when building
for APIs prior to 21 and the static libc++. Note that LLD appears to have been
unaffected, but the problem is still present for ndk-build when using the
@@ -104,7 +106,6 @@
[Build System Maintainers Guide]: https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md
[Issue 609]: https://github.com/android/ndk/issues/609
[Issue 829]: https://github.com/android/ndk/issues/829
-[Issue 929]: https://github.com/android/ndk/issues/929
[Issue 1139]: https://github.com/android/ndk/issues/1139
[Issue 1149]: https://github.com/android/ndk/issues/1149
[Issue 1196]: https://github.com/android/ndk/issues/1196
diff --git a/docs/changelogs/Changelog-r23.md b/docs/changelogs/Changelog-r23.md
index 5cabcf6..405e8b2 100644
--- a/docs/changelogs/Changelog-r23.md
+++ b/docs/changelogs/Changelog-r23.md
@@ -24,6 +24,10 @@
for cmake 3.20 and newer. No user side change is expected. But if anything goes
wrong, please file a bug and set `ANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON` to
restore the legacy behavior.
+* [Issue 929]: `find_library` now prefers shared libraries from the sysroot over
+ static libraries.
+
+[Issue 929]: https://github.com/android/ndk/issues/929
## Known Issues
diff --git a/sources/android/support/Android.mk b/sources/android/support/Android.mk
index c9a908f..b6b9ce9 100644
--- a/sources/android/support/Android.mk
+++ b/sources/android/support/Android.mk
@@ -15,6 +15,7 @@
else # Building
android_support_cflags := \
+ -D_GNU_SOURCE \
-Drestrict=__restrict__ \
-ffunction-sections \
-fdata-sections \
@@ -122,7 +123,7 @@
LOCAL_CPPFLAGS := \
-fvisibility-inlines-hidden \
- -std=c++11 \
+ -std=gnu++11 \
include $(BUILD_STATIC_LIBRARY)