]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
acpi: Pass -D__ASSEMBLY__ when compiling ASL files
authorBin Meng <bmeng.cn@gmail.com>
Thu, 26 May 2016 02:19:08 +0000 (19:19 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 30 May 2016 02:21:12 +0000 (10:21 +0800)
ASL files may include various U-Boot header files, but IASL compiler
does not understand any C language embedded in these header files.
To reuse those header files for ASL compiling, use __ASSEMBLY__ in
the header files to exclude everything that is not liked by IASL.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
scripts/Makefile.lib

index 97a09a272ce13626eb767224c212e22d33650678..e720562623c9332325f2768169d7bad0f8fc203a 100644 (file)
@@ -325,7 +325,7 @@ $(obj)/%.S: $(src)/%.ttf
 # ---------------------------------------------------------------------------
 quiet_cmd_acpi_c_asl= ASL     $<
 cmd_acpi_c_asl=         \
-       $(CPP) -x assembler-with-cpp -P $(UBOOTINCLUDE) -o $<.tmp $<; \
+       $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) -o $<.tmp $<; \
        iasl -p $< -tc $<.tmp $(if $(KBUILD_VERBOSE:1=), >/dev/null); \
        mv $(patsubst %.asl,%.hex,$<) $@