From cc9fba353e1cd09cbb00faa8ff7945d90619ddfb Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 22 Jan 2018 23:31:24 +0000 Subject: [PATCH] build: configure: make sure we can include C headers in assembly Set ASSEMBLY when we are building .S files so that C headers can be included. Signed-off-by: Liam Girdwood --- configure.ac | 4 ++++ src/arch/xtensa/Makefile.am | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 40e8b9ba1..20c5ab428 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,10 @@ AC_CANONICAL_HOST # General compiler flags CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -fno-inline-functions -nostdlib -Wmissing-prototypes" +# General assembler flags +ASFLAGS="-DASSEMBLY" +AC_SUBST(ASFLAGS) + # Cross compiler tool libgcc and headers AC_ARG_WITH([root-dir], AS_HELP_STRING([--with-root-dir], [Specify location of cross gcc libraries and headers]), diff --git a/src/arch/xtensa/Makefile.am b/src/arch/xtensa/Makefile.am index fe27c2448..c8414a11c 100644 --- a/src/arch/xtensa/Makefile.am +++ b/src/arch/xtensa/Makefile.am @@ -23,6 +23,7 @@ libreset_a_SOURCES = \ libreset_a_CCASFLAGS = \ $(ARCH_INCDIR) \ + $(ASFLAGS) \ $(ARCH_ASFLAGS) \ $(PLATFORM_INCDIR) \ -mtext-section-literals @@ -42,6 +43,7 @@ reef_CFLAGS = \ reef_CCASFLAGS = \ $(ARCH_INCDIR) \ + $(ASFLAGS) \ $(ARCH_ASFLAGS) \ $(PLATFORM_INCDIR)