1*4882a593SmuzhiyunFrom 730158700ea7a554c37f24bfbf5f4985f7280f3e Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Peter Korsgaard <jacmet@sunsite.dk> 3*4882a593SmuzhiyunDate: Wed, 6 Feb 2013 14:07:02 +0100 4*4882a593SmuzhiyunSubject: [PATCH] strpool: don't mix up host/build flags when cross compiling 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunSubmitted upstream as https://bugs.freedesktop.org/show_bug.cgi?id=60364 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunCommit b71035ce89 (build-sys: modernize build system) changed the strpool 9*4882a593Smuzhiyun(which needs to be built for the build machine) compilation to use 10*4882a593SmuzhiyunAM_CFLAGS / AM_LDFLAGS rather than CFLAGS / LDFLAGS. This is wrong, as 11*4882a593SmuzhiyunThe AM_ version is used TOGETHER with (the user supplied) CFLAGS/LDFLAGS, 12*4882a593Smuzhiyuncausing strpool to use both CFLAGS (for host) and CCFLAGS_FOR_BUILD (for 13*4882a593Smuzhiyunbuild) flags, breaking cross compilation with errors like: 14*4882a593Smuzhiyun 15*4882a593Smuzhiyuncc1: error: unrecognized command line option "-mabi=spe" 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunInstead overwrite the (user supplied) CFLAGS with the (user supplied) 18*4882a593SmuzhiyunCFLAGS_FOR_BUILD (and similar for LDFLAGS) like we used to do. 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunSigned-off-by: Peter Korsgaard <jacmet@sunsite.dk> 21*4882a593Smuzhiyun--- 22*4882a593Smuzhiyun strpool/Makefile.am | 4 ++-- 23*4882a593Smuzhiyun 1 file changed, 2 insertions(+), 2 deletions(-) 24*4882a593Smuzhiyun 25*4882a593Smuzhiyundiff --git a/strpool/Makefile.am b/strpool/Makefile.am 26*4882a593Smuzhiyunindex b041cea..5b335a5 100644 27*4882a593Smuzhiyun--- a/strpool/Makefile.am 28*4882a593Smuzhiyun+++ b/strpool/Makefile.am 29*4882a593Smuzhiyun@@ -17,8 +17,8 @@ 30*4882a593Smuzhiyun # <http://www.gnu.org/licenses/>. 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun CC = @CC_FOR_BUILD@ 33*4882a593Smuzhiyun-AM_CFLAGS = @BUILD_CFLAGS@ 34*4882a593Smuzhiyun-AM_LDFLAGS = @BUILD_LDFLAGS@ 35*4882a593Smuzhiyun+CFLAGS = @BUILD_CFLAGS@ 36*4882a593Smuzhiyun+LDFLAGS = @BUILD_LDFLAGS@ 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun noinst_PROGRAMS = \ 39*4882a593Smuzhiyun strpool 40*4882a593Smuzhiyun-- 41*4882a593Smuzhiyun1.7.10.4 42*4882a593Smuzhiyun 43