summaryrefslogtreecommitdiff
path: root/sys-libs/libhugetlbfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/libhugetlbfs')
-rw-r--r--sys-libs/libhugetlbfs/Manifest10
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch258
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch13
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch31
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch22
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch45
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch34
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch31
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild175
-rw-r--r--sys-libs/libhugetlbfs/metadata.xml12
10 files changed, 0 insertions, 631 deletions
diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
deleted file mode 100644
index a56c823cd78c..000000000000
--- a/sys-libs/libhugetlbfs/Manifest
+++ /dev/null
@@ -1,10 +0,0 @@
-AUX libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch 10055 BLAKE2B 38b3c28321bdaa5271d8655823ea00952ca8571c84bfe9ec980a35ad7ad77e382ac9235c058597628cc574e03ce0dadbe19bab298c30763e03508aff01275e4b SHA512 abfcfdd87cf7c17663ba466c46182ac04aac454bcedc55a5032bd142419388daa8b0ca0a885f3aedfc830bbd2c58dfd15c4a3499a6fb26df679d8cbe87bf2143
-AUX libhugetlbfs-2.23-musl-ino_t-fix.patch 298 BLAKE2B cefafb44877d41e1255854dfb5fe4e8d0a5bc162f8de72541fd54a8b2caa3593a26e27515605a072afbae573432d797cd9a16d1db9796aea1678b7e4bf5df34e SHA512 65ed971be4c1646c7fd34c16ee7ba36066fb35298f91ceb53122c53c94cfda13de7ebcdf464cba393b50cf77b243ecc5ec136399ba7ab286ecb5e0f9ffc4b819
-AUX libhugetlbfs-2.23-musl-nonnull-fix.patch 935 BLAKE2B 7a3c13e24ed9e8b86f5e37db10313a7b67fd65b6bd328f304fad3f7b86f86fc66fab8b418ddade7d1f60327d4caf110fbeefb9254b1a75ca6c8e1043e5594578 SHA512 66b96b60bebfc7ad13bc1646868eb5dd447aae8922513d126a8775ccc24a19b3f0e25c986e34b52de7b48fd19278db50af116aec78517ece47189f4f8f6c89bf
-AUX libhugetlbfs-2.23-musl-path-max-fix.patch 462 BLAKE2B 79247f6e2cb50b43ccb54f3434e7ebea696f00743f2ab1f70ea172a1c97f15c7110ef0cf46c57ec9fef6c51b1fd38ebf122284d0622d86d2de8e2c3708934bc6 SHA512 be71e9aebe25fcef59c1ac0935fdc25771c5d153ddee4b9749275e4e0eb0f9967f59030aab0f2e9a2a5dcfce2fc1edf3ead5403cc8501adbbb4f79df1e8ee66b
-AUX libhugetlbfs-2.23-musl-sc-level2-fix.patch 1618 BLAKE2B 0d21d5b08c11bdb54fab5bd67b924b6a8277204868f3b4ab833f3cf877ca9e26c588768d2f05a7159a2df1246693761e8f35a22419897c9d9adbf74c804b0556 SHA512 4c2dfcdd35afc49b39284d58b7e1c3f2f4f618930d905e48c0ad6e276343dcdfad383120538a759996e7188406c263cf2666d8cba99556f4d7bb208eb2ffc230
-AUX libhugetlbfs-2.23-uncompressed-man-pages.patch 1515 BLAKE2B b43415a3059f1071f0fc04ec834cd51d87a8bd93f2df6b428a33296b1b55745f23861415a463d5899b12699c5f4a3e5bdd837a8ec2894d1fc89039924330d77d SHA512 ea3ef19a688866676315af59422233681a41338fd049cfa50ed91f660f0baf1950ba056b9fcd540e6694b8ec348c0d1fbb3aa6b8c1840e22a77634e26555c9bc
-AUX libhugetlbfs-2.6-fixup-testsuite.patch 1231 BLAKE2B e49ac448b4ac17a6ce9c32543e3ad7391bc8525e147d7a5100ef7ae15e4b0cf48b58ff1fe62d9a0fa61f142b7b8366228974c6628999edaa61d96114371bc09d SHA512 af9ee541ac4a30260e17baab1616cee13fdcc679ae3fdceed29ca6282c12a6b60d24b04bb61e3aa5f42092e017eb3bae59a56fd2b03954e40803f9f6f2cc4f80
-DIST libhugetlbfs-2.23.tar.gz 175459 BLAKE2B f469ff9a65364e9f0e04c11c8010c958855ebd4d50e1dd719576cda7c280586623404304be64a794907a5fb1d97bd9c0620a91d7a2492577e04fa40ff432b4c7 SHA512 fc9a7d59bcda9d3ca9c9e43a3a348f989c9cbdbbb77f21a43a06e71eacd05bbe5a7b2b51e20ae9ea00da9f1c4d1130da529bbfb702e8c9d11cab6efadd3dc168
-EBUILD libhugetlbfs-2.23.ebuild 4490 BLAKE2B 81f15b9e48dfb5c699c89625121508b523a16e0d06c9f2444dbba33efc756850bcbbe1910ac66dcfa49bf0070c7a4149e7b18776dac82440f0b0047fb4a4ee99 SHA512 d54e9aa3c5c328105cb15a8fd3d6f4b87fb9ef6248a0eebea950e442072cd321681c0c9dfe1bf2c0c83cdad9299aad5dd3703549faed5359882410854b1d4328
-MISC metadata.xml 397 BLAKE2B 7b521a2822a494f6a2b7a85420a38edd396ca0e3856faeb682378c48eda3d1932788af7ac7bbb4e07cae37b2119afd386f75c5dc0ab1f69c8e4630be16cc549e SHA512 96065769a7893c1e05bc3ab9396eb01a60a293dac9b090419087a9bb5a152b2f291a950e8217ffcb7bed34262a5369119da469e22cc3171fdc0ad2b87ae6d698
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
deleted file mode 100644
index 68e121e240ab..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-allow-building-against-glibc-2.34.patch
+++ /dev/null
@@ -1,258 +0,0 @@
-From 959d74fd0fbbff310943096e15024a84e8f5cba4 Mon Sep 17 00:00:00 2001
-From: Matheus Castanho <msc@linux.ibm.com>
-Date: Thu, 12 Aug 2021 16:38:46 -0300
-Subject: [PATCH] Disable hugepage-backed malloc if __morecore is not available
-
-Starting with glibc 2.32, __morecore hook has been marked as deprecated, and was
-completely removed on glibc 2.34, which causes an undefined symbol error during
-the build of libhugetlbfs.
-
-Greater changes are needed in order to keep providing the same functionality
-with future versions of glibc (see issue #52). Meanwhile, we can disable
-hugepage-backed malloc setup if __morecore is not available so users can at
-least keep using the other features provided by the library. Related tests are
-also conditionally disabled, and will show as SKIPPED if __morecore is not
-available.
-
-Tested on powerpc64le and x86_64 with glibc 2.34 and olders.
-
-Signed-off-by: Matheus Castanho <msc@linux.ibm.com>
----
- Makefile | 6 +++++
- morecore.c | 8 ++++++
- tests/run_tests.py | 67 +++++++++++++++++++++++++++++++++++++++-------
- 3 files changed, 71 insertions(+), 10 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 8b73523..35e53e7 100644
---- a/Makefile
-+++ b/Makefile
-@@ -192,6 +192,12 @@ endif
- endif
- endif
-
-+# glibc 2.34 removed __morecore, so it may not be available with recent versions
-+HAS_MORECORE := $(shell /bin/echo -e '\#include <malloc.h>\nvoid * morecore_exists() { return &__morecore; }' | $(CC) -c -xc -o /dev/null - &> /dev/null && /bin/echo yes || /bin/echo no)
-+ifeq ($(HAS_MORECORE),yes)
-+CFLAGS += -DHAS_MORECORE
-+endif
-+
- HEADERDIR = $(PREFIX)/include
- LIBDIR32 = $(PREFIX)/$(LIB32)
- LIBDIR64 = $(PREFIX)/$(LIB64)
-diff --git a/morecore.c b/morecore.c
-index 6563bbd..405c566 100644
---- a/morecore.c
-+++ b/morecore.c
-@@ -33,6 +33,13 @@
-
- #include "libhugetlbfs_internal.h"
-
-+#ifndef HAS_MORECORE
-+void hugetlbfs_setup_morecore(void)
-+{
-+ INFO("Not setting up morecore because it's not available (see issue #52).\n");
-+}
-+#else
-+
- static int heap_fd;
-
- static void *heapbase;
-@@ -381,3 +388,4 @@ void hugetlbfs_setup_morecore(void)
- * to mmap() if we run out of hugepages. */
- mallopt(M_MMAP_MAX, 0);
- }
-+#endif /* HAS_MORECORE */
-diff --git a/tests/run_tests.py b/tests/run_tests.py
-index 018264d..871d04d 100755
---- a/tests/run_tests.py
-+++ b/tests/run_tests.py
-@@ -60,7 +60,7 @@ def snapshot_pool_state():
- l.append((d, tuple(substate)))
- return tuple(l)
-
--def run_test_prog(bits, pagesize, cmd, **env):
-+def run_test_prog(bits, pagesize, cmd, output='stdout', **env):
- if paranoid_pool_check:
- beforepool = snapshot_pool_state()
- print("Pool state: %s" % str(beforepool))
-@@ -73,15 +73,17 @@ def run_test_prog(bits, pagesize, cmd, **env):
- % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
- local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
-
-+ popen_args = {'env' : local_env, output : subprocess.PIPE}
-+
- try:
-- p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
-+ p = subprocess.Popen(cmd, **popen_args)
- rc = p.wait()
- except KeyboardInterrupt:
- # Abort and mark this a strange test result
- return (None, "")
- except OSError as e:
- return (-e.errno, "")
-- out = p.stdout.read().decode().strip()
-+ out = getattr(p, output).read().decode().strip()
-
- if paranoid_pool_check:
- afterpool = snapshot_pool_state()
-@@ -309,6 +311,33 @@ def check_linkhuge_tests():
- okbits.add(bits)
- return okbits
-
-+def check_morecore_disabled():
-+ """
-+ Check if support for morecore is available.
-+
-+ Newer glibc versions (>= 2.34) removed the __morecore malloc hook, so tests
-+ relying on that functionality will not work as expected, and should be
-+ disabled.
-+ """
-+ global morecore_disabled, wordsizes, pagesizes
-+
-+ # Quick and dirty way to get a word and page size. Which one doesn't really
-+ # matter in this case.
-+ for wsz in wordsizes:
-+ b = wsz
-+ break
-+ for psz in pagesizes:
-+ p = psz
-+ break
-+
-+ # Run an arbitrary program and check stderr for the "morecore disabled"
-+ # message
-+ (rc, out) = run_test_prog(b, p, "gethugepagesize", output='stderr',
-+ HUGETLB_MORECORE="yes",
-+ HUGETLB_VERBOSE="3")
-+
-+ morecore_disabled = "Not setting up morecore" in out
-+
- def print_cmd(pagesize, bits, cmd, env):
- if env:
- print(' '.join(['%s=%s' % (k, v) for k, v in env.items()]), end=" ")
-@@ -357,14 +386,17 @@ def skip_test(pagesize, bits, cmd, **env):
- print_cmd(pagesize, bits, cmd, env)
- print("SKIPPED")
-
--def do_test(cmd, bits=None, **env):
-+def do_test(cmd, bits=None, skip=False, **env):
- """
- Run a test case, testing each page size and each indicated word size.
- """
- if bits == None: bits = wordsizes
- for p in pagesizes:
- for b in (set(bits) & wordsizes_by_pagesize[p]):
-- run_test(p, b, cmd, **env)
-+ if skip:
-+ skip_test(p, b, cmd, **env)
-+ else:
-+ run_test(p, b, cmd, **env)
-
- def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
- """
-@@ -375,7 +407,7 @@ def do_test_with_rlimit(rtype, limit, cmd, bits=None, **env):
- do_test(cmd, bits, **env)
- resource.setrlimit(rtype, oldlimit)
-
--def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
-+def do_test_with_pagesize(pagesize, cmd, bits=None, skip=False, **env):
- """
- Run a test case, testing with a specified huge page size and
- each indicated word size.
-@@ -383,7 +415,10 @@ def do_test_with_pagesize(pagesize, cmd, bits=None, **env):
- if bits == None:
- bits = wordsizes
- for b in (set(bits) & wordsizes_by_pagesize[pagesize]):
-- run_test(pagesize, b, cmd, **env)
-+ if skip:
-+ skip_test(pagesize, b, cmd, **env)
-+ else:
-+ run_test(pagesize, b, cmd, **env)
-
- def do_elflink_test(cmd, **env):
- """
-@@ -533,7 +568,7 @@ def functional_tests():
- """
- Run the set of functional tests.
- """
-- global linkhuge_wordsizes
-+ global linkhuge_wordsizes, morecore_disabled
-
- # Kernel background tests not requiring hugepage support
- do_test("zero_filesize_segment")
-@@ -598,19 +633,24 @@ def functional_tests():
- do_test("fork-cow")
- do_test("direct")
- do_test_with_pagesize(system_default_hpage_size, "malloc")
-+
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_RESTRICT_EXE="unknown:none")
- do_test_with_pagesize(system_default_hpage_size, "malloc",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_RESTRICT_EXE="unknown:malloc")
- do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall")
- do_test_with_pagesize(system_default_hpage_size, "malloc_manysmall",
-+ skip=morecore_disabled,
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
-
-@@ -630,26 +670,32 @@ def functional_tests():
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libheapshrink.so")
-+
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
- HUGETLB_MORECORE="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libheapshrink.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_MORECORE_SHRINK="yes")
- do_test_with_pagesize(system_default_hpage_size, "heapshrink",
-+ skip=morecore_disabled,
- GLIBC_TUNABLES="glibc.malloc.tcache_count=0",
- LD_PRELOAD="libhugetlbfs.so libheapshrink.so",
- HUGETLB_MORECORE="yes",
- HUGETLB_MORECORE_SHRINK="yes")
-
-- do_test("heap-overflow", HUGETLB_VERBOSE="1", HUGETLB_MORECORE="yes")
-+ do_test("heap-overflow", skip=morecore_disabled, HUGETLB_VERBOSE="1",
-+ HUGETLB_MORECORE="yes")
-
- # Run the remapping tests' up-front checks
- linkhuge_wordsizes = check_linkhuge_tests()
-@@ -747,7 +793,7 @@ def print_help():
-
- def main():
- global wordsizes, pagesizes, dangerous, paranoid_pool_check, system_default_hpage_size
-- global custom_ldscripts
-+ global custom_ldscripts, morecore_disabled
- testsets = set()
- env_override = {"QUIET_TEST": "1", "HUGETLBFS_MOUNTS": "",
- "HUGETLB_ELFMAP": None, "HUGETLB_MORECORE": None}
-@@ -802,6 +848,7 @@ def main():
- return 1
-
- check_hugetlbfs_path()
-+ check_morecore_disabled()
-
- if "func" in testsets: functional_tests()
- if "stress" in testsets: stress_tests()
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch
deleted file mode 100644
index f408f9fd6ac0..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-ino_t-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-# Include dirent.h for ino_t
-# Fixes error: unknown typename 'ino_t'
-# Closes: https://bugs.gentoo.org/828830
---- a/tests/hugetests.h
-+++ b/tests/hugetests.h
-@@ -22,6 +22,7 @@
-
- #include <errno.h>
- #include <string.h>
-+#include <dirent.h>
- #include <unistd.h>
-
- #include "libhugetlbfs_privutils.h"
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch
deleted file mode 100644
index 5e3532e50877..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-nonnull-fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# Use __nonnull only on glibc system
-# Closes: https://bugs.gentoo.org/832980
---- a/shm.c
-+++ b/shm.c
-@@ -35,6 +35,12 @@
- #endif
-
- #ifdef HAVE_SHMGET_SYSCALL
-+
-+/* define __THROW to avoid build issue when it's not available from the libc */
-+#ifndef __THROW
-+#define __THROW
-+#endif
-+
- /*
- * The calls to dlsym() and dlerror() in the shmget() wrapper below force
- * a dependency on libdl.so. This does not work for static executables
-@@ -48,8 +54,13 @@
- * system shmget() may be performed without worry as there is no dynamic
- * call chain.
- */
-+#ifdef __GLIBC__
- extern void *dlsym (void *__restrict __handle, __const char *__restrict __name)
- __attribute__((weak)) __THROW __nonnull ((2));
-+#else
-+extern void *dlsym (void *__restrict __handle, __const char *__restrict __name)
-+ __attribute__((weak)) __THROW __attribute__((nonnull((2))));
-+#endif // __GLIBC__
- extern char *dlerror (void) __attribute__((weak)) __THROW;
-
-
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch
deleted file mode 100644
index 883bb3e98fc7..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-path-max-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-# Include limits.h for PATH_MAX
-# Closes: https://bugs.gentoo.org/828830
---- a/hugeadm.c
-+++ b/hugeadm.c
-@@ -33,6 +33,7 @@
- #include <grp.h>
- #include <pwd.h>
- #include <fcntl.h>
-+#include <limits.h>
-
- #include <sys/stat.h>
- #include <sys/types.h>
---- a/tests/gethugepagesizes.c
-+++ b/tests/gethugepagesizes.c
-@@ -27,6 +27,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#include <limits.h>
- #include <stdarg.h>
- #include <hugetlbfs.h>
-
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch
deleted file mode 100644
index c42e017abec1..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-musl-sc-level2-fix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-# _SC_LEVEL2_CACHE_LINESIZE is most probably Glibc specific define. Hence we
-# cannot use it with other libc's. Check if _SC_LEVEL2_CACHE_LINESIZE is
-# available or use custom function to get CPU cache size
-# Original patch was found here [1]
-# [1]: https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
-# Closes: https://bugs.gentoo.org/828830
---- a/alloc.c
-+++ b/alloc.c
-@@ -245,6 +245,24 @@ void free_huge_pages(void *ptr)
- __free_huge_pages(ptr, 1);
- }
-
-+/*
-+ * Avoid sysconf(_SC_LEVEL2_CACHE_LINESIZE) on linux
-+ * Taken from the folling patch [1]
-+ *
-+ * [1]: https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-benchmark/libhugetlbfs/files/0003-alloc.c-Avoid-sysconf-_SC_LEVEL2_CACHE_LINESIZE-on-l.patch
-+ */
-+#if !defined(_SC_LEVEL2_CACHE_LINESIZE)
-+static size_t get_cacheline_size() {
-+ FILE * fp = fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
-+ unsigned int line_size = 0;
-+ if (fp) {
-+ fscanf(fp, "%d", &line_size);
-+ fclose(fp);
-+ }
-+ return line_size;
-+}
-+#endif
-+
- /*
- * Offset the buffer using bytes wasted due to alignment to avoid using the
- * same cache lines for the start of every buffer returned by
-@@ -261,7 +279,11 @@ void *cachecolor(void *buf, size_t len, size_t color_bytes)
-
- /* Lookup our cacheline size once */
- if (cacheline_size == 0) {
-+#if defined(_SC_LEVEL2_CACHE_LINESIZE)
- cacheline_size = sysconf(_SC_LEVEL2_CACHE_LINESIZE);
-+#else
-+ cacheline_size = get_cacheline_size();
-+#endif
- linemod = time(NULL);
- }
-
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
deleted file mode 100644
index c0ca6a398e70..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.23-uncompressed-man-pages.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -436,27 +436,19 @@ install-man:
- $(INSTALL) -d $(DESTDIR)$(MANDIR8)
- for x in $(INSTALL_MAN1); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR1); \
-- gzip -f $(DESTDIR)$(MANDIR1)/$$x; \
- done
- for x in $(INSTALL_MAN3); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR3); \
-- gzip -f $(DESTDIR)$(MANDIR3)/$$x; \
- done
-- rm -f $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
-- rm -f $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
-- ln -s get_huge_pages.3.gz $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
-- ln -s get_hugepage_region.3.gz $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
-- ln -s hugetlbfs_unlinked_fd.3.gz $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3.gz
-- ln -s hugetlbfs_find_path.3.gz $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3.gz
-+ ln -s get_huge_pages.3 $(DESTDIR)$(MANDIR3)/free_huge_pages.3
-+ ln -s get_hugepage_region.3 $(DESTDIR)$(MANDIR3)/free_hugepage_region.3
-+ ln -s hugetlbfs_unlinked_fd.3 $(DESTDIR)$(MANDIR3)/hugetlbfs_unlinked_fd_for_size.3
-+ ln -s hugetlbfs_find_path.3 $(DESTDIR)$(MANDIR3)/hugetlbfs_find_path_for_size.3
- for x in $(INSTALL_MAN7); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR7); \
-- gzip -f $(DESTDIR)$(MANDIR7)/$$x; \
- done
- for x in $(INSTALL_MAN8); do \
- $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR8); \
-- gzip -f $(DESTDIR)$(MANDIR8)/$$x; \
- done
-
- install-bin:
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
deleted file mode 100644
index 12548a884a6f..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Nuar --exclude '*.S' --exclude Makefile libhugetlbfs-2.6.orig/tests/run_tests.py libhugetlbfs-2.6/tests/run_tests.py
---- libhugetlbfs-2.6.orig/tests/run_tests.py 2009-08-24 05:56:07.000000000 -0700
-+++ libhugetlbfs-2.6/tests/run_tests.py 2009-10-31 00:40:28.520387427 -0700
-@@ -56,6 +56,11 @@
- local_env["LD_LIBRARY_PATH"] = "../obj%d:obj%d:%s" \
- % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
- local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
-+ if isinstance(cmd, types.StringType):
-+ cmd = 'obj%d/%s' % (bits, cmd)
-+ else:
-+ s = 'obj%d/%s' % (bits, cmd[0])
-+ cmd = (s,)+(cmd[1:])
-
- p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
- try:
-@@ -523,10 +528,11 @@
- elfshare_test("linkshare")
- elflink_and_share_test("linkhuge")
-
-- # elflink_rw tests
-- elflink_rw_test("linkhuge_rw")
-- # elflink_rw sharing tests
-- elflink_rw_and_share_test("linkhuge_rw")
-+ if 32 in wordsizes:
-+ # elflink_rw tests
-+ elflink_rw_test("linkhuge_rw")
-+ # elflink_rw sharing tests
-+ elflink_rw_and_share_test("linkhuge_rw")
-
- # Accounting bug tests
- # reset free hpages because sharing will have held some
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
deleted file mode 100644
index 09cf0eba54c1..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.23.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-
-inherit toolchain-funcs python-any-r1
-
-DESCRIPTION="Easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
-SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="test? ( ${PYTHON_DEPS} )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
- "${FILESDIR}"/${PN}-2.23-uncompressed-man-pages.patch
- "${FILESDIR}"/${PN}-2.23-allow-building-against-glibc-2.34.patch
- "${FILESDIR}"/${PN}-2.23-musl-sc-level2-fix.patch
- "${FILESDIR}"/${PN}-2.23-musl-path-max-fix.patch
- "${FILESDIR}"/${PN}-2.23-musl-nonnull-fix.patch
- "${FILESDIR}"/${PN}-2.23-musl-ino_t-fix.patch
-)
-
-src_prepare() {
- default
-
- sed -i \
- -e '/^PREFIX/s:/local::' \
- -e '1iBUILDTYPE = NATIVEONLY' \
- -e '1iV = 1' \
- -e '/gzip.*MANDIR/d' \
- -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
- -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
- -e 's@^\(ARCH\) ?=@\1 =@' \
- Makefile || die "sed failed"
-
- if [[ "$(get_libdir)" == "lib64" ]]; then
- sed -i \
- -e "/^LIB\(32\)/s:=.*:= lib32:" \
- Makefile
- fi
-
- # Tarballs from github don't have the version set.
- # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
- [[ -f version ]] || echo "${PV}" > version
-}
-
-src_test_alloc_one() {
- hugeadm="${1}"
- sign="${2}"
- pagesize="${3}"
- pagecount="${4}"
-
- ${hugeadm} \
- --pool-pages-max ${pagesize}:${sign}${pagecount} \
- && \
- ${hugeadm} \
- --pool-pages-min ${pagesize}:${sign}${pagecount}
- return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
- [[ ${UID} -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
- einfo "Building testsuite"
- emake -j1 tests
-
- local hugeadm='obj/hugeadm'
- local allocated=''
- local rc=0
- # the testcases need 64MiB per pagesize.
- local MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
- einfo "Planning allocation"
- local PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
- # Need to do this before we can create the mountpoints.
- local pagesize pagecount
- for pagesize in ${PAGESIZES} ; do
- # The kernel depends on the location :-(
- mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- done
-
- addwrite /proc/sys/vm/
- addwrite /proc/sys/kernel/shmall
- addwrite /proc/sys/kernel/shmmax
- addwrite /proc/sys/kernel/shmmni
-
- einfo "Checking HugeTLB mountpoints"
- ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
-
- # -----------------------------------------------------
- # --------- die is unsafe after this point. -----------
- # -----------------------------------------------------
-
- einfo "Starting allocation"
- for pagesize in ${PAGESIZES} ; do
- pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
- einfo " ${pagecount} @ ${pagesize}"
-
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- src_test_alloc_one "${hugeadm}" "+" "${pagesize}" "${pagecount}"
-
- rc=$?
- if [[ ${rc} -eq 0 ]]; then
- allocated="${allocated} ${pagesize}:${pagecount}"
- else
- eerror "Failed to add ${pagecount} pages of size ${pagesize}"
- fi
- done
-
- einfo "Allocation status"
- ${hugeadm} --pool-list
-
- if [[ -n "${allocated}" ]]; then
- # All our allocations worked, so time to run.
- einfo "Starting tests"
-
- cd "${S}"/tests || die
- local TESTOPTS="-t func"
- case ${ARCH} in
- amd64|ppc64)
- TESTOPTS="${TESTOPTS} -b 64"
- ;;
- x86)
- TESTOPTS="${TESTOPTS} -b 32"
- ;;
- esac
-
- # This needs a bit of work to give a nice exit code still.
- ./run_tests.py ${TESTOPTS}
- rc=$?
- else
- eerror "Failed to make HugeTLB allocations."
- rc=1
- fi
-
- einfo "Cleaning up memory"
- cd "${S}" || die
- # Cleanup memory allocation
- for alloc in ${allocated} ; do
- pagesize="${alloc/:*}"
- pagecount="${alloc/*:}"
-
- einfo " ${pagecount} @ ${pagesize}"
- src_test_alloc_one "${hugeadm}" "-" "${pagesize}" "${pagecount}"
- done
-
- # ---------------------------------------------------------
- # --------- die is safe again after this point. -----------
- # ---------------------------------------------------------
-
- return ${rc}
-}
-
-src_compile() {
- tc-export AR
- emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
- default
-
- use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
-}
diff --git a/sys-libs/libhugetlbfs/metadata.xml b/sys-libs/libhugetlbfs/metadata.xml
deleted file mode 100644
index 4256595eca45..000000000000
--- a/sys-libs/libhugetlbfs/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<upstream>
- <remote-id type="github">libhugetlbfs/libhugetlbfs</remote-id>
- <remote-id type="sourceforge">libhugetlbfs</remote-id>
-</upstream>
-</pkgmetadata>