[Sound-open-firmware] [PATCH] build: configure: make sure we can include C headers in assembly

Liam Girdwood liam.r.girdwood at linux.intel.com
Tue Jan 23 17:39:58 CET 2018


Set ASSEMBLY when we are building .S files so that C headers can
be included.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 configure.ac                | 4 ++++
 src/arch/xtensa/Makefile.am | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index 40e8b9b..20c5ab4 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 fe27c24..c8414a1 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)
 
-- 
2.14.1



More information about the Sound-open-firmware mailing list