Mesa (main): Android.mk: Fix c11-related build failures
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 17 12:29:28 UTC 2022
Module: Mesa
Branch: main
Commit: 45267d5181bb1819dbe6df285a2685d35584c318
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=45267d5181bb1819dbe6df285a2685d35584c318
Author: Roman Stratiienko <r.stratiienko at gmail.com>
Date: Thu Jun 16 13:32:56 2022 +0300
Android.mk: Fix c11-related build failures
When building with Android.mk we are ending-up with:
gcc ..... -std=gnu99 .... -std=c11 .... target.o
^^^^^^^^^^ ^^^^^^^^
| |
_______________^_____ _____^___________
AOSP/KATI GENERATED MESON GENERATED
Some compilers uses first -std=gnu99 option and ignores second,
which results:
c99 implicit declaration of function static_assert()
This patch filters-out the first '-std=gnu99' from the cflags obtained
from AOSP/KATI dummy target output to avoid such kind of errors.
Signed-off-by: Roman Stratiienko <r.stratiienko at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Reviewed-by: Mauro Rossi <issor.oruam at gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17078>
---
android/mesa3d_cross.mk | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk
index b3cc09496a0..92bb2b28103 100644
--- a/android/mesa3d_cross.mk
+++ b/android/mesa3d_cross.mk
@@ -203,10 +203,8 @@ define m-c-flags
endef
define filter-c-flags
- $(subst -std=gnu++17,, \
- $(subst -fno-rtti,, \
- $(patsubst -W%,, \
- $1)))
+ $(filter-out -std=gnu++17 -std=gnu99 -fno-rtti, \
+ $(patsubst -W%,, $1))
endef
define m-c-abs-includes
More information about the mesa-commit
mailing list