diff options
author | Luca Stefani <luca.stefani.ge1@gmail.com> | 2023-04-29 11:34:49 +0200 |
---|---|---|
committer | Luca Stefani <luca.stefani.ge1@gmail.com> | 2023-04-29 11:38:36 +0200 |
commit | 61abc3e11dc98faddb7e7c2313a067595e5d2a1b (patch) | |
tree | a62b1d9b9e223ea6281edc49544c722aad7a2e09 | |
parent | 64580cdc07ca8ce61831c88f256a98020e49a2e0 (diff) | |
download | mesa3d-61abc3e11dc98faddb7e7c2313a067595e5d2a1b.tar.gz |
Fixup freedren bison/lex usage
All the calls to bison and flex were duplicated.
The bison calls were missing the M4 env variable
causing the usage of m4 from $PATH instead of prebuilts.
Seems like mesa had already in place a way to make
use use proper calls to flex, we augment that to also
support bison ( depending Android version )
Change-Id: Ibe4e9224b23c7574975df1c7101c69581bc353b4
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | src/freedreno/Android.ir3.mk | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk index aea610b2fa1..2a60410506a 100644 --- a/Android.mk +++ b/Android.mk @@ -54,8 +54,10 @@ MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk MESA_PYTHON3 := python3 ifeq ($(filter 5 6 7 8 9 10, $(MESA_ANDROID_MAJOR_VERSION)),) MESA_LEX := M4=$(M4) $(LEX) +MESA_BISON := M4=$(M4) $(BISON) else MESA_LEX := $(LEX) +MESA_BISON := $(BISON) endif # Lists to convert driver names to boolean variables diff --git a/src/freedreno/Android.ir3.mk b/src/freedreno/Android.ir3.mk index c46564e55af..a3059da5e47 100644 --- a/src/freedreno/Android.ir3.mk +++ b/src/freedreno/Android.ir3.mk @@ -78,8 +78,7 @@ ir3_parser_deps := \ $(intermediates)/ir3/ir3_lexer.c: $(ir3_lexer_deps) $(LEX) $(M4) @mkdir -p $(dir $@) @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" - $(hide) $(MESA_LEX) -o $@ $< - $(hide) M4=$(M4) $(LEX) --nounistd -o$@ $< + $(hide) $(MESA_LEX) --nounistd -o$@ $< $(intermediates)/ir3/ir3_nir_imul.c: $(prebuilt_intermediates)/ir3/ir3_nir_imul.c cp -a $< $@ @@ -90,14 +89,12 @@ $(intermediates)/ir3/ir3_nir_trig.c: $(prebuilt_intermediates)/ir3/ir3_nir_trig. $(intermediates)/ir3/ir3_parser.c: $(ir3_parser_deps) $(BISON) $(BISON_DATA) $(M4) @mkdir -p $(dir $@) @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" - $(hide) $(BISON) $< --name-prefix=ir3_yy --output=$@ - $(hide) M4=$(M4) $(BISON) $< --name-prefix=ir3_yy --output=$@ + $(hide) $(MESA_BISON) $< --name-prefix=ir3_yy --output=$@ $(intermediates)/ir3/ir3_parser.h: $(ir3_parser_deps) $(BISON) $(BISON_DATA) $(M4) @mkdir -p $(dir $@) @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" - $(hide) $(BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c - $(hide) M4=$(M4) $(BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c + $(hide) $(MESA_BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) |