[2/2] socat: fix supporting cross compiling

Submitted by Hongxu Jia on May 28, 2014, 7:59 a.m.

Details

Message ID a3b490a28af6eedca5952918acfee85cb800ba38.1401263535.git.hongxu.jia@windriver.com
State New
Headers show

Commit Message

Hongxu Jia May 28, 2014, 7:59 a.m.
The do_configure failed:
...
|checking for equivalent simple type of size_t... configure:
error: in `tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/build':
|configure: error: cannot run test program while cross compiling
...

For 1.7.2.4, the linux GCC check in configure.in didn't support
cross compiling, but the old version 1.7.2.3 supported, so we
reference 1.7.2.3 to fix this issue.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../socat/socat/fix-cross-compiling-failed.patch   | 34 ++++++++++++++++++++++
 meta/recipes-connectivity/socat/socat_1.7.2.4.bb   |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-connectivity/socat/socat/fix-cross-compiling-failed.patch

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/socat/socat/fix-cross-compiling-failed.patch b/meta/recipes-connectivity/socat/socat/fix-cross-compiling-failed.patch
new file mode 100644
index 0000000..4106cbd
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/fix-cross-compiling-failed.patch
@@ -0,0 +1,34 @@ 
+configure.in: fix cross compiling failed
+
+The do_configure failed:
+...
+|checking for equivalent simple type of size_t... configure:
+error: in `tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/build':
+|configure: error: cannot run test program while cross compiling
+...
+
+For 1.7.2.4, the linux GCC check in configure.in didn't support
+cross compiling, but the old version 1.7.2.3 supported, so we
+reference 1.7.2.3 to fix this issue.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -41,7 +41,7 @@ AC_CHECK_PROG(AR, ar, ar, gar)
+ # fail
+ AC_LANG_COMPILER_REQUIRE()
+ 
+-if test "$CC" = "gcc"; then
++if test "$GCC" = yes; then
+    CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
+    ERRONWARN="-Werror -O0"
+ elif test "$CC" = "clang"; then
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
index 185dd44..26a8429 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
@@ -15,6 +15,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
            file://compile.patch \
            file://socat-enable-termios.patch \
+           file://fix-cross-compiling-failed.patch \
 "