mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Sven Püschel" <s.pueschel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: "Sven Püschel" <s.pueschel@pengutronix.de>
Subject: [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions
Date: Tue,  7 Feb 2023 15:21:39 +0100	[thread overview]
Message-ID: <20230207142139.340389-2-s.pueschel@pengutronix.de> (raw)
In-Reply-To: <20230207142139.340389-1-s.pueschel@pengutronix.de>

GCC removed the SunRPC implementation, therefore we're now using
libtirpc. Also added a patch to include the correct header for
socklen_t, so that autotools cannot fail to detect the type presence correctly.

Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
 .../lmbench-3.0-a9-add-libtirpc.diff          | 50 +++++++++++++++++++
 .../lmbench-3.0-a9-fix_socklen_t.diff         | 19 +++++++
 patches/lmbench-3.0-a9/series                 |  2 +
 rules/lmbench.in                              |  9 ++--
 4 files changed, 74 insertions(+), 6 deletions(-)
 create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
 create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff

diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
new file mode 100644
index 000000000..cebe67f73
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-add-libtirpc.diff
@@ -0,0 +1,50 @@
+commit 3cabac2f5b1688fc35a3e6af890d1b0193b8c840
+Author: Sven Püschel <s.pueschel@pengutronix.de>
+Date:   Wed Feb 1 08:17:38 2023 +0000
+
+    added libtirpc
+
+diff --git a/configure.ac b/configure.ac
+index 0d935e8..415203b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,8 +27,39 @@ AC_SUBST(LT_AGE)
+ #
+ # Checks for programs.
+ #
++
++# Function copied and modified from http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=aclocal/libtirpc.m4;h=bddae022693100c810edff042d51b145c8f411a6;hb=HEAD
++dnl Checks for TI-RPC library and headers
++dnl
++AC_DEFUN([AC_LIBTIRPC], [
++
++  PKG_PROG_PKG_CONFIG([0.9.0])
++  PKG_CHECK_MODULES([TIRPC], [libtirpc],
++                    [LIBS="${LIBS} ${TIRPC_LIBS}"
++                       AM_CFLAGS="${AM_CFLAGS} ${TIRPC_CFLAGS}"
++                       AC_DEFINE([HAVE_LIBTIRPC], [1],
++                                 [Define to 1 if you have and wish to use libtirpc.])])
++
++     AS_IF([test -n "${LIBTIRPC}"],
++           [AC_CHECK_LIB([tirpc], [authgss_free_private_data],
++                         [AC_DEFINE([HAVE_AUTHGSS_FREE_PRIVATE_DATA], [1],
++                                    [Define to 1 if your rpcsec library provides authgss_free_private_data])],,
++                         [${LIBS}])])
++
++     AS_IF([test -n "${LIBTIRPC}"],
++           [AC_CHECK_LIB([tirpc], [libtirpc_set_debug],
++                         [AC_DEFINE([HAVE_LIBTIRPC_SET_DEBUG], [1],
++                                    [Define to 1 if your tirpc library provides libtirpc_set_debug])],,
++                         [${LIBS}])])
++
++  AC_SUBST([AM_CFLAGS])
++  AC_SUBST([LIBS])
++
++])dnl
++
+ AC_PROG_CC
+ AC_PROG_LIBTOOL
++AC_LIBTIRPC
+ 
+ AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
+ 
diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
new file mode 100644
index 000000000..e1cba8373
--- /dev/null
+++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-fix_socklen_t.diff
@@ -0,0 +1,19 @@
+commit eacfb4af1ecfafa1a0486643c81f313eb183eaa8
+Author: Sven Püschel <s.pueschel@pengutronix.de>
+Date:   Wed Feb 1 08:54:07 2023 +0000
+
+    Added missing include for socklen_t check
+
+diff --git a/configure.ac b/configure.ac
+index 415203b..c29e794 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,7 +100,7 @@ AC_CHECK_TYPE([uint64],[CFLAGS="${CFLAGS} -DHAVE_uint64"])
+ AC_CHECK_TYPE([uint64_t],[CFLAGS="${CFLAGS} -DHAVE_uint64_t"])
+ AC_CHECK_TYPE([int64],[CFLAGS="${CFLAGS} -DHAVE_int64"])
+ AC_CHECK_TYPE([int64_t],[CFLAGS="${CFLAGS} -DHAVE_int64_t"])
+-AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"])
++AC_CHECK_TYPE([socklen_t],[CFLAGS="${CFLAGS} -DHAVE_socklen_t"], [], [[#include <sys/socket.h>]])
+ AC_CHECK_TYPE([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"])
+ 
+ AC_COMPILE_IFELSE(
diff --git a/patches/lmbench-3.0-a9/series b/patches/lmbench-3.0-a9/series
index 0c4ffef30..b2a777897 100644
--- a/patches/lmbench-3.0-a9/series
+++ b/patches/lmbench-3.0-a9/series
@@ -1,3 +1,5 @@
 lmbench-3.0-a9-remove-old-buildsystem.diff
 lmbench-3.0-a9-autotoolize.diff
 lmbench-3.0-a9-rpcheaders.diff
+lmbench-3.0-a9-add-libtirpc.diff
+lmbench-3.0-a9-fix_socklen_t.diff
diff --git a/rules/lmbench.in b/rules/lmbench.in
index f3d78e8e6..2e6d5fbcb 100644
--- a/rules/lmbench.in
+++ b/rules/lmbench.in
@@ -1,14 +1,11 @@
-## SECTION=staging
-## old section:
-### SECTION=test_suites
+## SECTION=test_suites
 
 config LMBENCH
 	tristate
 	select LIBC_M
 	select GCCLIBS_GCC_S
+	# glibc has removed the SunRPC implementation, see https://fedoraproject.org/wiki/Changes/SunRPCRemoval, therefore we use libtirpc
+	select LIBTIRPC
 	prompt "lmbench"
 	help
 	  Various tools for performance analysis
-
-	  STAGING: remove in PTXdist 2022.01.0
-	  Upstream dead and fails to build with gcc 10.
-- 
2.30.2




  reply	other threads:[~2023-02-07 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 14:21 [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Sven Püschel
2023-02-07 14:21 ` Sven Püschel [this message]
2023-02-10 11:14   ` [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions Michael Olbrich
2023-02-10 11:13 ` [ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging" Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230207142139.340389-2-s.pueschel@pengutronix.de \
    --to=s.pueschel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox