configure: fix flags for unit tests

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2018-07-16 13:24:18 +02:00
parent c4a9cca0a9
commit 8235d3d61a
2 changed files with 7 additions and 4 deletions

View File

@ -89,13 +89,13 @@ case "$with_arch" in
# automake FLAGS defined here
AM_CFLAGS="-fno-inline-functions -nostdlib -mlongcalls"
AM_LDFLAGS="-nostdlib"
AM_CCASFLAGS="-fno-inline-functions -nostdlib -mlongcalls"
AM_LDFLAGS=""
AM_CCASFLAGS=""
# GCC needs these additional flags on top of any user flags.
CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"
LDFLAGS="${LDFLAGS:+$LDFLAGS } ${AM_LDFLAGS}"
CCASFLAGS="${CCASFLAGS:+$CCASFLAGS } ${AM_CCASFLAGS}"
LDFLAGS="${LDFLAGS:+$LDFLAGS } -nostdlib"
CCASFLAGS="${CCASFLAGS:+$CCASFLAGS } -fno-inline-functions -nostdlib -mlongcalls"
ARCH="xtensa"
AC_SUBST(ARCH)

View File

@ -6,6 +6,9 @@ if BUILD_XTENSA
LOG_COMPILER = xt-run
endif
# cmocka needs stdlib
override LDFLAGS := $(filter-out -nostdlib,$(LDFLAGS))
override AM_CFLAGS := \
$(filter-out -nostdlib,$(AM_CFLAGS)) \
$(SOF_INCDIR)