Module: Mesa Branch: staging/23.3 Commit: 1371823a1798a01c543c4e2c2a02af054f083623 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1371823a1798a01c543c4e2c2a02af054f083623
Author: Mauro Rossi <issor.or...@gmail.com> Date: Sat Oct 14 21:51:24 2023 +0200 Android.mk: filter out cflags to build with Android 14 bundled clang Android 14 uses prebuild clang version 17.0.2 By filtering these cflags there are no building errors on previous Android releases. Fixes the following building errors: ../src/c11/time.h:54:8: error: redefinition of 'timespec' struct timespec ^ /media/bigblissdrive/u-x86/out/soong/.intermediates/bionic/libc/libc/android_vendor.34_x86_x86_64_shared/gen/include/bits/timespec.h:46:8: note: previous definition is here struct timespec { ^ 1 error generated. In file included from ../src/util/disk_cache.c:50: ../src/util/disk_cache.h:86:4: error: use of undeclared identifier 'Dl_info' Dl_info info; ^ ... ./src/util/disk_cache.h:114:30: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion] _mesa_sha1_update(ctx, build_id_data(note), build_id_length(note)); ^~~~~~~~~~~~~~~~~~~ 10 errors generated. ../src/intel/perf/intel_perf.c:91:10: error: call to undeclared function 'major'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] maj = major(sb.st_rdev); ^ ../src/intel/perf/intel_perf.c:92:10: error: call to undeclared function 'minor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] min = minor(sb.st_rdev); ^ 2 errors generated. ../src/intel/vulkan/anv_allocator.c:295:13: error: call to undeclared function 'futex_wake'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] futex_wake(&table->state.end, INT_MAX); ^ ... ../src/intel/vulkan/anv_allocator.c:711:7: error: call to undeclared function 'futex_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] futex_wait(&pool->block.end, block.end, NULL); ^ 6 errors generated. Cc: mesa-stable Reviewed-by: Roman Stratiienko <r.stratiie...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25963> (cherry picked from commit 520e79a3b5841db034d6d962870432d21fd0989c) --- .pick_status.json | 2 +- android/mesa3d_cross.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d5b79d0fc14..5855a541c33 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -304,7 +304,7 @@ "description": "Android.mk: filter out cflags to build with Android 14 bundled clang", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk index bfee1eadb2d..4b271dd822e 100644 --- a/android/mesa3d_cross.mk +++ b/android/mesa3d_cross.mk @@ -203,7 +203,9 @@ define m-c-flags endef define filter-c-flags - $(filter-out -std=gnu++17 -std=gnu++14 -std=gnu99 -fno-rtti, \ + $(filter-out -std=gnu++17 -std=gnu++14 -std=gnu99 -fno-rtti \ + -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang \ + -ftrivial-auto-var-init=zero, $(patsubst -W%,, $1)) endef