You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.8 KiB

  1. From 9dcf7e679c441b877b63ff8e6dfc3865af6c6720 Mon Sep 17 00:00:00 2001
  2. From: Mauro Condarelli <mc5686 at mclink.it>
  3. Date: Sun, 22 May 2016 20:44:26 +0200
  4. Subject: [PATCH 1/1] Fix config.mak.uname to allow cross-compilation
  5. Current implementation imperatively sets variables from "uname" output.
  6. This breaks cross-compilation because uname is run on host while target
  7. configuration may be different.
  8. Make current behavior a non-imperative default, so it's possible to
  9. force different values setting make variables.
  10. To cross-compile it will be necessary to explicitly set the various
  11. uname_X variables to values compatible with target.
  12. No change is needed with normal host compilation.
  13. Patch is trivial.
  14. Signed-off-by: Mauro Condarelli <mc5686 at mclink.it>
  15. ---
  16. config.mak.uname | 12 ++++++------
  17. 1 file changed, 6 insertions(+), 6 deletions(-)
  18. --- a/config.mak.uname
  19. +++ b/config.mak.uname
  20. @@ -4,12 +4,12 @@
  21. # Microsoft's Safe Exception Handling in libraries (such as zlib).
  22. # Typically required for VS2013+/32-bit compilation on Vista+ versions.
  23. -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  24. -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
  25. -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
  26. -uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
  27. -uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
  28. -uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
  29. +uname_S ?= $(shell sh -c 'uname -s 2>/dev/null || echo not')
  30. +uname_M ?= $(shell sh -c 'uname -m 2>/dev/null || echo not')
  31. +uname_O ?= $(shell sh -c 'uname -o 2>/dev/null || echo not')
  32. +uname_R ?= $(shell sh -c 'uname -r 2>/dev/null || echo not')
  33. +uname_P ?= $(shell sh -c 'uname -p 2>/dev/null || echo not')
  34. +uname_V ?= $(shell sh -c 'uname -v 2>/dev/null || echo not')
  35. ifdef MSVC
  36. # avoid the MingW and Cygwin configuration sections