diff mbox

[U-Boot,v2,3/8] acpi: Pass -D__ASSEMBLY__ when compiling ASL files

Message ID 1464229153-23917-4-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 6683584c08cd58ed88a6b60d613bca9086bf8fab
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng May 26, 2016, 2:19 a.m. UTC
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>

---

Changes in v2:
- Use __ASSEMBLY__ define

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng May 27, 2016, 2:14 a.m. UTC | #1
On Thu, May 26, 2016 at 10:19 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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>
>
> ---
>
> Changes in v2:
> - Use __ASSEMBLY__ define
>
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 97a09a2..e720562 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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,$<) $@