sngrep: fix error if gnutls and openssl are both enabled
[buildroot-gz.git] / package / apache / 0001-cross-compile.patch
blob790b7a04908ea434b527eb40a8c500404d156012
1 Fix cross-compilation
3 Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker:
4 https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6
6 which is a bundle of upstream revisions:
7 http://svn.apache.org/viewvc?view=revision&revision=1327907
8 http://svn.apache.org/viewvc?view=revision&revision=1328390
9 http://svn.apache.org/viewvc?view=revision&revision=1328714
11 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
13 Index: server/Makefile.in
14 ===================================================================
15 --- a/server/Makefile.in (revision 1328714)
16 +++ b/server/Makefile.in (working copy)
17 @@ -22,9 +22,14 @@
18 include $(top_builddir)/build/rules.mk
19 include $(top_srcdir)/build/library.mk
21 +ifdef CC_FOR_BUILD
22 +gen_test_char: gen_test_char.c
23 + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
24 +else
25 gen_test_char_OBJECTS = gen_test_char.lo
26 gen_test_char: $(gen_test_char_OBJECTS)
27 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
28 +endif
30 test_char.h: gen_test_char
31 ./gen_test_char > test_char.h
32 Index: configure.in
33 ===================================================================
34 --- a/configure.in (revision 1328714)
35 +++ b/configure.in (working copy)
36 @@ -193,6 +193,14 @@
37 dnl Try to get c99 support for variadic macros
38 ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
40 +dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
41 +dnl we got already CC_FOR_BUILD from environment.
42 +if test "x${build_alias}" != "x${host_alias}"; then
43 + if test "x${CC_FOR_BUILD}" = "x"; then
44 + CC_FOR_BUILD=cc
45 + fi
46 +fi
48 if test "x${cache_file}" = "x/dev/null"; then
49 # Likewise, ensure that CC and CPP are passed through to the pcre
50 # configure script iff caching is disabled (the autoconf 2.5x default).
51 Index: acinclude.m4
52 ===================================================================
53 --- a/acinclude.m4 (revision 1328714)
54 +++ ab/cinclude.m4 (working copy)
55 @@ -53,6 +53,8 @@
56 APACHE_SUBST(CPPFLAGS)
57 APACHE_SUBST(CFLAGS)
58 APACHE_SUBST(CXXFLAGS)
59 + APACHE_SUBST(CC_FOR_BUILD)
60 + APACHE_SUBST(CFLAGS_FOR_BUILD)
61 APACHE_SUBST(LTFLAGS)
62 APACHE_SUBST(LDFLAGS)
63 APACHE_SUBST(LT_LDFLAGS)