From: Chen Qi <Qi.Chen@windriver.com>
To: <linux-ext4@vger.kernel.org>
Subject: e2fsprogs: fix cross compilation problem
Date: Thu, 13 Mar 2014 10:01:27 +0800 [thread overview]
Message-ID: <1394676087-2624-1-git-send-email-Qi.Chen@windriver.com> (raw)
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
next reply other threads:[~2014-03-13 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 2:01 Chen Qi [this message]
2014-04-29 7:14 ` e2fsprogs: fix cross compilation problem ChenQi
2014-05-06 1:15 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394676087-2624-1-git-send-email-Qi.Chen@windriver.com \
--to=qi.chen@windriver.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).