diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2025-08-13 14:42:00 +0800 |
|---|---|---|
| committer | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-09-06 16:27:30 +0200 |
| commit | 59ab62ecf33d85fff1773220cd1055fd30cbeee1 (patch) | |
| tree | b07d8bfb326b941a15c83fe4cb2169484de69a50 | |
| parent | f1d6f37efc5279796105a7a1afca9acd87d6abd2 (diff) | |
| download | meta-openembedded-59ab62ecf33d85fff1773220cd1055fd30cbeee1.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>
(master rev: 8cf55e279fd08f71f281fc8e5f2dabd638d3fa79)
Signed-off-by: Guocai He <guocai.he.cn@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
| -rw-r--r-- | meta-networking/recipes-support/tcpreplay/tcpreplay/0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch | 50 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb | 1 |
2 files changed, 51 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..d424d4fa35 --- /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,50 @@ | |||
| 1 | From 42f7bbc1ce4913fe2c0bc76293c5445d31690f5d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
| 3 | Date: Thu, 7 Mar 2024 21:02:07 -0800 | ||
| 4 | Subject: [PATCH] configure.ac: do not run conftest in case of cross | ||
| 5 | compilation | ||
| 6 | |||
| 7 | It'll give us nothing but error like below: | ||
| 8 | |||
| 9 | ./conftest: cannot execute binary file: Exec format error | ||
| 10 | ... | ||
| 11 | ./configure: line 23950: test: -eq: unary operator expected | ||
| 12 | |||
| 13 | The version check only has effect on Apple systems. We'd better | ||
| 14 | avoid error like above when cross compilation. | ||
| 15 | |||
| 16 | Also, in case of cross compilation, instead of having the above | ||
| 17 | Exec format error and resulting in unaligned_cv_fail to yes, set | ||
| 18 | it directly to yes. | ||
| 19 | |||
| 20 | Upstream-Status: Submitted [https://github.com/appneta/tcpreplay/pull/849] | ||
| 21 | |||
| 22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 23 | --- | ||
| 24 | configure.ac | 4 ++-- | ||
| 25 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/configure.ac b/configure.ac | ||
| 28 | index 387219de..15201601 100644 | ||
| 29 | --- a/configure.ac | ||
| 30 | +++ b/configure.ac | ||
| 31 | @@ -928,7 +928,7 @@ cat >conftest.c <<EOF | ||
| 32 | EOF | ||
| 33 | ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LPCAPLIB \ | ||
| 34 | conftest.c $LIBS >/dev/null 2>&1 | ||
| 35 | -if test -x conftest ; then | ||
| 36 | +if test -x conftest -a "$cross_compiling" != "yes"; then | ||
| 37 | full_libpcap_version=$(LD_LIBRARY_PATH="$LPCAP_LD_LIBRARY_PATH" ./conftest) | ||
| 38 | libpcap_version=$(echo "$full_libpcap_version" | ${CUT} -d' ' -f3) | ||
| 39 | pcap_version_ok=yes | ||
| 40 | @@ -1709,7 +1709,7 @@ case "$host_os" in | ||
| 41 | EOF | ||
| 42 | ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ | ||
| 43 | conftest.c $LIBS >/dev/null 2>&1 | ||
| 44 | - if test ! -x conftest ; then | ||
| 45 | + if test ! -x conftest -o "$cross_compiling" = "yes" ; then | ||
| 46 | dnl failed to compile for some reason | ||
| 47 | unaligned_cv_fail=yes | ||
| 48 | else | ||
| 49 | -- | ||
| 50 | 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 3ece4b78c6..09831d8c80 100644 --- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb +++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.4.4.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcprepl | |||
| 11 | file://CVE-2023-4256.patch \ | 11 | file://CVE-2023-4256.patch \ |
| 12 | file://CVE-2024-22654-0001.patch \ | 12 | file://CVE-2024-22654-0001.patch \ |
| 13 | file://CVE-2024-22654-0002.patch \ | 13 | file://CVE-2024-22654-0002.patch \ |
| 14 | file://0001-configure.ac-do-not-run-conftest-in-case-of-cross-co.patch \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf" | 17 | SRC_URI[sha256sum] = "44f18fb6d3470ecaf77a51b901a119dae16da5be4d4140ffbb2785e37ad6d4bf" |
