public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-util/stressapptest/files: stressapptest-1.0.6-autotools.patch stressapptest-1.0.6-misc-fixes.patch stressapptest-1.0.6-pthread-test.patch
@ 2014-08-04  8:09 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2014-08-04  8:09 UTC (permalink / raw
  To: gentoo-commits

vapier      14/08/04 08:09:39

  Added:                stressapptest-1.0.6-autotools.patch
                        stressapptest-1.0.6-misc-fixes.patch
                        stressapptest-1.0.6-pthread-test.patch
  Log:
  Pull random clean up fixes from upstream to simplify build and make it cross-compile.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

Revision  Changes    Path
1.1                  dev-util/stressapptest/files/stressapptest-1.0.6-autotools.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-autotools.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-autotools.patch?rev=1.1&content-type=text/plain

Index: stressapptest-1.0.6-autotools.patch
===================================================================
From fdc52203836f7fd54e1bff84e11d26838a8f21bc Mon Sep 17 00:00:00 2001
From: "nick.j.sanders@gmail.com"
 <nick.j.sanders@gmail.com@93e54ea4-8218-11de-8aaf-8d8425684b44>
Date: Tue, 11 Feb 2014 08:53:31 +0000
Subject: [PATCH] Fix autoconf bugs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Correctly use autoconf host rather than target.
* Use autoconf host_os.
* Warn rather than error on unknown configs.
* Add --disable-default-optimizations to avoid forced flags.
* Fix manfile install


git-svn-id: http://stressapptest.googlecode.com/svn/trunk@42 93e54ea4-8218-11de-8aaf-8d8425684b44
---
 Makefile.am     |   3 +-
 Makefile.in     | 171 ++++++++-----
 aclocal.m4      |  72 ++++--
 configure       | 781 ++++++++++++++++++++++++++++----------------------------
 configure.ac    |  63 +++--
 src/Makefile.in |  36 ++-
 6 files changed, 602 insertions(+), 524 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c476e5f..5b1998f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,3 @@
 SUBDIRS = src
-dist_doc_DATA = COPYING stressapptest.1
\ No newline at end of file
+dist_man_MANS = stressapptest.1
+
diff --git a/configure.ac b/configure.ac
index 6f09eb9..1fbc460 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,60 +12,53 @@ else
 fi
 
 AC_CANONICAL_HOST
-AC_CANONICAL_BUILD
 # Checking for target cpu and setting custom configuration
 # for the different platforms
-AC_CANONICAL_TARGET
-case x"$target_cpu" in
-  "xx86_64")
+AS_CASE(["$host_cpu"],
+  [*x86_64*], [
     AC_DEFINE([STRESSAPPTEST_CPU_X86_64],[],
               [Defined if the target CPU is x86_64])
-    ;;
-  "xi686")
+    ], 
+  [*i686*], [
     AC_DEFINE([STRESSAPPTEST_CPU_I686],[],
               [Defined if the target CPU is i686])
-    ;;
-  "xpowerpc")
+    ], 
+  [*powerpc*], [
     AC_DEFINE([STRESSAPPTEST_CPU_PPC],[],
               [Defined if the target CPU is PowerPC])
-    ;;
-  "xarmv7a")
+    ], 
+  [*armv7a*], [
     AC_DEFINE([STRESSAPPTEST_CPU_ARMV7A],[],
               [Defined if the target CPU is armv7a])
-    ;;
-  *)
-    AC_MSG_ERROR([$target_cpu is not supported! Try x86_64, i686, powerpc, or armv7a])
-    ;;
-esac
+    ], 
+  [AC_MSG_WARN([Unsupported CPU: $host_cpu! Try x86_64, i686, powerpc, or armv7a])]
+)
 
-_os=`uname`
 ## The following allows like systems to share settings. This is not meant to
 ## imply that these OS are the same thing. From OpenOffice dmake configure.in
-case "$_os" in
-  "Linux")
+AS_CASE(["$host_os"],
+  [*linux*], [
     OS_VERSION=linux
     AC_DEFINE([STRESSAPPTEST_OS_LINUX],[],
               [Defined if the target OS is Linux])
-    ;;
-  "Darwin")
+    ],
+  [*darwin*], [
     OS_VERSION=macosx
     AC_DEFINE([STRESSAPPTEST_OS_DARWIN],[],
               [Defined if the target OS is OSX])
-    ;;
-  "FreeBSD")
+    ],
+  [*freebsd*], [
     OS_VERSION=bsd
     AC_DEFINE([STRESSAPPTEST_OS_BSD],[],
               [Defined if the target OS is BSD based])
-    ;;
-  "NetBSD")
+    ],
+  [*netbsd*], [
     OS_VERSION=bsd
     AC_DEFINE([STRESSAPPTEST_OS_BSD],[],
               [Defined if the target OS is BSD based])
-    ;;
-  *)
-    AC_MSG_ERROR([$_os operating system is not suitable to build dmake!])
-    ;;
-esac
+    ],
+  [AC_MSG_WARN([unsupported system: $host_os])]
+)
 
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_CONFIG_SRCDIR([src/])
@@ -95,10 +88,14 @@ AC_DEFINE_UNQUOTED([STRESSAPPTEST_TIMESTAMP],
                    "$username @ $hostname on $timestamp",
                    [Timestamp when ./configure was executed])
 
-#Default cxxflags
-CXXFLAGS="$CXXFLAGS -DCHECKOPTS"
-CXXFLAGS="$CXXFLAGS -Wreturn-type -Wunused -Wuninitialized -Wall -Wno-psabi"
-CXXFLAGS="$CXXFLAGS -O3 -funroll-all-loops  -funroll-loops -DNDEBUG"
+AC_ARG_ENABLE([default-optimizations],
+    [AS_HELP_STRING([--disable-default-optimizations], [Disable default optimization flag overrides])])
+AS_IF([test x"$enable_default_optimizations" != xno], [
+    #Default cxxflags
+    CXXFLAGS="$CXXFLAGS -DCHECKOPTS"
+    CXXFLAGS="$CXXFLAGS -Wreturn-type -Wunused -Wuninitialized -Wall -Wno-psabi"
+    CXXFLAGS="$CXXFLAGS -O3 -funroll-all-loops  -funroll-loops -DNDEBUG"
+])
 
 # Checks for header files.
 AC_HEADER_DIRENT
-- 
2.0.0




1.1                  dev-util/stressapptest/files/stressapptest-1.0.6-misc-fixes.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-misc-fixes.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-misc-fixes.patch?rev=1.1&content-type=text/plain

Index: stressapptest-1.0.6-misc-fixes.patch
===================================================================
extracted just a few fixes we care about

From 5fca3981f68115144566ddf91d2d188372603b7b Mon Sep 17 00:00:00 2001
From: "ewout@google.com"
 <ewout@google.com@93e54ea4-8218-11de-8aaf-8d8425684b44>
Date: Tue, 10 Sep 2013 21:27:49 +0000
Subject: [PATCH] New frequency test, fixed error accounting, added logging
 timestamps, and miscellaneous smaller changes.

* Added a CPU Frequency test for select X86 processors to verify a minimum frequency is maintained during non-pause periods.
* Fixed the error accounting in WorkerThread::CheckRegion if more than 128 miscompares are found and when block errors are detected.
* Updated the logger to include timestamps and the associated timezone.
* Moved from apicid() to sched_getcpu() for determining the core ID.
* Added the ability to reserve a specified amount of memory. This can override the requested memory allocation.
* If not using POSIX shared memory or hugepages, explicitly mmap memory if the pagesize is 4kB otherwise use memalign.
* Removed the OSLayer's unused PCI device handling.
* Numerous refactoring changes.



git-svn-id: http://stressapptest.googlecode.com/svn/trunk@38 93e54ea4-8218-11de-8aaf-8d8425684b44
---
 configure.ac       |   6 +-
 src/Makefile.am    |   1 +
 src/clock.h        |  29 ++++
 src/disk_blocks.cc | 187 ++++++++---------------
 src/disk_blocks.h  | 157 +++++++++++++------
 src/findmask.c     |   6 +-
 src/logger.cc      |  56 ++++---
 src/logger.h       |  17 ++-
 src/os.cc          | 218 +++++++++++----------------
 src/os.h           | 132 ++++++++++++++--
 src/sat.cc         | 144 +++++++++++++++---
 src/sat.h          |  19 ++-
 src/sattypes.h     |  58 ++++++-
 src/worker.cc      | 435 +++++++++++++++++++++++++++++++++++++++++------------
 src/worker.h       | 100 +++++++++++-
 stressapptest.1    |   7 +-
 16 files changed, 1095 insertions(+), 477 deletions(-)
 create mode 100644 src/clock.h

diff --git a/src/os.cc b/src/os.cc
index 7cae23b..6358398 100644
--- a/src/os.cc
+++ b/src/os.cc
@@ -130,7 +141,7 @@ int OsLayer::AddressMode() {
 // Translates user virtual to physical address.
 uint64 OsLayer::VirtualToPhysical(void *vaddr) {
   uint64 frame, shift;
-  off64_t off = ((uintptr_t)vaddr) / getpagesize() * 8;
+  off64_t off = ((uintptr_t)vaddr) / sysconf(_SC_PAGESIZE) * 8;
   int fd = open(kPagemapPath, O_RDONLY);
   // /proc/self/pagemap is available in kernel >= 2.6.25
   if (fd < 0)
@@ -507,7 +533,7 @@ bool OsLayer::AllocateTestMem(int64 length, uint64 paddr_base) {
         break;
       }
 
-      shmaddr = shmat(shmid, NULL, NULL);
+      shmaddr = shmat(shmid, NULL, 0);
       if (shmaddr == reinterpret_cast<void*>(-1)) {
         int err = errno;
         string errtxt = ErrorString(err);
@@ -564,7 +590,7 @@ bool OsLayer::AllocateTestMem(int64 length, uint64 paddr_base) {
         // Do a full mapping here otherwise.
         shmaddr = mmap64(NULL, length, PROT_READ | PROT_WRITE,
                          MAP_SHARED | MAP_NORESERVE | MAP_LOCKED | MAP_POPULATE,
-                         shm_object, NULL);
+                         shm_object, 0);
         if (shmaddr == reinterpret_cast<void*>(-1)) {
           int err = errno;
           string errtxt = ErrorString(err);
-- 
2.0.0




1.1                  dev-util/stressapptest/files/stressapptest-1.0.6-pthread-test.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-pthread-test.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/stressapptest/files/stressapptest-1.0.6-pthread-test.patch?rev=1.1&content-type=text/plain

Index: stressapptest-1.0.6-pthread-test.patch
===================================================================
From 2cc58e88b26e13e87a36439d7a7e7b44b4a1e47e Mon Sep 17 00:00:00 2001
From: "nick.j.sanders" <nick.j.sanders@93e54ea4-8218-11de-8aaf-8d8425684b44>
Date: Wed, 9 Jan 2013 21:13:13 +0000
Subject: [PATCH] Allow ./configure for cross compile

Fix regression from BARRIER detect change.


git-svn-id: http://stressapptest.googlecode.com/svn/trunk@36 93e54ea4-8218-11de-8aaf-8d8425684b44
---
 configure                     | 49 +++++++------------------------------------
 configure.ac                  | 21 +------------------
 src/stressapptest_config.h.in |  3 +++
 3 files changed, 11 insertions(+), 62 deletions(-)

diff --git a/configure b/configure
index 12bc16b..8c10c52 100755
--- a/configure
+++ b/configure
@@ -5064,6 +5064,13 @@ if test "$ac_res" != no; then :
 
 fi
 
+ac_fn_c_check_type "$LINENO" "pthread_barrier_t" "ac_cv_type_pthread_barrier_t" "$ac_includes_default"
+if test "x$ac_cv_type_pthread_barrier_t" = x""yes; then :
+
+$as_echo "#define HAVE_PTHREAD_BARRIERS 1" >>confdefs.h
+
+fi
+
 for ac_header in libaio.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default"
@@ -5201,48 +5208,6 @@ if test "$ac_res" != no; then :
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_barrier" >&5
-$as_echo_n "checking for pthread_barrier... " >&6; }
-if test "${ac_cv_func_pthread_barrier+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      #include <pthread.h>
-      int main(void)
-      {
-        pthread_barrier_t t;
-        return 0;
-      }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_pthread_barrier=yes
-else
-  ac_cv_func_pthread_barrier=no
-
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_pthread_barrier" >&5
-$as_echo "$ac_cv_func_pthread_barrier" >&6; }
-if test "$ac_cv_func_pthread_barrier" = "yes"; then
-
-$as_echo "#define HAVE_PTHREAD_BARRIER 1" >>confdefs.h
-
-fi
 
 # Checks for typedefs, structures, and compiler characteristics.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
diff --git a/configure.ac b/configure.ac
index aba8791..ca10966 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,31 +107,12 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h], [], [AC_MSG_FAILURE([Missing some header files.])])
 AC_CHECK_HEADERS([pthread.h])
 AC_SEARCH_LIBS([pthread_create], [pthread])
+AC_CHECK_TYPE([pthread_barrier_t], AC_DEFINE(HAVE_PTHREAD_BARRIERS, [1], [Define to 1 if the system has `pthread_barrier'.]))
 AC_CHECK_HEADERS([libaio.h])
 AC_SEARCH_LIBS([io_setup], [aio])
 AC_CHECK_HEADERS([sys/shm.h])
 AC_SEARCH_LIBS([shm_open], [rt])
 
-AC_MSG_CHECKING(for pthread_barrier)
-AC_CACHE_VAL(
-  ac_cv_func_pthread_barrier,
-  AC_TRY_RUN(
-    [
-      #include <pthread.h>
-      int main(void)
-      {
-        pthread_barrier_t t;
-        return 0;
-      }
-    ],
-    ac_cv_func_pthread_barrier=yes,
-    ac_cv_func_pthread_barrier=no
-  )
-)
-AC_MSG_RESULT($ac_cv_func_pthread_barrier)
-if test "$ac_cv_func_pthread_barrier" = "yes"; then
-  AC_DEFINE(HAVE_PTHREAD_BARRIER, [1], [Define to 1 if the system has `pthread_barrier'.])
-fi
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_HEADER_STDBOOL
diff --git a/src/stressapptest_config.h.in b/src/stressapptest_config.h.in
index 97f306e..5412df4 100644
--- a/src/stressapptest_config.h.in
+++ b/src/stressapptest_config.h.in
@@ -53,6 +53,9 @@
 /* Define to 1 if you have the `posix_memalign' function. */
 #undef HAVE_POSIX_MEMALIGN
 
+/* Define to 1 if the system has `pthread_barrier'. */
+#undef HAVE_PTHREAD_BARRIERS
+
 /* Define to 1 if you have the <pthread.h> header file. */
 #undef HAVE_PTHREAD_H
 
-- 
2.0.0






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-04  8:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04  8:09 [gentoo-commits] gentoo-x86 commit in dev-util/stressapptest/files: stressapptest-1.0.6-autotools.patch stressapptest-1.0.6-misc-fixes.patch stressapptest-1.0.6-pthread-test.patch Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox