0018-contrib-add-arch-option-for-platforms-where-the-arch.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From 4ea994835ec0f0bfcf3ad1852b8c03129697c1de Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Thu, 3 Oct 2013 18:27:43 +0200
  4. Subject: [PATCH 2/3] contrib: add arch option for platforms where the arch
  5. triplet would be ambigous
  6. ---
  7. contrib/bootstrap | 11 ++++++++++-
  8. contrib/src/main.mak | 2 ++
  9. 2 files changed, 12 insertions(+), 1 deletion(-)
  10. diff --git a/contrib/bootstrap b/contrib/bootstrap
  11. index 6bf7bd5..8bbb167 100755
  12. --- a/contrib/bootstrap
  13. +++ b/contrib/bootstrap
  14. @@ -30,6 +30,7 @@ usage()
  15. echo " --disable-sout configure to not build stream output packages"
  16. echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
  17. echo " --disable-gpl configure to not build viral GPL code"
  18. + echo " --arch=ARCH configure to set the target architecture if host triple is ambigous"
  19. }
  20. BUILD=
  21. @@ -40,6 +41,7 @@ PKGS_DISABLE=
  22. BUILD_ENCODERS="1"
  23. BUILD_DISCS="1"
  24. GPL="1"
  25. +ARCH=
  26. if test ! -f "../../contrib/src/main.mak"
  27. then
  28. @@ -81,6 +83,9 @@ do
  29. --enable-*)
  30. PKGS_ENABLE="${PKGS_ENABLE} ${1#--enable-}"
  31. ;;
  32. + --arch=*)
  33. + ARCH="${1#--arch=}"
  34. + ;;
  35. *)
  36. echo "Unrecognized options $1"
  37. usage
  38. @@ -206,6 +211,7 @@ test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
  39. test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
  40. test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
  41. test -z "$GPL" || add_make_enabled "GPL"
  42. +test -z "$ARCH" || add_make "ARCH := $ARCH"
  43. #
  44. # Checks
  45. @@ -219,7 +225,10 @@ case "${OS}" in
  46. add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
  47. else
  48. check_ios_sdk
  49. - add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON" "HAVE_ARMV7A"
  50. + add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON"
  51. + if [ "$ARCH" != "arm64" ]; then
  52. + add_make_enabled "HAVE_ARMV7A"
  53. + fi
  54. fi
  55. ;;
  56. *bsd*)
  57. diff --git a/contrib/src/main.mak b/contrib/src/main.mak
  58. index 3022b1d..ec615f3 100644
  59. --- a/contrib/src/main.mak
  60. +++ b/contrib/src/main.mak
  61. @@ -35,7 +35,9 @@ PREFIX := $(abspath $(PREFIX))
  62. ifneq ($(HOST),$(BUILD))
  63. HAVE_CROSS_COMPILE = 1
  64. endif
  65. +ifeq ($(ARCH),)
  66. ARCH := $(shell $(SRC)/get-arch.sh $(HOST))
  67. +endif
  68. ifeq ($(ARCH)-$(HAVE_WIN32),x86_64-1)
  69. HAVE_WIN64 := 1
  70. --
  71. 1.8.3.4 (Apple Git-47)