Bugzilla – Bug 60364
[PATCH] strpool: don't mix up host/build flags when cross compiling
Last modified: 2014-09-10 09:02:51 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 <email@example.com>
I was about to post the very same patch. The reasoning given here is correct. Please apply this.