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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. From ed1daed074fba0dabff825e63525d751b6bb7b8d 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. ---
  9. CHANGES | 2 --
  10. apr-config.in | 22 ----------------------
  11. 2 files changed, 24 deletions(-)
  12. diff --git a/CHANGES b/CHANGES
  13. index 71b2f0e..e751c90 100644
  14. --- a/CHANGES
  15. +++ b/CHANGES
  16. @@ -56,8 +56,6 @@ Changes for APR 1.7.1
  17. *) Don't try to use PROC_PTHREAD by default when cross compiling.
  18. [Yann Ylavic]
  19. - *) Add the ability to cross compile APR. [Graham Leggett]
  20. -
  21. *) While cross-compiling, the tools/gen_test_char could not
  22. be executed at build time, use AX_PROG_CC_FOR_BUILD to
  23. build native tools/gen_test_char
  24. diff --git a/apr-config.in b/apr-config.in
  25. index 4873fc0..84b4073 100644
  26. --- a/apr-config.in
  27. +++ b/apr-config.in
  28. @@ -48,14 +48,6 @@ APR_LIBNAME="@APR_LIBNAME@"
  29. # NOTE: the following line is modified during 'make install': alter with care!
  30. location=@APR_CONFIG_LOCATION@
  31. -# absolute path, but not installed path - we're cross compiling
  32. -case "$0" in
  33. - "${bindir}/"*) ;;
  34. - "/"*) location=crosscompile;
  35. - APR_TARGET_DIR=${0%${bindir}/apr-${APR_MAJOR_VERSION}-config} ;;
  36. - *) ;;
  37. -esac
  38. -
  39. show_usage()
  40. {
  41. cat << EOF
  42. @@ -101,8 +93,6 @@ fi
  43. if test "$location" = "installed"; then
  44. LA_FILE="$libdir/lib${APR_LIBNAME}.la"
  45. -elif test "$location" = "crosscompile"; then
  46. - LA_FILE="$APR_TARGET_DIR/$libdir/lib${APR_LIBNAME}.la"
  47. else
  48. LA_FILE="$APR_BUILD_DIR/lib${APR_LIBNAME}.la"
  49. fi
  50. @@ -132,8 +122,6 @@ while test $# -gt 0; do
  51. --includedir)
  52. if test "$location" = "installed"; then
  53. flags="$includedir"
  54. - elif test "$location" = "crosscompile"; then
  55. - flags="$APR_TARGET_DIR/$includedir"
  56. elif test "$location" = "source"; then
  57. flags="$APR_SOURCE_DIR/include"
  58. else
  59. @@ -166,8 +154,6 @@ while test $# -gt 0; do
  60. --includes)
  61. if test "$location" = "installed"; then
  62. flags="$flags -I$includedir $EXTRA_INCLUDES"
  63. - elif test "$location" = "crosscompile"; then
  64. - flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES"
  65. elif test "$location" = "source"; then
  66. flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
  67. else
  68. @@ -182,8 +168,6 @@ while test $# -gt 0; do
  69. --installbuilddir)
  70. if test "$location" = "installed"; then
  71. echo "${installbuilddir}"
  72. - elif test "$location" = "crosscompile"; then
  73. - echo "$APR_TARGET_DIR/${installbuilddir}"
  74. elif test "$location" = "source"; then
  75. echo "$APR_SOURCE_DIR/build"
  76. else
  77. @@ -200,8 +184,6 @@ while test $# -gt 0; do
  78. if test "$location" = "installed"; then
  79. ### avoid using -L if libdir is a "standard" location like /usr/lib
  80. flags="$flags -L$libdir -l${APR_LIBNAME}"
  81. - elif test "$location" = "crosscompile"; then
  82. - flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}"
  83. else
  84. ### this surely can't work since the library is in .libs?
  85. flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
  86. @@ -219,8 +201,6 @@ while test $# -gt 0; do
  87. # Since the user is specifying they are linking with libtool, we
  88. # *know* that -R will be recognized by libtool.
  89. flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
  90. - elif test "$location" = "crosscompile"; then
  91. - flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}"
  92. else
  93. flags="$flags $LA_FILE"
  94. fi
  95. @@ -245,8 +225,6 @@ while test $# -gt 0; do
  96. --apr-libtool)
  97. if test "$location" = "installed"; then
  98. echo "${installbuilddir}/libtool"
  99. - elif test "$location" = "crosscompile"; then
  100. - echo "$APR_TARGET_DIR/${installbuilddir}/build"
  101. else
  102. echo "$APR_BUILD_DIR/libtool"
  103. fi
  104. --
  105. 2.39.2