Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc build fixes for configure/libtool #105

Merged
merged 4 commits into from
Jul 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 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 @@ -94,6 +91,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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't put AM_* flags in user FLAGS, cos it will cause duplication, flags should be in LDFLAGS if is forced or in AM_LDFLAGS otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AC_PROG_CC needs correct CFLAGS etc otherwise compiler is sane check fails. AC_PROG_CC needs and expects a target C library (which we don't need).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CFLAGS are ok I meant LDFLAGS/CCASFLAGS ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, can you fix them and add to your unit test build script PR.

CCASFLAGS="${CCASFLAGS:+$CCASFLAGS } ${AM_CCASFLAGS}"

ARCH="xtensa"
AC_SUBST(ARCH)

Expand Down