Skip to content

Commit 8235d3d

Browse files
committed
configure: fix flags for unit tests
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
1 parent c4a9cca commit 8235d3d

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ case "$with_arch" in
8989

9090
# automake FLAGS defined here
9191
AM_CFLAGS="-fno-inline-functions -nostdlib -mlongcalls"
92-
AM_LDFLAGS="-nostdlib"
93-
AM_CCASFLAGS="-fno-inline-functions -nostdlib -mlongcalls"
92+
AM_LDFLAGS=""
93+
AM_CCASFLAGS=""
9494

9595
# GCC needs these additional flags on top of any user flags.
9696
CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"
97-
LDFLAGS="${LDFLAGS:+$LDFLAGS } ${AM_LDFLAGS}"
98-
CCASFLAGS="${CCASFLAGS:+$CCASFLAGS } ${AM_CCASFLAGS}"
97+
LDFLAGS="${LDFLAGS:+$LDFLAGS } -nostdlib"
98+
CCASFLAGS="${CCASFLAGS:+$CCASFLAGS } -fno-inline-functions -nostdlib -mlongcalls"
9999

100100
ARCH="xtensa"
101101
AC_SUBST(ARCH)

test/cmocka/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ if BUILD_XTENSA
66
LOG_COMPILER = xt-run
77
endif
88

9+
# cmocka needs stdlib
10+
override LDFLAGS := $(filter-out -nostdlib,$(LDFLAGS))
11+
912
override AM_CFLAGS := \
1013
$(filter-out -nostdlib,$(AM_CFLAGS)) \
1114
$(SOF_INCDIR)

0 commit comments

Comments
 (0)