summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch
new file mode 100644
index 0000000000..73043bedda
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Pending
2
3Subject: e2fsprogs: fix cross compilation problem
4
5The checking of types in parse-types.sh doesn't make much sense in a
6cross-compilation environment, because the generated binary is executed
7on build machine.
8
9So even if asm_types.h has got correct statements for types, it's possible
10that the generated binary will report an error. Because these types are for
11the target machine.
12
13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14---
15 config/parse-types.sh | 6 ++++--
16 configure.in | 6 +++++-
17 2 files changed, 9 insertions(+), 3 deletions(-)
18
19diff --git a/config/parse-types.sh b/config/parse-types.sh
20index 5076f6c..24d2a99 100755
21--- a/config/parse-types.sh
22+++ b/config/parse-types.sh
23@@ -118,8 +118,10 @@ if ./asm_types
24 then
25 true
26 else
27- echo "Problem detected with asm_types.h"
28- echo "" > asm_types.h
29+ if [ "${CROSS_COMPILE}" != "1" ]; then
30+ echo "Problem detected with asm_types.h"
31+ echo "" > asm_types.h
32+ fi
33 fi
34 rm asm_types.c asm_types
35
36diff --git a/configure.in b/configure.in
37index 68adf0d..ed1697b 100644
38--- a/configure.in
39+++ b/configure.in
40@@ -953,7 +953,11 @@ AC_SUBST(SIZEOF_LONG)
41 AC_SUBST(SIZEOF_LONG_LONG)
42 AC_SUBST(SIZEOF_OFF_T)
43 AC_C_BIGENDIAN
44-BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
45+if test $cross_compiling = no; then
46+ BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
47+else
48+ CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
49+fi
50 ASM_TYPES_HEADER=./asm_types.h
51 AC_SUBST_FILE(ASM_TYPES_HEADER)
52 dnl
53--
541.7.9.5
55