summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sanders <nsanders@google.com>2022-10-10 14:08:09 -0700
committerNick Sanders <nsanders@google.com>2022-10-10 14:37:47 -0700
commitc17f97d9e57976ddb5a585fbced3f88494143666 (patch)
tree91da983bc32127b381f604fc32ead55f039d38b5
parent4734683decedfcef236790b5c18a49d4145952f3 (diff)
ndroid: update to sync with AOSP
Android.bp supports 32/64 bit android builds. TEST=build/run on android.
-rw-r--r--Android.bp75
-rw-r--r--Android.mk29
-rw-r--r--src/stressapptest_config_android.h88
3 files changed, 82 insertions, 110 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..0ad0558
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,75 @@
+package {
+ default_applicable_licenses: ["external_stressapptest_license"],
+}
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'filegroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+// http://go/android-license-faq
+license {
+ name: "external_stressapptest_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-MIT",
+ "legacy_notice",
+ ],
+ license_text: [
+ "COPYING",
+ "NOTICE",
+ ],
+}
+cc_binary {
+ name: "stressapptest",
+ srcs: [
+ "src/main.cc",
+ "src/adler32memcpy.cc",
+ "src/disk_blocks.cc",
+ "src/error_diag.cc",
+ "src/finelock_queue.cc",
+ "src/logger.cc",
+ "src/os.cc",
+ "src/os_factory.cc",
+ "src/pattern.cc",
+ "src/queue.cc",
+ "src/sat.cc",
+ "src/sat_factory.cc",
+ "src/worker.cc",
+ ],
+ arch: {
+ arm: { cflags: ["-DSTRESSAPPTEST_CPU_ARMV7A"] },
+ arm64: { cflags: ["-DSTRESSAPPTEST_CPU_AARCH64"] },
+ x86: {
+ enabled: false,
+ },
+ x86_64: {
+ enabled: false,
+ },
+ },
+ cflags: [
+ "-DHAVE_CONFIG_H",
+ "-DANDROID",
+ "-DNDEBUG",
+ "-UDEBUG",
+ "-DCHECKOPTS",
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ "-Wno-#warnings",
+ "-Wno-implicit-fallthrough",
+ ],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index db434cf..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- src/main.cc \
- src/adler32memcpy.cc \
- src/disk_blocks.cc \
- src/error_diag.cc \
- src/finelock_queue.cc \
- src/logger.cc \
- src/os.cc \
- src/os_factory.cc \
- src/pattern.cc \
- src/queue.cc \
- src/sat.cc \
- src/sat_factory.cc \
- src/worker.cc
-
-# Build 64 bit by default
-# LOCAL_MULTILIB := 32
-LOCAL_MODULE:= stressapptest
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -DNDEBUG -UDEBUG -DCHECKOPTS
-
-LOCAL_CPP_EXTENSION := .cc
-
-include $(BUILD_EXECUTABLE)
diff --git a/src/stressapptest_config_android.h b/src/stressapptest_config_android.h
index c3bf78f..3a6fcc8 100644
--- a/src/stressapptest_config_android.h
+++ b/src/stressapptest_config_android.h
@@ -1,222 +1,152 @@
/* src/stressapptest_config.h. Generated from stressapptest_config.h.in by configure. */
/* src/stressapptest_config.h.in. Generated from configure.ac by autoheader. */
-
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#define CLOSEDIR_VOID 1
-
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
-
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#define HAVE_DECL_STRERROR_R 1
-
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#define HAVE_DIRENT_H 1
-
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
-
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
-
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
-
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
-
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
-
/* Define to 1 if you have the <libaio.h> header file. */
/* #undef HAVE_LIBAIO_H */
-
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
-
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
-
/* Define to 1 if you have the `mmap64' function. */
/* #undef HAVE_MMAP64 */
-
/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1
-
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
-
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
-
/* Define to 1 if you have the `posix_memalign' function. */
#define HAVE_POSIX_MEMALIGN 1
-
+/* Define to 1 if the system has `pthread_barrier'. */
+#define HAVE_PTHREAD_BARRIERS 1
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
-
/* Define to 1 if you have the `rand_r' function. */
/* #undef HAVE_RAND_R */
-
/* Define to 1 if you have the `sched_getaffinity' function. */
#define HAVE_SCHED_GETAFFINITY 1
-
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
-
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
-
/* Define to 1 if stdbool.h conforms to C99. */
-/* #undef HAVE_STDBOOL_H */
-
+#define HAVE_STDBOOL_H 1
/* 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 `strerror_r' function. */
#define HAVE_STRERROR_R 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 you have the `strtol' function. */
#define HAVE_STRTOL 1
-
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1
-
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
-
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
-
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
-
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
-
/* Define to 1 if you have the <sys/shm.h> header file. */
/* #undef HAVE_SYS_SHM_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/time.h> header file. */
#define HAVE_SYS_TIME_H 1
-
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
-
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
-
/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1
-
/* Name of package */
#define PACKAGE "stressapptest"
-
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "opensource@google.com"
-
/* Define to the full name of this package. */
#define PACKAGE_NAME "stressapptest"
-
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "stressapptest 1.0.4_autoconf"
-
+#define PACKAGE_STRING "stressapptest 1.0.9_autoconf"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "stressapptest"
-
/* Define to the home page for this package. */
#define PACKAGE_URL ""
-
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.4_autoconf"
-
+#define PACKAGE_VERSION "1.0.9_autoconf"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
-
/* Define to the type of arg 1 for `select'. */
#define SELECT_TYPE_ARG1 int
-
/* Define to the type of args 2, 3 and 4 for `select'. */
#define SELECT_TYPE_ARG234 (fd_set *)
-
/* Define to the type of arg 5 for `select'. */
#define SELECT_TYPE_ARG5 (struct timeval *)
-
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
-
/* Define to 1 if strerror_r returns char *. */
/* #undef STRERROR_R_CHAR_P */
-
/* Defined if the target CPU is armv7a */
-#define STRESSAPPTEST_CPU_ARMV7A /**/
-
+/* #define STRESSAPPTEST_CPU_ARMV7A */
/* Defined if the target CPU is i686 */
/* #undef STRESSAPPTEST_CPU_I686 */
-
-/* Defined if the target CPU is MIPS */
-/* #undef STRESSAPPTEST_CPU_MIPS */
-
/* Defined if the target CPU is PowerPC */
/* #undef STRESSAPPTEST_CPU_PPC */
-
/* Defined if the target CPU is x86_64 */
/* #undef STRESSAPPTEST_CPU_X86_64 */
-
/* Defined if the target OS is BSD based */
/* #undef STRESSAPPTEST_OS_BSD */
-
/* Defined if the target OS is OSX */
/* #undef STRESSAPPTEST_OS_DARWIN */
-
/* Defined if the target OS is Linux */
#define STRESSAPPTEST_OS_LINUX /**/
-
/* Timestamp when ./configure was executed */
#ifndef STRESSAPPTEST_TIMESTAMP
#define STRESSAPPTEST_TIMESTAMP "Android version"
#endif
-
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
-
/* Version number of package */
-#define VERSION "1.0.4_autoconf"
-
+#define VERSION "1.0.9_autoconf"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
-
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
-
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
@@ -230,17 +160,13 @@
# define _Restrict
# define __restrict__
#endif
-
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
-
/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */
-
/* Define to the type of an unsigned integer type of width exactly 16 bits if
such a type exists and the standard includes do not define it. */
/* #undef uint16_t */
-
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */