diff options
author | Haibo Huang <hhb@google.com> | 2019-04-01 12:49:06 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-04-01 12:49:06 -0700 |
commit | 43306ae1c85a53d3efeb20bff0e11cb7377df2c0 (patch) | |
tree | 77ac36456ee21bf38a0c64127612026699c91fa2 | |
parent | 95a9193e3855d1336a9e78dabfa0bd873d843457 (diff) | |
parent | b9f9572cbe6f35728984841762378c97ae3967a5 (diff) | |
download | platform_external_iperf3-android-10.0.0_r45.tar.gz platform_external_iperf3-android-10.0.0_r45.tar.bz2 platform_external_iperf3-android-10.0.0_r45.zip |
Add Android.bp for iperf3 am: b1cae5175e am: 4e57a4fc40android-mainline-10.0.0_r9android-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android-mainline-10.0.0_r10android-10.0.0_r9android-10.0.0_r8android-10.0.0_r7android-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android-10.0.0_r33android-10.0.0_r32android-10.0.0_r31android-10.0.0_r30android-10.0.0_r29android-10.0.0_r28android-10.0.0_r27android-10.0.0_r26android-10.0.0_r25android-10.0.0_r24android-10.0.0_r23android-10.0.0_r22android-10.0.0_r21android-10.0.0_r20android-10.0.0_r19android-10.0.0_r18android-10.0.0_r16android-10.0.0_r15android-10.0.0_r14android-10.0.0_r13android-10.0.0_r12android10-qpr3-s1-releaseandroid10-qpr3-releaseandroid10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-releaseandroid10-qpr2-s1-releaseandroid10-qpr2-releaseandroid10-qpr1-releaseandroid10-qpr1-mainline-releaseandroid10-qpr1-d-releaseandroid10-qpr1-c-s1-releaseandroid10-qpr1-c-releaseandroid10-qpr1-b-s1-releaseandroid10-qpr1-b-releaseandroid10-mainline-media-releaseandroid10-devandroid10-d4-s1-releaseandroid10-d4-releaseandroid10-c2f2-s2-releaseandroid10-c2f2-s1-releaseandroid10-c2f2-release
am: b9f9572cbe
Change-Id: I301f6c7d1ffd8cf7ac044bbf761e7f40567c4c4d
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Android.bp | 30 | ||||
-rwxr-xr-x | androidconfigure | 38 | ||||
-rw-r--r-- | src/iperf_config.h | 122 | ||||
-rw-r--r-- | src/version.h | 27 |
5 files changed, 217 insertions, 2 deletions
@@ -16,8 +16,6 @@ docs/_static src/.deps src/.libs src/Makefile -src/iperf_config.h -src/version.h src/stamp-h1 src/iperf3 src/iperf3_profile diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..46d7cc2 --- /dev/null +++ b/Android.bp @@ -0,0 +1,30 @@ +// Copyright (C) 2019 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_binary { + name: "iperf", + srcs: [ + "src/*.c", + ], + exclude_srcs: [ + "src/t_*.c", + ], + cflags: [ + "-Wno-unused-parameter", + "-Wno-unused-variable", + // https://github.com/esnet/iperf/pull/855 + "-Wno-format", + "-Wno-constant-conversion", + ], +} diff --git a/androidconfigure b/androidconfigure new file mode 100755 index 0000000..3220acd --- /dev/null +++ b/androidconfigure @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e +set -x + +if [ ! -d "$NDK" ]; then + echo 'Please set $NDK to the path to NDK' + exit 1 +fi + +cd $(dirname "$0") + +function RunConfigure() { + HOST=$1 + TARGET=$2 + ARCH=$3 + + TOOLCHAIN=${NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/ + + export AR=${TOOLCHAIN}${HOST}-ar + export AS=${TOOLCHAIN}${TARGET}-clang + export CC=${TOOLCHAIN}${TARGET}-clang + export CXX=${TOOLCHAIN}${TARGET}-clang++ + export LD=${TOOLCHAIN}${HOST}-ld + export STRIP=${TOOLCHAIN}${HOST}-strip + + # Tell configure what flags Android requires. + export CFLAGS="-fPIE -fPIC" + export LDFLAGS="-pie" + + ./configure --host=${HOST} +} + +# All arches generates the same iperf_config.h (for now). +RunConfigure "aarch64-linux-android" "aarch64-linux-android28" "arm64" +# RunConfigure "arm-linux-androideabi" "armv7a-linux-androideabi28" "arm" +# RunConfigure "i686-linux-android" "i686-linux-android28" "x86" +# RunConfigure "x86_64-linux-android" "x86_64-linux-android28" "x86-64" diff --git a/src/iperf_config.h b/src/iperf_config.h new file mode 100644 index 0000000..c3e54d0 --- /dev/null +++ b/src/iperf_config.h @@ -0,0 +1,122 @@ +/* src/iperf_config.h. Generated from iperf_config.h.in by configure. */ +/* src/iperf_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the `cpuset_setaffinity' function. */ +/* #undef HAVE_CPUSET_SETAFFINITY */ + +/* Have CPU affinity support. */ +#define HAVE_CPU_AFFINITY 1 + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <endian.h> header file. */ +#define HAVE_ENDIAN_H 1 + +/* Have IPv6 flowlabel support. */ +#define HAVE_FLOWLABEL 1 + +/* Define to 1 if you have the `getline' function. */ +#define HAVE_GETLINE 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <netinet/sctp.h> header file. */ +/* #undef HAVE_NETINET_SCTP_H */ + +/* Define to 1 if you have the <poll.h> header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `sched_setaffinity' function. */ +#define HAVE_SCHED_SETAFFINITY 1 + +/* Have SCTP support. */ +/* #undef HAVE_SCTP */ + +/* Define to 1 if you have the `sendfile' function. */ +#define HAVE_SENDFILE 1 + +/* Define to 1 if you have the `SetProcessAffinityMask' function. */ +/* #undef HAVE_SETPROCESSAFFINITYMASK */ + +/* Have SO_MAX_PACING_RATE sockopt. */ +#define HAVE_SO_MAX_PACING_RATE 1 + +/* OpenSSL Is Available */ +/* #undef HAVE_SSL */ + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if the system has the type `struct sctp_assoc_value'. */ +/* #undef HAVE_STRUCT_SCTP_ASSOC_VALUE */ + +/* Define to 1 if you have the <sys/endian.h> header file. */ +/* #undef HAVE_SYS_ENDIAN_H */ + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Have TCP_CONGESTION sockopt. */ +#define HAVE_TCP_CONGESTION 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "iperf" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/esnet/iperf" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "iperf" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "iperf 3.6+" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "iperf" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://software.es.net/iperf/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.6+" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "3.6+" + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..275a9eb --- /dev/null +++ b/src/version.h @@ -0,0 +1,27 @@ +/* + * iperf, Copyright (c) 2014, The Regents of the University of + * California, through Lawrence Berkeley National Laboratory (subject + * to receipt of any required approvals from the U.S. Dept. of + * Energy). All rights reserved. + * + * If you have questions about your rights to use or distribute this + * software, please contact Berkeley Lab's Technology Transfer + * Department at TTD@lbl.gov. + * + * NOTICE. This software is owned by the U.S. Department of Energy. + * As such, the U.S. Government has been granted for itself and others + * acting on its behalf a paid-up, nonexclusive, irrevocable, + * worldwide license in the Software to reproduce, prepare derivative + * works, and perform publicly and display publicly. Beginning five + * (5) years after the date permission to assert copyright is obtained + * from the U.S. Department of Energy, and subject to any subsequent + * five (5) year renewals, the U.S. Government is granted for itself + * and others acting on its behalf a paid-up, nonexclusive, + * irrevocable, worldwide license in the Software to reproduce, + * prepare derivative works, distribute copies to the public, perform + * publicly and display publicly, and to permit others to do so. + * + * This code is distributed under a BSD style license, see the LICENSE + * file for complete information. + */ +#define IPERF_VERSION "3.6+" |