OpenSDE Packages Database (without history before r20070)
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.

64 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../open-iscsi/open-iscsi-cross-compile.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Extend the Makefile to be able to cross-compile open-iscsi
  17. When cross-compiling you have to pass following with the make call:
  18. 1. CROSS_COMPILE=1
  19. 2. CROSS_BUILD_TYPE=target-triplet of the system on which the package is being
  20. configured and compiled
  21. 3. CROSS_BUILD_HOST=target-triplet of the system on which the package will run
  22. For more information check out:
  23. http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets
  24. --- a/Makefile 2012-05-21 02:59:24.000000000 +0200
  25. +++ b/Makefile 2012-08-09 23:54:55.121814352 +0200
  26. @@ -20,6 +20,23 @@
  27. ETCFILES = etc/iscsid.conf
  28. IFACEFILES = etc/iface.example
  29. +# options passed to the configure script of open-isns
  30. +ISNS_CONFOPTS =
  31. +
  32. +# cross-compile options for open-isns
  33. +ifneq ($(CROSS_COMPILE),)
  34. +ifneq ($(CROSS_BUILD_TYPE),)
  35. +ISNS_CONFOPTS += --build=$(CROSS_BUILD_TYPE)
  36. +else
  37. +$(error you need to pass CROSS_BUILD_TYPE when cross-compiling)
  38. +endif
  39. +ifneq ($(CROSS_HOST_TYPE),)
  40. +ISNS_CONFOPTS += --host=$(CROSS_HOST_TYPE)
  41. +else
  42. +$(error you need to pass CROSS_HOST_TYPE when cross-compiling)
  43. +endif
  44. +endif
  45. +
  46. # Random comments:
  47. # using '$(MAKE)' instead of just 'make' allows make to run in parallel
  48. # over multiple makefile.
  49. @@ -42,7 +59,7 @@
  50. @echo "Read README file for detailed information."
  51. utils/open-isns/Makefile: utils/open-isns/configure utils/open-isns/Makefile.in
  52. - cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" --with-security=no
  53. + cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" $(ISNS_CONFOPTS) --with-security=no
  54. kernel: force
  55. $(MAKE) -C kernel