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

gcc build fixes for configure/libtool #105

merged 4 commits into from Jul 15, 2018

Conversation

lgirdwood
Copy link
Member

Fixes for GCC - needs to be tested with XCC.

@lgirdwood lgirdwood requested a review from jajanusz July 14, 2018 16:38
@lgirdwood lgirdwood changed the title Lrg/gcc fixes gcc build fixes for configure/libtool Jul 14, 2018
@lgirdwood lgirdwood added this to the 1.2 milestone Jul 14, 2018
@plbossart
Copy link
Member

plbossart commented Jul 14, 2018 via email

@lgirdwood
Copy link
Member Author

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>
@jajanusz
Copy link
Contributor

@plbossart
It is duplicated because final flags composed by automake look like (simplified example for CFLAGS):

  1. In default case: CFLAGS == "$AM_CFLAGS $CFLAGS"
  2. When you set custom flags for target like:
    something_CFLAGS="<myflags>"
    It ignores AM_CFLAGS and sets cflags as "$something_CFLAGS $CFLAGS", that's why for custom targets you usually have it defined as
    something_CFLAGS="$AM_CFLAGS <myflags>"

@@ -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.

@lgirdwood lgirdwood deleted the lrg/gcc-fixes branch November 13, 2018 20:20
abonislawski pushed a commit to abonislawski/sof that referenced this pull request Aug 4, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
pjdobrowolski pushed a commit to pjdobrowolski/sof_zephyr that referenced this pull request Aug 10, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
aborisovich pushed a commit that referenced this pull request Aug 18, 2022
Fixes issue innersource-gh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
ArsenEloglian pushed a commit to ArsenEloglian/sof that referenced this pull request Aug 31, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
aborisovich pushed a commit to aborisovich/sof that referenced this pull request Sep 21, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
marcinszkudlinski pushed a commit to marcinszkudlinski/sof that referenced this pull request Sep 22, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
dabekjakub pushed a commit to dabekjakub/sof that referenced this pull request Oct 12, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
kfrydryx pushed a commit to kfrydryx/sof that referenced this pull request Nov 8, 2022
Fixes issue thesofprojectgh-105.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants