• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/apr/0001-cross-compile.patch
Bernd KuhlsBernd Kuhls committed c67a2457b5905 Oct 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Fix cross-compilation
2
​
3
Patch was backported from Apache httpd:
4
http://svn.apache.org/viewvc?view=revision&revision=1327907
5
http://svn.apache.org/viewvc?view=revision&revision=1328390
6
http://svn.apache.org/viewvc?view=revision&revision=1328714
7
​
8
Patch submitted upstream:
9
https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
10
​
11
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
12
​
13
diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in
14
--- apr-1.5.1.org/configure.in  2014-01-25 16:17:29.000000000 +0100
15
+++ apr-1.5.1/configure.in  2014-10-05 11:20:40.080746760 +0200
16
@@ -118,6 +118,16 @@
17
 echo "Configuring APR library"
18
 echo "Platform: $host"
19
 
20
+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
21
+dnl we got already CC_FOR_BUILD from environment.
22
+if test "x${build_alias}" != "x${host_alias}"; then
23
+  if test "x${CC_FOR_BUILD}" = "x"; then
24
+    CC_FOR_BUILD=cc
25
+  fi
26
+fi
27
+AC_SUBST(CC_FOR_BUILD)
28
+AC_SUBST(CFLAGS_FOR_BUILD)
29
+
30
 dnl Some initial steps for configuration.  We setup the default directory
31
 dnl and which files are to be configured.
32
 
33
diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in
34
--- apr-1.5.1.org/Makefile.in   2014-03-17 16:10:26.000000000 +0100
35
+++ apr-1.5.1/Makefile.in   2014-10-05 11:22:53.031070519 +0200
36
@@ -8,6 +8,8 @@
37
 # APR (Apache Portable Runtime) library Makefile.
38
 #
39
 CPP = @CPP@
40
+CC_FOR_BUILD = @CC_FOR_BUILD@
41
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
42
 
43
 # get substituted into some targets
44
 APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
45
@@ -134,8 +136,13 @@
46
 
47
 OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
48
 tools/gen_test_char.lo: make_tools_dir
49
+ifdef CC_FOR_BUILD
50
+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
51
+   $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
52
+else
53
 tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
54
    $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
55
+endif
56
 
57
 include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
58
    $(APR_MKDIR) include/private
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.