0001-strpool-cross-flags.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 730158700ea7a554c37f24bfbf5f4985f7280f3e Mon Sep 17 00:00:00 2001
  2. From: Peter Korsgaard <jacmet@sunsite.dk>
  3. Date: Wed, 6 Feb 2013 14:07:02 +0100
  4. Subject: [PATCH] strpool: don't mix up host/build flags when cross compiling
  5. Submitted upstream as https://bugs.freedesktop.org/show_bug.cgi?id=60364
  6. Commit b71035ce89 (build-sys: modernize build system) changed the strpool
  7. (which needs to be built for the build machine) compilation to use
  8. AM_CFLAGS / AM_LDFLAGS rather than CFLAGS / LDFLAGS. This is wrong, as
  9. The AM_ version is used TOGETHER with (the user supplied) CFLAGS/LDFLAGS,
  10. causing strpool to use both CFLAGS (for host) and CCFLAGS_FOR_BUILD (for
  11. build) flags, breaking cross compilation with errors like:
  12. cc1: error: unrecognized command line option "-mabi=spe"
  13. Instead overwrite the (user supplied) CFLAGS with the (user supplied)
  14. CFLAGS_FOR_BUILD (and similar for LDFLAGS) like we used to do.
  15. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  16. ---
  17. strpool/Makefile.am | 4 ++--
  18. 1 file changed, 2 insertions(+), 2 deletions(-)
  19. diff --git a/strpool/Makefile.am b/strpool/Makefile.am
  20. index b041cea..5b335a5 100644
  21. --- a/strpool/Makefile.am
  22. +++ b/strpool/Makefile.am
  23. @@ -17,8 +17,8 @@
  24. # <http://www.gnu.org/licenses/>.
  25. CC = @CC_FOR_BUILD@
  26. -AM_CFLAGS = @BUILD_CFLAGS@
  27. -AM_LDFLAGS = @BUILD_LDFLAGS@
  28. +CFLAGS = @BUILD_CFLAGS@
  29. +LDFLAGS = @BUILD_LDFLAGS@
  30. noinst_PROGRAMS = \
  31. strpool
  32. --
  33. 1.7.10.4