0001-cross-compile.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. This patch allows us to set a value for the cross compiler via TARGETCC without
  2. setting CC on the command line. CC is used for host tools as well as cross
  3. compiled code so we cannot define it on the command line without breaking
  4. the host tools build.
  5. [Gustavo: update for nss 3.16.1]
  6. [baruch: add OPTIMIZER handling]
  7. Signed-off-by: Will Newton <will.newton@imgtec.com>
  8. diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk
  9. --- nss-3.16.1-orig/nss/coreconf/Linux.mk 2014-05-02 06:27:18.000000000 +0300
  10. +++ nss-3.16.1/nss/coreconf/Linux.mk 2014-07-01 02:38:18.701480512 +0300
  11. @@ -16,9 +16,13 @@
  12. IMPL_STRATEGY = _PTH
  13. endif
  14. -CC = gcc
  15. -CCC = g++
  16. -RANLIB = ranlib
  17. +TARGETCC = gcc
  18. +TARGETCCC = g++
  19. +TARGETRANLIB = ranlib
  20. +
  21. +CC = $(TARGETCC)
  22. +CCC = $(TARGETCCC)
  23. +RANLIB = $(TARGETRANLIB)
  24. DEFAULT_COMPILER = gcc
  25. @@ -125,6 +129,7 @@
  26. endif
  27. endif
  28. +OPTIMIZER = $(TARGET_OPTIMIZER)
  29. ifeq ($(USE_PTHREADS),1)
  30. OS_PTHREAD = -lpthread
  31. diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile
  32. --- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile 2014-05-02 06:27:18.000000000 +0300
  33. +++ nss-3.16.1/nss/coreconf/nsinstall/Makefile 2014-07-01 02:38:48.102185011 +0300
  34. @@ -31,6 +31,7 @@
  35. ifdef NATIVE_FLAGS
  36. OS_CFLAGS=$(NATIVE_FLAGS)
  37. +OPTIMIZER=
  38. endif
  39. include $(DEPTH)/coreconf/rules.mk