Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] e2fsprogs: fix cross compilation problem
@ 2014-03-05  5:14 Chen Qi
  2014-03-05  5:14 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2014-03-05  5:14 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 82c773e88aaefd9321481ad297554d5b4a3ae0b2:

  Revert "ncurses: use ln -r to generate relative symlink" (2014-03-03 15:52:26 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/e2fsprogs-qemumips64
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/e2fsprogs-qemumips64

Chen Qi (1):
  e2fsprogs: fix cross compilation problem

 ...1-e2fsprogs-fix-cross-compilation-problem.patch |   55 ++++++++++++++++++++
 .../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb |    1 +
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] e2fsprogs: fix cross compilation problem
  2014-03-05  5:14 [PATCH 0/1] e2fsprogs: fix cross compilation problem Chen Qi
@ 2014-03-05  5:14 ` Chen Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2014-03-05  5:14 UTC (permalink / raw)
  To: openembedded-core

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>
---
 ...1-e2fsprogs-fix-cross-compilation-problem.patch |   55 ++++++++++++++++++++
 .../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb |    1 +
 2 files changed, 56 insertions(+)
 create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch

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 0000000..73043be
--- /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
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 0c8ec71..7e0c395 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -6,6 +6,7 @@ SRC_URI += "file://acinclude.m4 \
             file://fix-icache.patch \
             file://populate-extfs.sh \
             file://quiet-debugfs.patch \
+            file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
 "
 
 SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-05  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05  5:14 [PATCH 0/1] e2fsprogs: fix cross compilation problem Chen Qi
2014-03-05  5:14 ` [PATCH 1/1] " Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox