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:25:50 -0700 |
commit | 45877518e2d277c63d5a561408fbfcd4cb5a2a76 (patch) | |
tree | 28bd3bee40a388d440639073da8a8f4f8b6eda35 /meta/recipes-devtools/e2fsprogs/e2fsprogs | |
parent | 23f7decb84922a3467c5b10b013e66596926b5cf (diff) | |
download | openembedded-core-contrib-45877518e2d277c63d5a561408fbfcd4cb5a2a76.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.
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>
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs/e2fsprogs')
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch | 55 |
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 @@ +Upstream-Status: Pending + +Subject: e2fsprogs: fix cross compilation problem + +The checking of types in parse-types.sh doesn't make much sense in a +cross-compilation environment, because the generated binary is executed +on build machine. + +So even if asm_types.h has got correct statements for types, it's possible +that the generated binary will report an error. Because these types are for +the target machine. + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + config/parse-types.sh | 6 ++++-- + configure.in | 6 +++++- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/config/parse-types.sh b/config/parse-types.sh +index 5076f6c..24d2a99 100755 +--- a/config/parse-types.sh ++++ b/config/parse-types.sh +@@ -118,8 +118,10 @@ if ./asm_types + then + true + else +- echo "Problem detected with asm_types.h" +- echo "" > asm_types.h ++ if [ "${CROSS_COMPILE}" != "1" ]; then ++ echo "Problem detected with asm_types.h" ++ echo "" > asm_types.h ++ fi + fi + rm asm_types.c asm_types + +diff --git a/configure.in b/configure.in +index 68adf0d..ed1697b 100644 +--- a/configure.in ++++ b/configure.in +@@ -953,7 +953,11 @@ AC_SUBST(SIZEOF_LONG) + AC_SUBST(SIZEOF_LONG_LONG) + AC_SUBST(SIZEOF_OFF_T) + AC_C_BIGENDIAN +-BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh ++if test $cross_compiling = no; then ++ BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh ++else ++ CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh ++fi + ASM_TYPES_HEADER=./asm_types.h + AC_SUBST_FILE(ASM_TYPES_HEADER) + dnl +-- +1.7.9.5 + |