diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-02 03:07:39 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-04-02 03:07:39 +0000 |
commit | 4728ed5e27729365ed8369a7d18c2e3aefbf9784 (patch) | |
tree | 77ac36456ee21bf38a0c64127612026699c91fa2 | |
parent | 95a9193e3855d1336a9e78dabfa0bd873d843457 (diff) | |
parent | 43306ae1c85a53d3efeb20bff0e11cb7377df2c0 (diff) | |
download | iperf3-android-vts-10.0_r13.tar.gz |
Snap for 5426495 from 43306ae1c85a53d3efeb20bff0e11cb7377df2c0 to qt-releaseandroid-vts-10.0_r9android-vts-10.0_r8android-vts-10.0_r7android-vts-10.0_r6android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-vts-10.0_r16android-vts-10.0_r15android-vts-10.0_r14android-vts-10.0_r13android-vts-10.0_r12android-vts-10.0_r11android-vts-10.0_r10android-vts-10.0_r1android-security-10.0.0_r75android-security-10.0.0_r74android-security-10.0.0_r73android-security-10.0.0_r72android-security-10.0.0_r71android-security-10.0.0_r70android-security-10.0.0_r69android-security-10.0.0_r68android-security-10.0.0_r67android-security-10.0.0_r66android-security-10.0.0_r65android-security-10.0.0_r64android-security-10.0.0_r63android-security-10.0.0_r62android-security-10.0.0_r61android-security-10.0.0_r60android-security-10.0.0_r59android-security-10.0.0_r58android-security-10.0.0_r57android-security-10.0.0_r56android-security-10.0.0_r55android-security-10.0.0_r54android-security-10.0.0_r53android-security-10.0.0_r52android-security-10.0.0_r51android-security-10.0.0_r50android-security-10.0.0_r49android-security-10.0.0_r48android-mainline-10.0.0_r3android-mainline-10.0.0_r2android-mainline-10.0.0_r1android-cts-10.0_r9android-cts-10.0_r8android-cts-10.0_r7android-cts-10.0_r6android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android-cts-10.0_r16android-cts-10.0_r15android-cts-10.0_r14android-cts-10.0_r13android-cts-10.0_r12android-cts-10.0_r11android-cts-10.0_r10android-cts-10.0_r1android-10.0.0_r6android-10.0.0_r5android-10.0.0_r47android-10.0.0_r46android-10.0.0_r4android-10.0.0_r3android-10.0.0_r2android-10.0.0_r17android-10.0.0_r11android-10.0.0_r10android-10.0.0_r1android10-tests-releaseandroid10-security-releaseandroid10-s3-releaseandroid10-s2-releaseandroid10-s1-releaseandroid10-releaseandroid10-mainline-releaseandroid10-mainline-a-releaseandroid10-gsi
Change-Id: I804a05a5e7ded06239a355eb967ccb4235cae3d3
-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+" |