diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2024-03-08 13:33:19 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-08 10:07:29 -0800 |
commit | 8cf55e279fd08f71f281fc8e5f2dabd638d3fa79 (patch) | |
tree | df5d564fff82a0c9f9d8f7558b152952e4c30b05 | |
parent | 22c255b2e9bb8a8a97ded018f5ee0bc702b11f6f (diff) | |
download | meta-openembedded-contrib-8cf55e279fd08f71f281fc8e5f2dabd638d3fa79.tar.gz |
tcprelay: fix a minor cross compilation do_configure issue
We're seeing errors like below in log.do_configure:
./conftest: cannot execute binary file: Exec format error
The tcprelay's configure have two places to execute ./conftest.
And the result happens to be correct even with the error above.
Instead of leaving the errors as they are, we explicitly skip
running ./conftest in case of cross compiling. The build will
continue to succeed and result will remain the same.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch | 51 | ||||
-rw-r--r-- | meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch b/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch new file mode 100644 index 0000000000..08cb3b88fa --- /dev/null +++ b/meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch @@ -0,0 +1,51 @@ +From 42f7bbc1ce4913fe2c0bc76293c5445d31690f5d Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Thu, 7 Mar 2024 21:02:07 -0800 +Subject: [PATCH] configure.ac: do not run conftest in case of cross + compilation + +It'll give us nothing but error like below: + + ./conftest: cannot execute binary file: Exec format error + ... + ./configure: line 23950: test: -eq: unary operator expected + +The version check only has effect on Apple systems. We'd better +avoid error like above when cross compilation. + +Also, in case of cross compilation, instead of having the above +Exec format error and resulting in unaligned_cv_fail to yes, set +it directly to yes. + +Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/849] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 387219de..15201601 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -928,7 +928,7 @@ cat >conftest.c <<EOF + EOF + ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LPCAPLIB \ + conftest.c $LIBS >/dev/null 2>&1 +-if test -x conftest ; then ++if test -x conftest -a "$cross_compiling" != "yes"; then + full_libpcap_version=$(LD_LIBRARY_PATH="$LPCAP_LD_LIBRARY_PATH" ./conftest) + libpcap_version=$(echo "$full_libpcap_version" | ${CUT} -d' ' -f3) + pcap_version_ok=yes +@@ -1709,7 +1709,7 @@ case "$host_os" in + EOF + ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ + conftest.c $LIBS >/dev/null 2>&1 +- if test ! -x conftest ; then ++ if test ! -x conftest -o "$cross_compiling" = "yes" ; then + dnl failed to compile for some reason + unaligned_cv_fail=yes + else +-- +2.42.0 + diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb index 53f17c9619..26de40a65a 100644 --- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb +++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8" SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \ file://0001-configure.ac-unify-search-dirs-for-pcap-and-add-lib3.patch \ + file://0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch \ " SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf" |