0003-Revert-Add-the-ability-to-cross-compile-APR.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. From a8fd928dfab693278205e73286e3a6b622624aeb Mon Sep 17 00:00:00 2001
  2. From: Graham Leggett <minfrin@apache.org>
  3. Date: Tue, 31 Dec 2019 21:26:02 +0000
  4. Subject: [PATCH] Revert: Add the ability to cross compile APR.
  5. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872147 13f79535-47bb-0310-9956-ffa450edef68
  6. [Revert upstream commit https://github.com/apache/apr/commit/b6dbbc77da35a7b46754c99f465827f2a583e23c]
  7. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  8. [Dario: adapt to 1.7.5]
  9. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
  10. ---
  11. CHANGES | 2 --
  12. apr-config.in | 22 ----------------------
  13. 2 files changed, 24 deletions(-)
  14. diff --git a/CHANGES b/CHANGES
  15. index 793b0b6a46a4..4705b8476ff3 100644
  16. --- a/CHANGES
  17. +++ b/CHANGES
  18. @@ -119,8 +119,6 @@ Changes for APR 1.7.5
  19. *) Don't try to use PROC_PTHREAD by default when cross compiling.
  20. [Yann Ylavic]
  21. - *) Add the ability to cross compile APR. [Graham Leggett]
  22. -
  23. *) While cross-compiling, the tools/gen_test_char could not
  24. be executed at build time, use AX_PROG_CC_FOR_BUILD to
  25. build native tools/gen_test_char
  26. diff --git a/apr-config.in b/apr-config.in
  27. index 1203d9a0d38e..bcd4a0c10399 100644
  28. --- a/apr-config.in
  29. +++ b/apr-config.in
  30. @@ -61,14 +61,6 @@ if test "$cross_compiling" != "no"; then
  31. # Remove trailing '/'
  32. normalized_bindir=${normalized_bindir%/}
  33. - # absolute path, but not installed path - we're cross compiling
  34. - case "$normalized_command" in
  35. - "${normalized_bindir}/"*) ;;
  36. - "/"*) location=crosscompile;
  37. - APR_TARGET_DIR=${normalized_command%${normalized_bindir}/apr-${APR_MAJOR_VERSION}-config};
  38. - ;;
  39. - *) ;;
  40. - esac
  41. fi
  42. show_usage()
  43. @@ -116,8 +108,6 @@ fi
  44. if test "$location" = "installed"; then
  45. LA_FILE="$libdir/lib${APR_LIBNAME}.la"
  46. -elif test "$location" = "crosscompile"; then
  47. - LA_FILE="$APR_TARGET_DIR/$libdir/lib${APR_LIBNAME}.la"
  48. else
  49. LA_FILE="$APR_BUILD_DIR/lib${APR_LIBNAME}.la"
  50. fi
  51. @@ -147,8 +137,6 @@ while test $# -gt 0; do
  52. --includedir)
  53. if test "$location" = "installed"; then
  54. flags="$includedir"
  55. - elif test "$location" = "crosscompile"; then
  56. - flags="$APR_TARGET_DIR/$includedir"
  57. elif test "$location" = "source"; then
  58. flags="$APR_SOURCE_DIR/include"
  59. else
  60. @@ -181,8 +169,6 @@ while test $# -gt 0; do
  61. --includes)
  62. if test "$location" = "installed"; then
  63. flags="$flags -I$includedir $EXTRA_INCLUDES"
  64. - elif test "$location" = "crosscompile"; then
  65. - flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES"
  66. elif test "$location" = "source"; then
  67. flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
  68. else
  69. @@ -197,8 +183,6 @@ while test $# -gt 0; do
  70. --installbuilddir)
  71. if test "$location" = "installed"; then
  72. echo "${installbuilddir}"
  73. - elif test "$location" = "crosscompile"; then
  74. - echo "$APR_TARGET_DIR/${installbuilddir}"
  75. elif test "$location" = "source"; then
  76. echo "$APR_SOURCE_DIR/build"
  77. else
  78. @@ -215,8 +199,6 @@ while test $# -gt 0; do
  79. if test "$location" = "installed"; then
  80. ### avoid using -L if libdir is a "standard" location like /usr/lib
  81. flags="$flags -L$libdir -l${APR_LIBNAME}"
  82. - elif test "$location" = "crosscompile"; then
  83. - flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}"
  84. else
  85. ### this surely can't work since the library is in .libs?
  86. flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
  87. @@ -234,8 +216,6 @@ while test $# -gt 0; do
  88. # Since the user is specifying they are linking with libtool, we
  89. # *know* that -R will be recognized by libtool.
  90. flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
  91. - elif test "$location" = "crosscompile"; then
  92. - flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}"
  93. else
  94. flags="$flags $LA_FILE"
  95. fi
  96. @@ -260,8 +240,6 @@ while test $# -gt 0; do
  97. --apr-libtool)
  98. if test "$location" = "installed"; then
  99. echo "${installbuilddir}/libtool"
  100. - elif test "$location" = "crosscompile"; then
  101. - echo "$APR_TARGET_DIR/${installbuilddir}/build"
  102. else
  103. echo "$APR_BUILD_DIR/libtool"
  104. fi
  105. --
  106. 2.43.0