Android: Fixes for Q and R

Fix Android-Q build:
- Use AOSP prebuilt bison by specifying $(BISON) variable
- Use AOSP prebuilt flex by specifying $(LEX) variable

Fix Android-R build:
- Add M4 environmet variable for Android R and higher (See [1])

[1] - 2bfffb9f48:Changes.md;dlc=997661002af1282d938e88c3c723037e42e5d283

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5894>
This commit is contained in:
Roman Stratiienko 2020-07-15 22:26:44 +03:00 committed by Marge Bot
parent 2adb13f187
commit 29849aca0f
4 changed files with 10 additions and 5 deletions

View File

@ -44,6 +44,11 @@ MESA_DRI_LDFLAGS := -Wl,--build-id=sha1
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
MESA_PYTHON2 := python
MESA_PYTHON3 := python3
ifeq ($(filter 5 6 7 8 9 10, $(MESA_ANDROID_MAJOR_VERSION)),)
MESA_LEX := M4=$(M4) $(LEX)
else
MESA_LEX := $(LEX)
endif
# Lists to convert driver names to boolean variables
# in form of <driver name>.<boolean make variable>

View File

@ -53,7 +53,7 @@ MESA_GEN_GLSL_H := $(addprefix $(call local-generated-sources-dir)/, \
define local-l-or-ll-to-c-or-cpp
@mkdir -p $(dir $@)
@echo "Mesa Lex: $(PRIVATE_MODULE) <= $<"
$(hide) $(LEX) --nounistd -o$@ $<
$(hide) $(MESA_LEX) --nounistd -o$@ $<
endef
define glsl_local-y-to-c-and-h

View File

@ -73,7 +73,7 @@ ir3_parser_deps := \
$(intermediates)/ir3/ir3_lexer.c: $(ir3_lexer_deps)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) flex -o $@ $<
$(hide) $(MESA_LEX) -o $@ $<
$(intermediates)/ir3/ir3_nir_imul.c: $(ir3_nir_imul_deps)
@mkdir -p $(dir $@)
@ -86,12 +86,12 @@ $(intermediates)/ir3/ir3_nir_trig.c: $(ir3_nir_trig_deps)
$(intermediates)/ir3/ir3_parser.c: $(ir3_parser_deps)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) bison $< --name-prefix=ir3_yy --output=$@
$(hide) $(BISON) $< --name-prefix=ir3_yy --output=$@
$(intermediates)/ir3/ir3_parser.h: $(ir3_parser_deps)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) bison $< --name-prefix=ir3_yy --defines=$@
$(hide) $(BISON) $< --name-prefix=ir3_yy --defines=$@
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)

View File

@ -23,7 +23,7 @@ LOCAL_PATH := $(call my-dir)
define local-l-to-c
@mkdir -p $(dir $@)
@echo "Mesa Lex: $(PRIVATE_MODULE) <= $<"
$(hide) $(LEX) -o$@ $<
$(hide) $(MESA_LEX) -o$@ $<
endef
define mesa_local-y-to-c-and-h