diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-07-14 18:55:34 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-07-24 18:57:37 +0200 |
commit | 85d4fe73352886b4d22a77d8ab5163d267d21fa2 (patch) | |
tree | b47c6fb52208529f11511dcf9600a820ecda2626 /meta-oe/recipes-benchmark | |
parent | d6a1c0e7b7ceaeffa111c259ef95b6f1f3831e52 (diff) | |
download | meta-openembedded-85d4fe73352886b4d22a77d8ab5163d267d21fa2.tar.gz |
iperf3: Fix missing stdint.h and do not link with -pg
Helps compile with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark')
3 files changed, 77 insertions, 4 deletions
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch b/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch new file mode 100644 index 0000000000..ae36208000 --- /dev/null +++ b/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From be653711fb92d2430b3ecc546b4e3ad927d19ec5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 14 Jul 2017 12:59:42 -0700 | ||
4 | Subject: [PATCH 1/2] include stdint.h for various std c99 int types | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | src/cjson.h | 2 ++ | ||
9 | src/timer.h | 1 + | ||
10 | 2 files changed, 3 insertions(+) | ||
11 | |||
12 | diff --git a/src/cjson.h b/src/cjson.h | ||
13 | index fb8cd3b..69cd272 100644 | ||
14 | --- a/src/cjson.h | ||
15 | +++ b/src/cjson.h | ||
16 | @@ -23,6 +23,8 @@ | ||
17 | #ifndef cJSON__h | ||
18 | #define cJSON__h | ||
19 | |||
20 | +#include <stdint.h> | ||
21 | + | ||
22 | #ifdef __cplusplus | ||
23 | extern "C" | ||
24 | { | ||
25 | diff --git a/src/timer.h b/src/timer.h | ||
26 | index 0f9c5eb..0b195be 100644 | ||
27 | --- a/src/timer.h | ||
28 | +++ b/src/timer.h | ||
29 | @@ -31,6 +31,7 @@ | ||
30 | #define __TIMER_H | ||
31 | |||
32 | #include <sys/time.h> | ||
33 | +#include <stdint.h> | ||
34 | |||
35 | /* TimerClientData is an opaque value that tags along with a timer. The | ||
36 | ** client can use it for whatever, and it gets passed to the callback when | ||
37 | -- | ||
38 | 2.13.3 | ||
39 | |||
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch b/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch new file mode 100644 index 0000000000..06eb41ac0e --- /dev/null +++ b/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 6db0e28f906bc3784019dfb5bb011237a8034fda Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 14 Jul 2017 13:00:16 -0700 | ||
4 | Subject: [PATCH 2/2] Remove -pg from profile_CFLAGS | ||
5 | |||
6 | musl fails to link with missing gcrt1.o | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/Makefile.am | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
14 | index 23b0c72..6268145 100644 | ||
15 | --- a/src/Makefile.am | ||
16 | +++ b/src/Makefile.am | ||
17 | @@ -49,9 +49,9 @@ iperf3_LDFLAGS = -g | ||
18 | iperf3_profile_SOURCES = main.c \ | ||
19 | $(libiperf_la_SOURCES) | ||
20 | |||
21 | -iperf3_profile_CFLAGS = -pg -g | ||
22 | +iperf3_profile_CFLAGS = -g | ||
23 | iperf3_profile_LDADD = libiperf.la | ||
24 | -iperf3_profile_LDFLAGS = -pg -g | ||
25 | +iperf3_profile_LDFLAGS = -g | ||
26 | |||
27 | # Specify the sources and various flags for the test cases | ||
28 | t_timer_SOURCES = t_timer.c | ||
29 | -- | ||
30 | 2.13.3 | ||
31 | |||
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb b/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb index d19aa1ec46..4a01896ca9 100644 --- a/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb +++ b/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb | |||
@@ -11,10 +11,11 @@ AUTHOR = "ESNET <info@es.net>, Lawrence Berkeley National Laboratory <websupport | |||
11 | LICENSE = "BSD" | 11 | LICENSE = "BSD" |
12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3434c5a9a53c78c7739f0bc9e5adda" | 12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3434c5a9a53c78c7739f0bc9e5adda" |
13 | 13 | ||
14 | SRC_URI = "\ | 14 | SRC_URI = "git://github.com/esnet/iperf.git \ |
15 | git://github.com/esnet/iperf.git \ | 15 | file://automake-foreign.patch \ |
16 | file://automake-foreign.patch \ | 16 | file://0001-include-stdint.h-for-various-std-c99-int-types.patch \ |
17 | " | 17 | file://0002-Remove-pg-from-profile_CFLAGS.patch \ |
18 | " | ||
18 | 19 | ||
19 | PV = "3.1.3+gitr${SRCPV}" | 20 | PV = "3.1.3+gitr${SRCPV}" |
20 | SRCREV = "099244ec686b620393e9845478a554b1c7ca5c8b" | 21 | SRCREV = "099244ec686b620393e9845478a554b1c7ca5c8b" |
@@ -25,4 +26,6 @@ inherit autotools | |||
25 | 26 | ||
26 | PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" | 27 | PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" |
27 | 28 | ||
29 | CFLAGS += "-D_GNU_SOURCE" | ||
30 | |||
28 | BBCLASSEXTEND = "native" | 31 | BBCLASSEXTEND = "native" |