Skip to content

Commit

Permalink
Merge pull request #105 from thesofproject/lrg/gcc-fixes
Browse files Browse the repository at this point in the history
gcc build fixes for configure/libtool
  • Loading branch information
lgirdwood authored Jul 15, 2018
2 parents 295d0c1 + 7920409 commit c4a9cca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ AC_DEFINE_UNQUOTED([SOF_MICRO], sof_micro, [Sof micro version])

AC_CANONICAL_HOST

# General compiler flags
CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"

# General assembler flags
ASFLAGS="-DASSEMBLY"
AC_SUBST(ASFLAGS)
Expand Down Expand Up @@ -68,6 +65,7 @@ AM_CONDITIONAL(BUILD_LIB, test "$have_library" = "yes")
AC_ARG_ENABLE(rimage, [AS_HELP_STRING([--enable-rimage],[build rimage tool])], have_rimage=$enableval, have_rimage=no)
if test "$have_rimage" = "yes"; then
AC_DEFINE([CONFIG_RIMAGE], [1], [Configure to build rimage])
AM_CFLAGS="-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"
fi
AM_CONDITIONAL(BUILD_RIMAGE, test "$have_rimage" = "yes")

Expand All @@ -94,6 +92,11 @@ case "$with_arch" in
AM_LDFLAGS="-nostdlib"
AM_CCASFLAGS="-fno-inline-functions -nostdlib -mlongcalls"

# 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}"

ARCH="xtensa"
AC_SUBST(ARCH)

Expand All @@ -107,9 +110,9 @@ case "$with_arch" in
ARCH_CFLAGS="-g"

# automake FLAGS defined here
AM_CFLAGS="-O3"
AM_CFLAGS="-O3 -Wall -Werror -Wl,-EL -Wmissing-prototypes"
AM_LDFLAGS="-lpthread"
AM_CCASFLAGS="-O3"
AM_CCASFLAGS="-O3 -Wall -Werror -Wl,-EL -Wmissing-prototypes"

ARCH="host"
AC_SUBST(ARCH)
Expand Down
2 changes: 1 addition & 1 deletion src/audio/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if BUILD_HOST
# common linker flags for host libs
host_lib_ldflags = \
$(AM_LDFLAGS) \
-version-info `echo $(VERSION) | cut -d '.' -f 1` \
-version-info `echo $(VERSION) | cut -d '.' -f 1 | cut -d '0' -f 2` \
-no-undefined \
-export-dynamic

Expand Down
2 changes: 1 addition & 1 deletion src/ipc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libsof_ipc_la_SOURCES = \

libsof_ipc_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info `echo $(VERSION) | cut -d '.' -f 1` \
-version-info `echo $(VERSION) | cut -d '.' -f 1 | cut -d '0' -f 2` \
-no-undefined \
-export-dynamic

Expand Down

0 comments on commit c4a9cca

Please sign in to comment.