Bug 60364

Summary: [PATCH] strpool: don't mix up host/build flags when cross compiling
Product: libatasmart Reporter: Peter Korsgaard <jacmet>
Component: libraryAssignee: Lennart Poettering <lennart>
Status: NEW --- QA Contact: Lennart Poettering <lennart>
Severity: normal    
Priority: medium CC: chewi, wippbox, zeuthen
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch to fix issue

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.