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.

44 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. diff --git a/config.mak.uname b/config.mak.uname
  19. index 40d6b29..d933b23 100644
  20. --- a/config.mak.uname
  21. +++ b/config.mak.uname
  22. @@ -1,11 +1,11 @@
  23. # Platform specific Makefile tweaks based on uname detection
  24. -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  25. -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
  26. -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
  27. -uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
  28. -uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
  29. -uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
  30. +uname_S ?= $(shell sh -c 'uname -s 2>/dev/null || echo not')
  31. +uname_M ?= $(shell sh -c 'uname -m 2>/dev/null || echo not')
  32. +uname_O ?= $(shell sh -c 'uname -o 2>/dev/null || echo not')
  33. +uname_R ?= $(shell sh -c 'uname -r 2>/dev/null || echo not')
  34. +uname_P ?= $(shell sh -c 'uname -p 2>/dev/null || echo not')
  35. +uname_V ?= $(shell sh -c 'uname -v 2>/dev/null || echo not')
  36. ifdef MSVC
  37. # avoid the MingW and Cygwin configuration sections