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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. From b4f5f62a309c7dafe7cece1d769aa1f99f931b63 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 16/20] contrib: add arch option for platforms where the arch
  5. triplet would be ambigous
  6. ---
  7. contrib/bootstrap | 16 +++++++++++++++-
  8. contrib/src/main.mak | 2 ++
  9. 2 files changed, 17 insertions(+), 1 deletion(-)
  10. diff --git a/contrib/bootstrap b/contrib/bootstrap
  11. index b77a9d9..86d4b9e 100755
  12. --- a/contrib/bootstrap
  13. +++ b/contrib/bootstrap
  14. @@ -31,6 +31,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. @@ -42,6 +43,7 @@ BUILD_ENCODERS="1"
  22. BUILD_NETWORK="1"
  23. BUILD_DISCS="1"
  24. GPL="1"
  25. +ARCH=
  26. if test ! -f "../../contrib/src/main.mak"
  27. then
  28. @@ -86,6 +88,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. @@ -222,6 +227,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
  39. test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
  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. @@ -235,7 +241,15 @@ 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"
  51. + case "${ARCH}" in
  52. + *arm*)
  53. + add_make_enabled "HAVE_NEON"
  54. + if [ "$ARCH" != "arm64" ]; then
  55. + add_make_enabled "HAVE_ARMV7A"
  56. + fi
  57. + ;;
  58. + esac
  59. fi
  60. ;;
  61. *bsd*)
  62. diff --git a/contrib/src/main.mak b/contrib/src/main.mak
  63. index dd2bd25..2b085ea 100644
  64. --- a/contrib/src/main.mak
  65. +++ b/contrib/src/main.mak
  66. @@ -35,7 +35,9 @@ PREFIX := $(abspath $(PREFIX))
  67. ifneq ($(HOST),$(BUILD))
  68. HAVE_CROSS_COMPILE = 1
  69. endif
  70. +ifndef ARCH
  71. ARCH := $(shell $(SRC)/get-arch.sh $(HOST))
  72. +endif
  73. ifeq ($(ARCH)-$(HAVE_WIN32),x86_64-1)
  74. HAVE_WIN64 := 1
  75. --
  76. 1.9.3 (Apple Git-50)