aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-08-02 21:57:20 +0300
committerKevin O'Connor <kevin@koconnor.net>2012-08-04 10:57:59 -0400
commit4da0725dc39d2e64d8efa593210599004833269b (patch)
treeb5cea6fbff6daafbe6951fee3a23e1d20379b8c9 /Makefile
parent008c1fc5bd4f1c545c38e07242ad676830ea7785 (diff)
downloadseabios-hppa-4da0725dc39d2e64d8efa593210599004833269b.zip
seabios-hppa-4da0725dc39d2e64d8efa593210599004833269b.tar.gz
seabios-hppa-4da0725dc39d2e64d8efa593210599004833269b.tar.bz2
acpi: fix build with new iasl compiler
iasl versions starting with 20120320 (git commit 7fd09d993580e22a096a1b21d2a356d89e702153) enable a preprocessor by default, which currently strips out comments from the input. Happily the next release, 20120420, includes an option to disable the preprocessor. Test and use this option when available. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index dfdec5c..849824d 100644
--- a/Makefile
+++ b/Makefile
@@ -221,11 +221,14 @@ $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py
################ DSDT build rules
+iasl-option=$(shell if "$(1)" "$(2)" -h > /dev/null 2>&1 \
+ ; then echo "$(2)"; else echo "$(3)"; fi ;)
+
$(OUT)%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py
@echo " Compiling IASL $@"
$(Q)cpp -P $< > $(OUT)$*.dsl.i.orig
$(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i
- $(Q)$(IASL) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
+ $(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
$(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
$(Q)cat $(OUT)$*.off > $@