[ptxdist] [PATCH] xwayland: conditionally depend on libepoxy
XWayland only needs libepoxy if the glamor option is enabled. Also added wayland-protocols as an explicit dependency, as it was previously only implicitly depended on through libepoxy. Signed-off-by: Sven Püschel --- rules/xwayland.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/xwayland.in b/rules/xwayland.in index 9f23c6265..a662ec2ec 100644 --- a/rules/xwayland.in +++ b/rules/xwayland.in @@ -6,11 +6,11 @@ menuconfig XWAYLAND select HOST_MESON select LIBC_M select LIBDRM - select LIBEPOXY select LIBXCVT select NETTLE select PIXMAN select WAYLAND + select WAYLAND_PROTOCOLS select XORGPROTO select XORG_LIB_FONTENC select XORG_LIB_XAU @@ -19,6 +19,7 @@ menuconfig XWAYLAND select XORG_LIB_XKBFILE select XORG_LIB_XSHMFENCE select XORG_LIB_XTRANS + select LIBEPOXY if XWAYLAND_GLAMOR select MESALIB if XWAYLAND_GLAMOR select MESALIB_GBM if XWAYLAND_GLAMOR select MESALIB_GLX if XWAYLAND_EXT_GLX -- 2.39.2
[ptxdist] [PATCH] apitrace: remove Google Test dependency
The generated test files are neither executed nor installed into the target. Therefore disabling them to remove the dependency on Google Test. Signed-off-by: Sven Püschel --- ...ithout-GTest-when-BUILD_TESTING-is-n.patch | 60 +++ patches/apitrace-11.1/series | 3 +- rules/apitrace.in | 1 - rules/apitrace.make | 2 +- 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch diff --git a/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch b/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch new file mode 100644 index 0..6141bc92f --- /dev/null +++ b/patches/apitrace-11.1/0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch @@ -0,0 +1,60 @@ +From: Brent Spillner +Date: Sat, 23 Sep 2023 00:07:25 +1000 +Subject: [PATCH] Allow building without GTest when BUILD_TESTING is not set + +Link: https://github.com/apitrace/apitrace/pull/894 +--- + CMakeLists.txt| 19 --- + thirdparty/CMakeLists.txt | 2 +- + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3d8b5811ebe2..ecdf8a0f0b0b 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -483,7 +483,9 @@ if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) + pkg_check_modules (BROTLIENC IMPORTED_TARGET libbrotlienc>=1.0.7) + endif () + +-find_package (GTest) ++if (BUILD_TESTING) ++find_package (GTest) ++endif () + endif () + + add_subdirectory (thirdparty) +@@ -495,12 +497,15 @@ add_subdirectory (thirdparty) + include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khronos) + + # Convenience macro for adding unit tests +-macro (add_gtest) +-add_executable (${ARGV}) +-target_link_libraries (${ARGV0} GTest::GTest) +-add_dependencies (check ${ARGV0}) +-add_test (NAME ${ARGV0} COMMAND ${ARGV0}) +-endmacro () ++# Should only be invoked when BUILD_TESTING is enabled ++if (BUILD_TESTING) ++ macro (add_gtest) ++ add_executable (${ARGV}) ++ target_link_libraries (${ARGV0} GTest::GTest) ++ add_dependencies (check ${ARGV0}) ++ add_test (NAME ${ARGV0} COMMAND ${ARGV0}) ++ endmacro () ++endif () + + + ## +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index ceb9305b44a4..4aca96c7e860 100644 +--- a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +@@ -52,7 +52,7 @@ if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") + endif () + + # We use non-standard C++ flags, so we can't just use GTest's CMakeLists.txt +-if (NOT GTEST_FOUND) ++if (BUILD_TESTING AND NOT GTEST_FOUND) + message (STATUS "Using bundled GTest") + include_with_scope (gtest.cmake) + endif () diff --git a/patches/apitrace-11.1/series b/patches/apitrace-11.1/series index d4c24c917..3ec615140 100644 --- a/patches/apitrace-11.1/series +++ b/patches/apitrace-11.1/series @@ -2,4 +2,5 @@ #tag:base --start-number 1 0001-HACK-don-t-check-for-submodules-for-external-depende.patch 0002-HACK-don-t-do-dpkg-architecture-magic.patch -# d781b7ce7b411ab6ab663c32f56ed491 - git-ptx-patches magic +0003-Allow-building-without-GTest-when-BUILD_TESTING-is-n.patch +# b2c22b5a761a53785691516d94cb19c1 - git-ptx-patches magic diff --git a/rules/apitrace.in b/rules/apitrace.in index 581517a17..5a8b3e596 100644 --- a/rules/apitrace.in +++ b/rules/apitrace.in @@ -7,7 +7,6 @@ config APITRACE select ZLIB select LIBPNG select BROTLI - select GOOGLETEST prompt "apitrace" help Tools for tracing OpenGL, Direct3D, and other graphics APIs. diff --git a/rules/apitrace.make b/rules/apitrace.make index 197413fbb..6be996408 100644 --- a/rules/apitrace.make +++ b/rules/apitrace.make @@ -55,7 +55,7 @@ APITRACE_CONF_TOOL:= cmake APITRACE_CONF_OPT := \ $(CROSS_CMAKE_USR) \ -DWRAPPER_INSTALL_DIR=/usr/lib/apitrace/wrappers \ - -DBUILD_TESTING=ON \ + -DBUILD_TESTING=OFF \ -DENABLE_ASAN=OFF \ -DENABLE_CLI=ON \ -DENABLE_EGL=ON \ -- 2.39.2
[ptxdist] [PATCH] qt-everywhere-opensource-src: Removed whitespace error from patch
fixed 'warning: 1 line adds whitespace errors.' when running 'ptxdist extract --git qt5' Signed-off-by: Sven Püschel --- .../0001-CVE-2023-4863-5.15.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/qt-everywhere-opensource-src-5.15.12/0001-CVE-2023-4863-5.15.patch b/patches/qt-everywhere-opensource-src-5.15.12/0001-CVE-2023-4863-5.15.patch index f4462608f..9d5b9fdf3 100644 --- a/patches/qt-everywhere-opensource-src-5.15.12/0001-CVE-2023-4863-5.15.patch +++ b/patches/qt-everywhere-opensource-src-5.15.12/0001-CVE-2023-4863-5.15.patch @@ -424,7 +424,7 @@ index 2b46f5bec641..d72147658721 100644 +#include + + #include -+ ++ #ifdef HAVE_CONFIG_H - #include "src/webp/config.h" - #endif -- 2.45.0
Re: [ptxdist] Globally define GIT_CEILING_DIRECTORIES?
Hi Christian, Just to summarize so I understand this. You want to limit the searching for git repos, so that if it isn't found in the current posix PWD (cwd), it's not a git repo? I'm assuming it's expandable by doing an export to $PWD? I only want to limit the parent search at a specific directory, not to the current directory. Practically I'm using DistroKit as a BSP with PTXDist. The target package (e.g. sockperf) is downloaded and extracted to /path/to/DistroKit/platform-v8a/build-target/sockperf-3.10 . Currently sockperf executes "git rev-parse HEAD" to get the current commit, that is attached to the version number. As the sockperf-3.10 directory itself isn't a Git directory, git checks the parent directories until it finds the Git repository of DistroKit and returns it's commit hash. This results in sockperf having a Distrokit commit as part of it's version number. lshw as another example used the version tag of Distrokit as it's own version. When setting GIT_CEILING_DIR=/path/to/DistroKit/platform-v8a/build-target , then Git will still backtrack, but stop when it reaches the build-target directory. E.g. when /path/to/Distrokit/platform-v8a/build-target/sockperf-3.10 is a Git repository and some buildscript calls git from /path/to/DistroKit/platform-v8a/build-target/sockperf-3.10/src , then Git still traverses the parent directory to find the sockperf Git repository. But if sockperf-3.10 isn't a git repo, it will stop backtracking to the build-target directory and return that it didn't find a git repository. Have you tried this as an global? Afaict, sockperf treats this locally? I've added it locally to sockperf via SOCKPERF_CONF_ENV := $(CROSS_ENV) GIT_CEILING_DIRECTORIES="$(BUILDDIR)" SOCKPERF_MAKE_ENV := $(CROSS_ENV) GIT_CEILING_DIRECTORIES="$(BUILDDIR)" I haven't tried this globally yet, as I'm not that familiar with the PTXDist internals and didn't wanted to spend multiple hours creating a patch and then get the feedback, that there might be a better way to do it. Also, do you have any anecdotal or factual history from other build environments? Some of them rely extensively on git hashes, ie, repos. They've likely stumbled upon the same question. Nope, PTXDist is my first embedded build environment. Best regards Sven
[ptxdist] Globally define GIT_CEILING_DIRECTORIES?
I would suggest globally setting the GIT_CEILING_DIRECTORIES environment variable when building packages. Besides lshw, sockperf is now the second time I've encountered the buildsystem to check the current git repository. But as Git also checks the parent directories when searching for Git repositories, these checks may result in getting an unwanted Git repository (usually the BSP), resulting in package versions with a Git commit/version that has nothing to do with the actual package. With GIT_CEILING_DIRECTORIES set to the parent directory of the extracted sources, Git will stop searching for parent Git repositories, when it encounters this directory. See my sockperf v2 patch for an example of using this environment variable. Given this is a global change, does anyone see a potential problem? Best regards Sven
[ptxdist] [PATCH v2] Added sockperf benchmarking utility
Signed-off-by: Sven Püschel --- .../0001-Fixed-AArch32-compilation.patch | 69 +++ patches/sockperf-3.10/series | 4 ++ rules/sockperf.in | 8 +++ rules/sockperf.make | 60 4 files changed, 141 insertions(+) create mode 100644 patches/sockperf-3.10/0001-Fixed-AArch32-compilation.patch create mode 100644 patches/sockperf-3.10/series create mode 100644 rules/sockperf.in create mode 100644 rules/sockperf.make diff --git a/patches/sockperf-3.10/0001-Fixed-AArch32-compilation.patch b/patches/sockperf-3.10/0001-Fixed-AArch32-compilation.patch new file mode 100644 index 0..5d15e2787 --- /dev/null +++ b/patches/sockperf-3.10/0001-Fixed-AArch32-compilation.patch @@ -0,0 +1,69 @@ +From: =?UTF-8?q?Sven=20P=C3=BCschel?= +Date: Mon, 13 Feb 2023 10:16:51 +0100 +Subject: [PATCH] Fixed AArch32 compilation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +sockperf added support for AArch64, but at the same time it broke AArch32 support, +as this wasn't catched by a compiler macro anymore and resulted in trying to assemble a rdtsc instruction. + +See https://github.com/Mellanox/sockperf/commit/d84e8179f8ab007c7a19dfe263691b0429df7565 +and https://github.com/Mellanox/sockperf/pull/187 + +Signed-off-by: Sven Püschel +--- + src/sockperf.cpp | 9 + + src/ticks_os.h | 5 + + 2 files changed, 14 insertions(+) + +diff --git a/src/sockperf.cpp b/src/sockperf.cpp +index 293d21747592..5d6ee4141b35 100644 +--- a/src/sockperf.cpp b/src/sockperf.cpp +@@ -2205,6 +2205,13 @@ static int parse_common_opt(const AOPT_OBJECT *common_obj) { + #endif /* DEFINED_TLS */ + } + ++#if defined(__arm__) && !defined(__aarch64__) ++if (!s_user_params.b_no_rdtsc) { ++log_msg("AArch32 target build does not support rdtsc, use --no-rdtsc"); ++rc = SOCKPERF_ERR_BAD_ARGUMENT; ++} ++#endif ++ + // resolve address: -i, -p and --tcp options must be processed before + if (!rc) { + int res = resolve_sockaddr(host_str, port_str, s_user_params.sock_type, +@@ -3868,6 +3875,7 @@ packet pace limit = %d", + log_dbg("+INFO: taking time, using the given settings, consumes %.3lf nsec", + (double)(end - start).toNsec() / SIZE); + ++#if !defined(__arm__) || defined(__aarch64__) + ticks_t tstart = 0, tend = 0; + tstart = os_gettimeoftsc(); + +@@ -3878,6 +3886,7 @@ packet pace limit = %d", + double ticks_per_second = (double)get_tsc_rate_per_second(); + log_dbg("+INFO: taking rdtsc directly consumes %.3lf nsec", + tdelta / SIZE * 1000 * 1000 * 1000 / ticks_per_second); ++#endif + + // step #5: check is user defined a specific SEED value to be used in all rand() calls + // if no seed value is provided, the rand() function is automatically seeded with a value of +diff --git a/src/ticks_os.h b/src/ticks_os.h +index 0f23b2c6f6f5..8750e0374245 100644 +--- a/src/ticks_os.h b/src/ticks_os.h +@@ -99,6 +99,11 @@ inline ticks_t os_gettimeoftsc() { + asm volatile("isb" : : : "memory"); + asm volatile("mrs %0, cntvct_el0" : "=r" (ret)); + return ret; ++#elif defined(__arm__) ++// so the compiler will not complain. for ++// AArch32 compile, this inline is not used ++// since rdtsc is only supported in an optional timer extension ++upper_32 = lower_32 = 0; + #else + // ReaD Time Stamp Counter (RDTCS) + __asm__ __volatile__("rdtsc" : "=a"(lower_32), "=d"(upper_32)); diff --git a/patches/sockperf-3.10/series b/patches/sockperf-3.10/series new file mode 100644 index 0..5f59ae930 --- /dev/null +++ b/patches/sockperf-3.10/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Fixed-AArch32-compilation.patch +# 84265c4b5947716cec9ccf808fa7f92e - git-ptx-patches magic diff --git a/rules/sockperf.in b/rules/sockperf.in new file mode 100644 index 0..91851c2ed --- /dev/null +++ b/rules/sockperf.in @@ -0,0 +1,8 @@ +## SECTION=test_suites + +config SOCKPERF + tristate + select GCCLIBS_CXX + prompt "sockperf" + help + Network benchmarking utility over socket API diff --git a/rules/sockperf.make b/rules/sockperf.make new file mode 100644 index 0..55b96875d --- /dev/null +++ b/rules/sockperf.make @@ -0,0 +1,60 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Mellanox Technologies Ltd. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SOCKPERF) += sockperf + +# +# Paths and names +# +SOCKPERF_VERSION:= 3.10 +SOCKPERF_MD5:= c589f072adf8c00eb95ef83c2d371f28 +SOCKPERF:= sockperf-
[ptxdist] [PATCH v2] Readded lmbench
lmbench was previously removed from PTXDist in commit 81761ccf73cb470e310f121f9e62e926e7f7f4aa due to build failures with newer GCC versions. This commit reverts the commit and adds the necessary patches to compile lmbench with newer GCC versions. Signed-off-by: Sven Püschel --- ...0001-Add-autotool-based-build-system.patch | 930 ++ ...0002-Add-autotool-based-build-system.patch | 263 + .../lmbench-3.0-a9/0003-minor-cleanups.patch | 45 + .../lmbench-3.0-a9/0004-Added-libtirpc.patch | 59 ++ ...-missing-include-for-socklen_t-check.patch | 25 + patches/lmbench-3.0-a9/autogen.sh | 1 + patches/lmbench-3.0-a9/series | 8 + rules/lmbench.in | 10 + rules/lmbench.make| 104 ++ 9 files changed, 1445 insertions(+) create mode 100644 patches/lmbench-3.0-a9/0001-Add-autotool-based-build-system.patch create mode 100644 patches/lmbench-3.0-a9/0002-Add-autotool-based-build-system.patch create mode 100644 patches/lmbench-3.0-a9/0003-minor-cleanups.patch create mode 100644 patches/lmbench-3.0-a9/0004-Added-libtirpc.patch create mode 100644 patches/lmbench-3.0-a9/0005-Added-missing-include-for-socklen_t-check.patch create mode 12 patches/lmbench-3.0-a9/autogen.sh create mode 100644 patches/lmbench-3.0-a9/series create mode 100644 rules/lmbench.in create mode 100644 rules/lmbench.make diff --git a/patches/lmbench-3.0-a9/0001-Add-autotool-based-build-system.patch b/patches/lmbench-3.0-a9/0001-Add-autotool-based-build-system.patch new file mode 100644 index 0..f40b509d8 --- /dev/null +++ b/patches/lmbench-3.0-a9/0001-Add-autotool-based-build-system.patch @@ -0,0 +1,930 @@ +From: Robert Schwebel +Date: Thu, 9 Apr 2009 19:40:55 + +Subject: [PATCH] Add autotool based build system + +In order to provide an autotool based build system, remove the old one. + +Signed-off-by: Robert Schwebel +--- + Makefile | 74 - + results/Makefile | 333 - + src/Makefile | 489 --- + 3 files changed, 896 deletions(-) + delete mode 100644 Makefile + delete mode 100644 results/Makefile + delete mode 100644 src/Makefile + +diff --git a/Makefile b/Makefile +deleted file mode 100644 +index e84dda8079ac.. +--- a/Makefile /dev/null +@@ -1,74 +0,0 @@ +-# Makefile for top level of lmbench +-# $Id$ +- +-# Possible things to $(MAKE): +-# +-# build (default) go to the source directory and build the benchmark +-# results go to the source directory and build and run the benchmark +-# rerun run the benchmark again +-# see see the results that came with this release +-# Go to the results directory and read the Makefile. +-# doc.lpr print the documentation +-# doc.x preview the documentation (needs X, groff, pic, etc) +-# clean go to the subdirs and $(MAKE) clean +-# get $(MAKE) sure all files are checked out +-# sharbuild a shippable shar archive +- +-SHELL=/bin/sh +- +-build: +- cd src && $(MAKE) +- +-results: FRC +- cd src && $(MAKE) results +- +-rerun: +- cd src && $(MAKE) rerun +- +-see: +- cd results && $(MAKE) summary >summary.out 2>summary.errs +- cd results && $(MAKE) percent >percent.out 2>percent.errs +- +-doc.lpr: +- cd doc && $(MAKE) PS && lpr *.PS +- +-doc.x: +- cd doc && $(MAKE) x +- +-clobber clean: +- for i in doc src results scripts; do \ +- echo = $$i =; \ +- (cd $$i && $(MAKE) clean); \ +- done +- /bin/rm -rf bin/* +- -bk clean +- +-get: +- for i in doc src results scripts; do \ +- echo = $$i =; \ +- (cd $$i && bk get -q); \ +- done +- @co -q +- +-info: +- for i in doc src results scripts; do \ +- echo = $$i =; \ +- (cd $$i && info); \ +- done +- +-release: scripts/mkrelease +- scripts/mkrelease +- +-scripts/mkrelease: +- cd scripts && co mkrelease +- +-# XXX - . must be named lmbench for this to work +-shar: +- $(MAKE) clean +- co -q Makefile +- $(MAKE) get +- cd .. && \ +- find lmbench -type f -print | egrep -v 'noship|RCS' > /tmp/FILES +- cd .. && shar -S -a -n lmbench1.0 -L 50K < /tmp/FILES +- +-FRC: +diff --git a/results/Makefile b/results/Makefile +deleted file mode 100644 +index 0935376c13e3.. +--- a/results/Makefile /dev/null +@@ -1,333 +0,0 @@ +-# Makefile for lmbench results. +-# $Id$ +-# +-# Usage: make [ LIST="aix/* sunos/* ..." ] [ what ] +-# +-# What to make: +-# print Prints the results 1 per page. +-# ps
[ptxdist] [PATCH] Added sockperf benchmarking utility
Signed-off-by: Sven Püschel --- rules/sockperf.in | 8 +++ rules/sockperf.make | 58 + 2 files changed, 66 insertions(+) create mode 100644 rules/sockperf.in create mode 100644 rules/sockperf.make diff --git a/rules/sockperf.in b/rules/sockperf.in new file mode 100644 index 0..91851c2ed --- /dev/null +++ b/rules/sockperf.in @@ -0,0 +1,8 @@ +## SECTION=test_suites + +config SOCKPERF + tristate + select GCCLIBS_CXX + prompt "sockperf" + help + Network benchmarking utility over socket API diff --git a/rules/sockperf.make b/rules/sockperf.make new file mode 100644 index 0..e7394cfe4 --- /dev/null +++ b/rules/sockperf.make @@ -0,0 +1,58 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Mellanox Technologies Ltd. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SOCKPERF) += sockperf + +# +# Paths and names +# +SOCKPERF_VERSION:= 3.10 +SOCKPERF_MD5:= c589f072adf8c00eb95ef83c2d371f28 +SOCKPERF:= sockperf-$(SOCKPERF_VERSION) +SOCKPERF_SUFFIX := tar.gz +SOCKPERF_URL:= https://github.com/Mellanox/sockperf/archive/refs/tags/$(SOCKPERF_VERSION).$(SOCKPERF_SUFFIX) +SOCKPERF_SOURCE := $(SRCDIR)/$(SOCKPERF).$(SOCKPERF_SUFFIX) +SOCKPERF_DIR:= $(BUILDDIR)/$(SOCKPERF) +SOCKPERF_LICENSE:= BSD-3-Clause +SOCKPERF_LICENSE_FILES := file://copying;md5=13ab6d8129b2b03a18ec815d88b545ce + +# +# Prepare +# + +SOCKPERF_CONF_TOOL := autoconf + +$(STATEDIR)/sockperf.prepare: + @$(call targetinfo) + @$(call world/execute, SOCKPERF, ./autogen.sh) + @$(call world/prepare, SOCKPERF) + @$(call touch) + +# +# Target-Install +# + +$(STATEDIR)/sockperf.targetinstall: + @$(call targetinfo) + + @$(call install_init, sockperf) + @$(call install_fixup, sockperf,PRIORITY,optional) + @$(call install_fixup, sockperf,SECTION,base) + @$(call install_fixup, sockperf,AUTHOR,"Mellanox Technologies Ltd.") + @$(call install_fixup, sockperf,DESCRIPTION,missing) + + @$(call install_copy, sockperf, 0, 0, 0755, -, /usr/bin/sockperf) + + @$(call install_finish, sockperf) + + @$(call touch) + +# vim: syntax=make -- 2.30.2
[ptxdist] [PATCH 2/2] Patched lmbench to work with newer GCC versions
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 0..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 + + +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 0..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 + + +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
[ptxdist] [PATCH 1/2] Revert "lmbench: remove after more than one year in staging"
This reverts commit 81761ccf73cb470e310f121f9e62e926e7f7f4aa. Signed-off-by: Sven Püschel --- patches/lmbench-3.0-a9/autogen.sh | 1 + .../lmbench-3.0-a9-autotoolize.diff | 258 + ...lmbench-3.0-a9-remove-old-buildsystem.diff | 924 ++ .../lmbench-3.0-a9-rpcheaders.diff| 37 + patches/lmbench-3.0-a9/series | 3 + rules/lmbench.in | 14 + rules/lmbench.make| 102 ++ 7 files changed, 1339 insertions(+) create mode 12 patches/lmbench-3.0-a9/autogen.sh create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-remove-old-buildsystem.diff create mode 100644 patches/lmbench-3.0-a9/lmbench-3.0-a9-rpcheaders.diff create mode 100644 patches/lmbench-3.0-a9/series create mode 100644 rules/lmbench.in create mode 100644 rules/lmbench.make diff --git a/patches/lmbench-3.0-a9/autogen.sh b/patches/lmbench-3.0-a9/autogen.sh new file mode 12 index 0..9f8a4cb7d --- /dev/null +++ b/patches/lmbench-3.0-a9/autogen.sh @@ -0,0 +1 @@ +../autogen.sh \ No newline at end of file diff --git a/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff new file mode 100644 index 0..b41b77b91 --- /dev/null +++ b/patches/lmbench-3.0-a9/lmbench-3.0-a9-autotoolize.diff @@ -0,0 +1,258 @@ +From: Robert Schwebel +Subject: Add autotool based build system + +Signed-off-by: Robert Schwebel + +--- + Makefile.am |3 + + autogen.sh | 22 + configure.ac| 101 + src/Makefile.am | 100 +++ + 4 files changed, 226 insertions(+) + +Index: b/Makefile.am +=== +--- /dev/null b/Makefile.am +@@ -0,0 +1,3 @@ ++SUBDIRS = \ ++ src ++ +Index: b/autogen.sh +=== +--- /dev/null b/autogen.sh +@@ -0,0 +1,22 @@ ++#!/bin/bash ++ ++# ++# usage: ++# ++# banner ++# ++banner() { ++ echo ++ TG=`echo $1 | sed -e "s,/.*/,,g"` ++ LINE=`echo $TG |sed -e "s/./-/g"` ++ echo $LINE ++ echo $TG ++ echo $LINE ++ echo ++} ++ ++banner "autoreconf" ++ ++autoreconf --force --install --symlink -Wall || exit $? ++ ++banner "Finished" +Index: b/configure.ac +=== +--- /dev/null b/configure.ac +@@ -0,0 +1,101 @@ ++AC_PREREQ(2.59) ++ ++AC_INIT([lmbench], [trunk], [b...@pengutronix.de]) ++AC_CONFIG_SRCDIR([src/lmdd.c]) ++AC_CANONICAL_BUILD ++AC_CANONICAL_HOST ++ ++AM_MAINTAINER_MODE ++ ++CFLAGS="${CFLAGS} -W -Wall" ++ ++# ++# libtool library versioning stuff ++# ++# Library code modified:REVISION++ ++# Interfaces changed/added/removed: CURRENT++ REVISION=0 ++# Interfaces added: AGE++ ++# Interfaces removed: AGE=0 ++LT_CURRENT=0 ++LT_REVISION=0 ++LT_AGE=0 ++AC_SUBST(LT_CURRENT) ++AC_SUBST(LT_REVISION) ++AC_SUBST(LT_AGE) ++ ++ ++# ++# Checks for programs. ++# ++AC_PROG_CC ++AC_PROG_LIBTOOL ++ ++AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2]) ++ ++ ++# ++# Debugging ++# ++AC_MSG_CHECKING([whether to enable debugging]) ++AC_ARG_ENABLE(debug, ++AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]), ++ [case "$enableval" in ++ y | yes) CONFIG_DEBUG=yes ;; ++*) CONFIG_DEBUG=no ;; ++esac], ++[CONFIG_DEBUG=no]) ++AC_MSG_RESULT([${CONFIG_DEBUG}]) ++if test "${CONFIG_DEBUG}" = "yes"; then ++CFLAGS="${CFLAGS} -Werror -Wsign-compare -Wfloat-equal -Wformat-security -g -O1" ++AC_DEFINE(DEBUG, 1, [debugging]) ++else ++CFLAGS="${CFLAGS} -O2" ++fi ++ ++ ++# ++# header file checks ++# ++ ++AC_CHECK_HEADER([pmap_clnt.h],[CFLAGS="${CFLAGS} -DHAVE_pmap_clnt_h"]) ++ ++ ++# ++# type checks ++# ++ ++AC_CHECK_TYPE([uint],[CFLAGS="${CFLAGS} -DHAVE_uint"]) ++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([off64_t],[CFLAGS="${CFLAGS} -DHAVE_off64_t"]) ++ ++AC_COMPILE_IFELSE( ++[ ++ #include ++main() { srand48(973); return (int)(1.0E9 * drand48()); } ++], ++[CFLAGS="${CFLAGS} -DHAVE_DRAND48"]) ++ ++AC_COMPILE_IFELSE( ++[ ++ #include ++main() { srand(973); return (10 * rand()) / RAND_MAX; } ++], ++[CFLAGS="${CFLAGS} -DHAVE_RAND"]) ++ +
[ptxdist] [PATCH] lshw: Set VERSION variable
The lshw Makefile defaults to a git describe if the version variable isn't set. This may cause it to use the version of a parent git repository like DistroKit, as lshw is extracted from a tarball. Signed-off-by: Sven Püschel --- rules/lshw.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/lshw.make b/rules/lshw.make index 1feb82dba..dbc911dfe 100644 --- a/rules/lshw.make +++ b/rules/lshw.make @@ -35,7 +35,7 @@ LSHW_CONF_TOOL:= NO # the "src" subdir avoids this. LSHW_SUBDIR:= src -LSHW_MAKE_ENV := $(CROSS_ENV) +LSHW_MAKE_ENV := $(CROSS_ENV) VERSION=$(LSHW_VERSION) LSHW_MAKE_OPT := all LSHW_INSTALL_OPT := install -- 2.30.2