summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorRoman Stratiienko <r.stratiienko@gmail.com>2022-06-16 13:32:56 +0300
committerMarge Bot <emma+marge@anholt.net>2022-06-17 12:28:46 +0000
commit45267d5181bb1819dbe6df285a2685d35584c318 (patch)
treead7cf8d904ce7c5b2baeff3632c53a19ee9c4fed /android
parent48243965723e53f283d7c9fbfc801c1406795e31 (diff)
downloadmesa-45267d5181bb1819dbe6df285a2685d35584c318.tar.gz
mesa-45267d5181bb1819dbe6df285a2685d35584c318.tar.bz2
mesa-45267d5181bb1819dbe6df285a2685d35584c318.zip
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@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Mauro Rossi <issor.oruam@gmail.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17078>
Diffstat (limited to 'android')
-rw-r--r--android/mesa3d_cross.mk6
1 files 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