From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 07 Feb 2023 15:22:10 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pPOrL-00H54j-Nt for lore@lore.pengutronix.de; Tue, 07 Feb 2023 15:22:10 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pPOrI-0002X3-HU; Tue, 07 Feb 2023 15:22:08 +0100 Received: from luzerne.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::52]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pPOr6-0002IO-Ca; Tue, 07 Feb 2023 15:21:56 +0100 From: =?UTF-8?q?Sven=20P=C3=BCschel?= To: ptxdist@pengutronix.de Date: Tue, 7 Feb 2023 15:21:39 +0100 Message-Id: <20230207142139.340389-2-s.pueschel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230207142139.340389-1-s.pueschel@pengutronix.de> References: <20230207142139.340389-1-s.pueschel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: =?UTF-8?q?Sven=20P=C3=BCschel?= Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 --- .../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 +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 +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 ]]) + 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