diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-03-05 13:14:32 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-11 09:30:13 -0700 |
commit | 7a8f3c783e63178fbd075c31c36ee6f07ff0b979 (patch) | |
tree | cc2833e2c70d38e330e065cb0277ce3e9098a26e | |
parent | 614faa66a442069b8cd81ee74a01ecc5d73870d9 (diff) | |
download | poky-7a8f3c783e63178fbd075c31c36ee6f07ff0b979.tar.gz |
e2fsprogs: fix cross compilation problem
When compiling e2fsprogs for qemumips64, we got compilation errors.
The root cause is that parse-types.sh script would fail for mips64.
However, the type size checking in parse-types.sh doesn't make much
sense in case of cross compilation. This is because that the typedef
statements in asm_types.h are for the target machine while the generated
binary in parse-types.sh script is executed on build machine.
This patch fixes such problem.
(From OE-Core rev: 45877518e2d277c63d5a561408fbfcd4cb5a2a76)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch | 55 | ||||
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 1 |
2 files changed, 56 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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Subject: e2fsprogs: fix cross compilation problem | ||
4 | |||
5 | The checking of types in parse-types.sh doesn't make much sense in a | ||
6 | cross-compilation environment, because the generated binary is executed | ||
7 | on build machine. | ||
8 | |||
9 | So even if asm_types.h has got correct statements for types, it's possible | ||
10 | that the generated binary will report an error. Because these types are for | ||
11 | the target machine. | ||
12 | |||
13 | Signed-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 | |||
19 | diff --git a/config/parse-types.sh b/config/parse-types.sh | ||
20 | index 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 | |||
36 | diff --git a/configure.in b/configure.in | ||
37 | index 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 | -- | ||
54 | 1.7.9.5 | ||
55 | |||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb index 3864ec1d47..4114fd21bc 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | |||
@@ -16,6 +16,7 @@ SRC_URI += "file://acinclude.m4 \ | |||
16 | file://0009-misc-create_inode.c-handle-hardlinks.patch \ | 16 | file://0009-misc-create_inode.c-handle-hardlinks.patch \ |
17 | file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \ | 17 | file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \ |
18 | file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \ | 18 | file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \ |
19 | file://0001-e2fsprogs-fix-cross-compilation-problem.patch \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7" | 22 | SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7" |