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
Conversation
Both the GCC and XT-XCC versions give valid sound on Up2 w/ PCM512x.
Compilation on BYT works as well.
The only weird thing is that some arguments are repeated twice, e.g.
-nostdlib -mlongcalls
xtensa-byt-elf-gcc -DHAVE_CONFIG_H -I. -I../../src/include
-fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -I
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/include -I
/data/pbossart/SOF-public/sof-sdk/sof.git/src/arch/xtensa/xtos -I
/data/pbossart/SOF-public/sof-sdk/sof.git/src/platform/baytrail/include
-I
/data/pbossart/SOF-public/sof-sdk/sof.git/src/platform/baytrail/include/arch
-I /data/pbossart/SOF-public/sof-sdk/sof.git/src/include -I
/data/pbossart/SOF-public/sof-sdk/sof.git/../xtensa-root/xtensa-byt-elf/include
-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -fno-inline-functions
-nostdlib -mlongcalls -MT libcore_a-alloc.o -MD -MP -MF
.deps/libcore_a-alloc.Tpo -c -o libcore_a-alloc.o `test -f 'alloc.c' ||
echo './'`alloc.c
…On 07/14/2018 11:38 AM, Liam Girdwood wrote:
Fixes for GCC - needs to be tested with XCC.
------------------------------------------------------------------------
You can view, comment on, or merge this pull request online at:
#105
Commit Summary
* configure: gcc: make sure CFLAGS and LDFLAGS are set correctly.
* configure: rimage: Make sure rimage CFLAGS are strict.
* configure: host: Host CFLAGS should be strict
* build: host: Fix versioning for libtool.
File Changes
* *M* configure.ac
<https://github.com/thesofproject/sof/pull/105/files#diff-0> (13)
* *M* src/audio/Makefile.am
<https://github.com/thesofproject/sof/pull/105/files#diff-1> (2)
* *M* src/ipc/Makefile.am
<https://github.com/thesofproject/sof/pull/105/files#diff-2> (2)
Patch Links:
* https://github.com/thesofproject/sof/pull/105.patch
* https://github.com/thesofproject/sof/pull/105.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#105>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGIa7RyVHO1bvpysT9K7RdJFR_PzC3oks5uGh5_gaJpZM4VP6nU>.
|
ok, great. let me check the arg duplication and we can merge now that it works for xcc too. |
GCC needs flags set correctly in order to pass AC_PROG_CC test. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Turn all warnings into errors for rimage. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Turns all warnings into errors. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Libtools does not like version number starting with a leading 0 i.e. 01.1 must be converted to 1.1 Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@plbossart
|
@@ -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}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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 ;)
There was a problem hiding this comment.
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.
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue innersource-gh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes issue thesofprojectgh-105. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Fixes for GCC - needs to be tested with XCC.