summaryrefslogtreecommitdiff
path: root/sys-libs/glibc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-30 23:50:39 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-30 23:50:39 +0000
commit77819fe3944f22678c3bcdf1d773a095441f5140 (patch)
treeddc9dcd1edebe1e94204dfb4bf09ade2c9552f0f /sys-libs/glibc/files
parent826d1b3f488d3549cbd42ccc73ad90ea1ce88f0b (diff)
toolchain bump
Diffstat (limited to 'sys-libs/glibc/files')
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch15
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch32
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch85
-rw-r--r--sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch16
-rw-r--r--sys-libs/glibc/files/host.conf-124
-rw-r--r--sys-libs/glibc/files/nscd-185
6 files changed, 257 insertions, 0 deletions
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
new file mode 100644
index 00000000..45e8ab80
--- /dev/null
+++ b/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch
@@ -0,0 +1,15 @@
+Identify gcc-10+ as a good compiler.
+
+Index: work/glibc-2.19/configure
+===================================================================
+--- glibc-2.19/configure
++++ glibc-2.19/configure
+@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... "
+ ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
++ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* )
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch b/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch
new file mode 100644
index 00000000..72a616a0
--- /dev/null
+++ b/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/503838
+http://gcc.gnu.org/PR60465
+https://sourceware.org/ml/libc-alpha/2015-12/msg00556.html
+https://trofi.github.io/posts/189-glibc-on-ia64-or-how-relocations-bootstrap.html
+
+newer versions of gcc generate relocations in the elf_get_dynamic_info func
+which glibc relies on to populate some info structs. those structs are then
+used by ldso to process relocations in itself. glibc requires that there are
+no relocations until that point (*after* elf_get_dynamic_info), so we end up
+crashing during elf_get_dynamic_info because the relocation has not yet been
+processed.
+
+this hack shuffles the code in a way that tricks gcc into not generating the
+relocation. we need to figure out something better for upstream.
+
+--- a/elf/get-dynamic-info.h
++++ b/elf/get-dynamic-info.h
+@@ -66,8 +66,12 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
+ info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn;
+ else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
+- info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
++ {
++ d_tag_utype i =
++ DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
++ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM;
++ info[i] = dyn;
++ }
+ ++dyn;
+ }
+
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch
new file mode 100644
index 00000000..bf75f80c
--- /dev/null
+++ b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch
@@ -0,0 +1,85 @@
+Remove newer symbols that does not work on linux-2.6.16.
+
+This is only for Prefix standalone.
+
+Index: glibc-2.19/io/sys/stat.h
+===================================================================
+--- glibc-2.19.orig/io/sys/stat.h
++++ glibc-2.19/io/sys/stat.h
+@@ -361,10 +361,6 @@ extern int mkfifoat (int __fd, const cha
+ #ifdef __USE_ATFILE
+ /* Set file access and modification times relative to directory file
+ descriptor. */
+-extern int utimensat (int __fd, const char *__path,
+- const struct timespec __times[2],
+- int __flags)
+- __THROW __nonnull ((2));
+ #endif
+
+ #ifdef __USE_XOPEN2K8
+Index: glibc-2.19/posix/unistd.h
+===================================================================
+--- glibc-2.19.orig/posix/unistd.h
++++ glibc-2.19/posix/unistd.h
+@@ -419,7 +419,6 @@ extern int pipe (int __pipedes[2]) __THR
+ #ifdef __USE_GNU
+ /* Same as pipe but apply flags passed in FLAGS to the new file
+ descriptors. */
+-extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur;
+ #endif
+
+ /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
+Index: glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h
+===================================================================
+--- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86/bits/epoll.h
++++ glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h
+@@ -19,11 +19,5 @@
+ # error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
+ #endif
+
+-/* Flags to be passed to epoll_create1. */
+-enum
+- {
+- EPOLL_CLOEXEC = 02000000
+-#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+- };
+
+ #define __EPOLL_PACKED __attribute__ ((__packed__))
+Index: glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+===================================================================
+--- glibc-2.19.orig/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
++++ glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+@@ -187,8 +187,6 @@
+ # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
+ #endif
+ #ifdef __USE_XOPEN2K8
+-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+- close-on-exit set. */
+ #endif
+
+ /* For F_[GET|SET]FD. */
+Index: glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h
+===================================================================
+--- glibc-2.19.orig/sysdeps/unix/sysv/linux/sys/epoll.h
++++ glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h
+@@ -101,7 +101,6 @@ extern int epoll_create (int __size) __T
+
+ /* Same as epoll_create but with an FLAGS parameter. The unused SIZE
+ parameter has been dropped. */
+-extern int epoll_create1 (int __flags) __THROW;
+
+
+ /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
+Index: glibc-2.19/time/sys/time.h
+===================================================================
+--- glibc-2.19.orig/time/sys/time.h
++++ glibc-2.19/time/sys/time.h
+@@ -140,8 +140,6 @@ extern int utimes (const char *__file, c
+
+ #ifdef __USE_BSD
+ /* Same as `utimes', but does not follow symbolic links. */
+-extern int lutimes (const char *__file, const struct timeval __tvp[2])
+- __THROW __nonnull ((1));
+
+ /* Same as `utimes', but takes an open file descriptor instead of a name. */
+ extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
diff --git a/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
new file mode 100644
index 00000000..2b9cccec
--- /dev/null
+++ b/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch
@@ -0,0 +1,16 @@
+Remove the pipe2 symbol from libc.so, otherwise meson will pick it up.
+
+This is a balance. We decide not to strip all the O_CLOEXEC, otherwise
+gtk+ will need to be patched.
+Index: glibc-2.19/sysdeps/unix/make-syscalls.sh
+===================================================================
+--- glibc-2.19.orig/sysdeps/unix/make-syscalls.sh
++++ glibc-2.19/sysdeps/unix/make-syscalls.sh
+@@ -131,6 +131,7 @@ emit_weak_aliases()
+ echo " echo 'libc_hidden_def ($name)'; \\"
+ ;;
+ *)
++ [ $name = pipe2 ] && continue
+ echo " echo 'weak_alias ($strong, $name)'; \\"
+ echo " echo 'libc_hidden_weak ($name)'; \\"
+ ;;
diff --git a/sys-libs/glibc/files/host.conf-1 b/sys-libs/glibc/files/host.conf-1
new file mode 100644
index 00000000..4c58e52d
--- /dev/null
+++ b/sys-libs/glibc/files/host.conf-1
@@ -0,0 +1,24 @@
+# /etc/host.conf:
+# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $
+
+# The file /etc/host.conf contains configuration information specific to
+# the resolver library. It should contain one configuration keyword per
+# line, followed by appropriate configuration information. The keywords
+# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
+
+
+
+# This keyword specifies how host lookups are to be performed. It
+# should be followed by one or more lookup methods, separated by
+# commas. Valid methods are bind, hosts, and nis.
+#
+order hosts, bind
+
+
+# Valid values are on and off. If set to on, the resolv+ library
+# will return all valid addresses for a host that appears in the
+# /etc/hosts file, instead of only the first. This is off by
+# default, as it may cause a substantial performance loss at sites
+# with large hosts files.
+#
+multi off
diff --git a/sys-libs/glibc/files/nscd-1 b/sys-libs/glibc/files/nscd-1
new file mode 100644
index 00000000..f69c8e2e
--- /dev/null
+++ b/sys-libs/glibc/files/nscd-1
@@ -0,0 +1,85 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="The 'Name Service Cache Daemon' is a daemon that provides a cache"
+description="${description} for the most common name service requests"
+
+extra_started_commands="flush_all flush_hosts flush_group flush_passwd flush_netgroup flush_services"
+
+description_flush_all="Will invalidate hosts, group, passwd, netgroup and services cache"
+description_flush_hosts="Will invalidate hosts cache"
+description_flush_group="Will invalidate group cache"
+description_flush_passwd="Will invalidate passwd cache"
+description_flush_netgroup="Will invalidate netgroup cache"
+description_flush_services="Will invalidate services cache"
+
+pidfile="/run/nscd/nscd.pid"
+command="/usr/sbin/nscd"
+
+depend() {
+ use dns ldap net slapd logger
+}
+
+checkconfig() {
+ if [ ! -d /run/nscd ] ; then
+ checkpath -d -m 755 /run/nscd
+ fi
+
+ if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then
+ ewarn "nscd run dir is not world readable, you should reset the perms:"
+ ewarn "chmod 755 /run/nscd"
+ ewarn "chmod a+rw /run/nscd/socket"
+ ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
+ fi
+
+ if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then
+ checkpath -d -m 700 /var/db/nscd
+ fi
+}
+
+_flush() {
+ local table=$1
+
+ ebegin "Flushing ${table} table"
+ ${command} --invalidate ${table}
+ eend $?
+}
+
+flush_all() {
+ local has_errors=0
+
+ ebegin "Flushing all caches"
+
+ local table=
+ for table in passwd group hosts netgroup services; do
+ ${command} --invalidate ${table}
+ [ $? -ne 0 ] && has_errors=1
+ done
+
+ eend ${has_errors}
+}
+
+flush_hosts() {
+ _flush hosts
+}
+
+flush_group() {
+ _flush group
+}
+
+flush_passwd() {
+ _flush passwd
+}
+
+flush_netgroup() {
+ _flush netgroup
+}
+
+flush_services() {
+ _flush services
+}
+
+start_pre() {
+ checkconfig
+}