Skip to content

gcc build fixes for configure/libtool - #105

Merged
lgirdwood merged 4 commits into
masterfrom
lrg/gcc-fixes
Jul 15, 2018
Merged

lgirdwood merged 4 commits into
masterfrom
lrg/gcc-fixes

Conversation

@lgirdwood

Copy link
Copy Markdown
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

plbossart commented Jul 14, 2018 via email

Copy link
Copy Markdown
Member

@lgirdwood

Copy link
Copy Markdown
Member Author

ok, great. let me check the arg duplication and we can merge now that it works for xcc too.

lrgirdwo added 4 commits July 15, 2018 10:51
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>
@lgirdwood
lgirdwood merged commit c4a9cca into master Jul 15, 2018
@jajanusz

Copy link
Copy Markdown
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>"

Comment thread configure.ac

# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants