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.

56 lines
1.7 KiB

  1. Fix cross-compilation
  2. Patch was backported from Apache httpd:
  3. http://svn.apache.org/viewvc?view=revision&revision=1327907
  4. http://svn.apache.org/viewvc?view=revision&revision=1328390
  5. http://svn.apache.org/viewvc?view=revision&revision=1328714
  6. Patch submitted upstream:
  7. https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
  8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  9. --- a/configure.in
  10. +++ b/configure.in
  11. @@ -118,6 +118,16 @@ AC_CANONICAL_SYSTEM
  12. echo "Configuring APR library"
  13. echo "Platform: $host"
  14. +dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
  15. +dnl we got already CC_FOR_BUILD from environment.
  16. +if test "x${build_alias}" != "x${host_alias}"; then
  17. + if test "x${CC_FOR_BUILD}" = "x"; then
  18. + CC_FOR_BUILD=cc
  19. + fi
  20. +fi
  21. +AC_SUBST(CC_FOR_BUILD)
  22. +AC_SUBST(CFLAGS_FOR_BUILD)
  23. +
  24. dnl Some initial steps for configuration. We setup the default directory
  25. dnl and which files are to be configured.
  26. --- a/Makefile.in
  27. +++ b/Makefile.in
  28. @@ -8,6 +8,8 @@ top_blddir=@apr_builddir@
  29. # APR (Apache Portable Runtime) library Makefile.
  30. #
  31. CPP = @CPP@
  32. +CC_FOR_BUILD = @CC_FOR_BUILD@
  33. +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
  34. # get substituted into some targets
  35. APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
  36. @@ -136,8 +138,13 @@ tools/gen_test_char.lo: tools/gen_test_c
  37. $(APR_MKDIR) tools
  38. $(LT_COMPILE)
  39. +ifdef CC_FOR_BUILD
  40. +tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
  41. + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
  42. +else
  43. tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
  44. $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
  45. +endif
  46. include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
  47. $(APR_MKDIR) include/private