Bug 60364 - [PATCH] strpool: don't mix up host/build flags when cross compiling
[PATCH] strpool: don't mix up host/build flags when cross compiling
Status: NEW
Product: libatasmart
Classification: Unclassified
Component: library
Other All
: medium normal
Assigned To: Lennart Poettering
Lennart Poettering
Depends on:
  Show dependency treegraph
Reported: 2013-02-06 13:16 UTC by Peter Korsgaard
Modified: 2014-09-10 09:02 UTC (History)
2 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.