Bug 60364 - [PATCH] strpool: don't mix up host/build flags when cross compiling
Summary: [PATCH] strpool: don't mix up host/build flags when cross compiling
Status: NEW
Alias: None
Product: libatasmart
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Lennart Poettering
QA Contact: Lennart Poettering
Depends on:
Reported: 2013-02-06 13:16 UTC by Peter Korsgaard
Modified: 2016-08-08 13:38 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

patch to fix issue (1.32 KB, text/plain)
2013-02-06 13:16 UTC, Peter Korsgaard

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Korsgaard 2013-02-06 13:16:35 UTC
Created attachment 74287 [details]
patch to fix issue

Commit b71035ce89 (build-sys: modernize build system) changed the strpool
(which needs to be built for the build machine) compilation to use
AM_CFLAGS / AM_LDFLAGS rather than CFLAGS / LDFLAGS. This is wrong, as
The AM_ version is used TOGETHER with (the user supplied) CFLAGS/LDFLAGS,
causing strpool to use both CFLAGS (for host) and CCFLAGS_FOR_BUILD (for
build) flags, breaking cross compilation with errors like:

cc1: error: unrecognized command line option "-mabi=spe"

Instead overwrite the (user supplied) CFLAGS with the (user supplied)
CFLAGS_FOR_BUILD (and similar for LDFLAGS) like we used to do.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Comment 1 James Le Cuirot 2014-09-10 09:02:51 UTC
I was about to post the very same patch. The reasoning given here is correct. Please apply this.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.