X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fapr%2F0001-cross-compile.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fapr%2F0001-cross-compile.patch;h=5b596fb20f2e7b97de1ca9288a0d5feca6fae3d4;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/apr/0001-cross-compile.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/apr/0001-cross-compile.patch new file mode 100644 index 0000000..5b596fb --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/apr/0001-cross-compile.patch @@ -0,0 +1,58 @@ +Fix cross-compilation + +Patch was backported from Apache httpd: +http://svn.apache.org/viewvc?view=revision&revision=1327907 +http://svn.apache.org/viewvc?view=revision&revision=1328390 +http://svn.apache.org/viewvc?view=revision&revision=1328714 + +Patch submitted upstream: +https://issues.apache.org/bugzilla/show_bug.cgi?id=57058 + +Signed-off-by: Bernd Kuhls + +diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in +--- apr-1.5.1.org/configure.in 2014-01-25 16:17:29.000000000 +0100 ++++ apr-1.5.1/configure.in 2014-10-05 11:20:40.080746760 +0200 +@@ -118,6 +118,16 @@ + echo "Configuring APR library" + echo "Platform: $host" + ++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless ++dnl we got already CC_FOR_BUILD from environment. ++if test "x${build_alias}" != "x${host_alias}"; then ++ if test "x${CC_FOR_BUILD}" = "x"; then ++ CC_FOR_BUILD=cc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++AC_SUBST(CFLAGS_FOR_BUILD) ++ + dnl Some initial steps for configuration. We setup the default directory + dnl and which files are to be configured. + +diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in +--- apr-1.5.1.org/Makefile.in 2014-03-17 16:10:26.000000000 +0100 ++++ apr-1.5.1/Makefile.in 2014-10-05 11:22:53.031070519 +0200 +@@ -8,6 +8,8 @@ + # APR (Apache Portable Runtime) library Makefile. + # + CPP = @CPP@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + + # get substituted into some targets + APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ +@@ -134,8 +136,13 @@ + + OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) + tools/gen_test_char.lo: make_tools_dir ++ifdef CC_FOR_BUILD ++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS) ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< ++else + tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) + $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) ++endif + + include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ + $(APR_MKDIR) include/private