[oe-commits] [meta-openembedded] 54/97: iperf3: Fix missing stdint.h and do not link with -pg

git at git.openembedded.org git at git.openembedded.org
Thu Sep 21 09:59:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch pyro-next
in repository meta-openembedded.

commit d69c259e2daf4a2748cd1bcbd366f651d2eb8564
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Jul 14 18:55:34 2017 -0700

    iperf3: Fix missing stdint.h and do not link with -pg
    
    Helps compile with musl
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    (cherry picked from commit 85d4fe73352886b4d22a77d8ab5163d267d21fa2)
    Signed-off-by: Armin Kuster <akuster808 at 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(-)

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 0000000..ae36208
--- /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 at 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 at 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 0000000..06eb41a
--- /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 at 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 at 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 d19aa1e..4a01896 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 at 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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list