diff mbox series

[oe,meta-oe,1/6] iperf3: Fix missing stdint.h and do not link with -pg

Message ID 20170715015539.31584-1-raj.khem@gmail.com
State Accepted
Commit 85d4fe73352886b4d22a77d8ab5163d267d21fa2
Headers show
Series [oe,meta-oe,1/6] iperf3: Fix missing stdint.h and do not link with -pg | expand

Commit Message

Khem Raj July 15, 2017, 1:55 a.m. UTC
Helps compile with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...de-stdint.h-for-various-std-c99-int-types.patch | 39 ++++++++++++++++++++++
 .../0002-Remove-pg-from-profile_CFLAGS.patch       | 31 +++++++++++++++++
 meta-oe/recipes-benchmark/iperf3/iperf3_git.bb     | 11 +++---
 3 files changed, 77 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch
 create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch

-- 
2.13.3

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

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 000000000..ae3620800
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch
@@ -0,0 +1,39 @@ 
+From be653711fb92d2430b3ecc546b4e3ad927d19ec5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 12:59:42 -0700
+Subject: [PATCH 1/2] include stdint.h for various std c99 int types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/cjson.h | 2 ++
+ src/timer.h | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/src/cjson.h b/src/cjson.h
+index fb8cd3b..69cd272 100644
+--- a/src/cjson.h
++++ b/src/cjson.h
+@@ -23,6 +23,8 @@
+ #ifndef cJSON__h
+ #define cJSON__h
+ 
++#include <stdint.h>
++
+ #ifdef __cplusplus
+ extern "C"
+ {
+diff --git a/src/timer.h b/src/timer.h
+index 0f9c5eb..0b195be 100644
+--- a/src/timer.h
++++ b/src/timer.h
+@@ -31,6 +31,7 @@
+ #define __TIMER_H
+ 
+ #include <sys/time.h>
++#include <stdint.h>
+ 
+ /* TimerClientData is an opaque value that tags along with a timer.  The
+ ** client can use it for whatever, and it gets passed to the callback when
+-- 
+2.13.3
+
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 000000000..06eb41ac0
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch
@@ -0,0 +1,31 @@ 
+From 6db0e28f906bc3784019dfb5bb011237a8034fda Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jul 2017 13:00:16 -0700
+Subject: [PATCH 2/2] Remove -pg from profile_CFLAGS
+
+musl fails to link with missing gcrt1.o
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 23b0c72..6268145 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -49,9 +49,9 @@ iperf3_LDFLAGS          = -g
+ iperf3_profile_SOURCES  = main.c \
+ 						  $(libiperf_la_SOURCES)
+ 
+-iperf3_profile_CFLAGS   = -pg -g
++iperf3_profile_CFLAGS   = -g
+ iperf3_profile_LDADD    = libiperf.la
+-iperf3_profile_LDFLAGS  = -pg -g
++iperf3_profile_LDFLAGS  = -g
+ 
+ # Specify the sources and various flags for the test cases
+ t_timer_SOURCES         = t_timer.c
+-- 
+2.13.3
+
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb b/meta-oe/recipes-benchmark/iperf3/iperf3_git.bb
index d19aa1ec4..4a01896ca 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
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3434c5a9a53c78c7739f0bc9e5adda"
 
-SRC_URI = "\
-    git://github.com/esnet/iperf.git \
-    file://automake-foreign.patch \
-"
+SRC_URI = "git://github.com/esnet/iperf.git \
+           file://automake-foreign.patch \
+           file://0001-include-stdint.h-for-various-std-c99-int-types.patch \
+           file://0002-Remove-pg-from-profile_CFLAGS.patch \
+           "
 
 PV = "3.1.3+gitr${SRCPV}"
 SRCREV = "099244ec686b620393e9845478a554b1c7ca5c8b"
@@ -25,4 +26,6 @@  inherit autotools
 
 PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools"
 
+CFLAGS += "-D_GNU_SOURCE"
+
 BBCLASSEXTEND = "native"