summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaohiro Aota <naota@gentoo.org>2012-03-08 11:02:04 +0000
committerNaohiro Aota <naota@gentoo.org>2012-03-08 11:02:04 +0000
commit160816b9ca384b32df0e740e89fbc37c95af16de (patch)
tree89e43df1e637a57aed691675a0de9cc5035189df /sys-freebsd
parentversion bump, drop useless and fixed versions. (diff)
downloadgentoo-2-160816b9ca384b32df0e740e89fbc37c95af16de.tar.gz
gentoo-2-160816b9ca384b32df0e740e89fbc37c95af16de.tar.bz2
gentoo-2-160816b9ca384b32df0e740e89fbc37c95af16de.zip
Add upstream patch to init TLS for shared object. #390425
(Portage version: 2.2.0_alpha75/cvs/FreeBSD i386)
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/freebsd-libexec/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-libexec/files/freebsd-libexec-8.2-rtld.patch40
-rw-r--r--sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild66
3 files changed, 113 insertions, 1 deletions
diff --git a/sys-freebsd/freebsd-libexec/ChangeLog b/sys-freebsd/freebsd-libexec/ChangeLog
index 086bfe11175a..b1636319edbc 100644
--- a/sys-freebsd/freebsd-libexec/ChangeLog
+++ b/sys-freebsd/freebsd-libexec/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-libexec
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.45 2012/01/16 16:37:09 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.46 2012/03/08 11:02:04 naota Exp $
+
+*freebsd-libexec-8.2-r1 (08 Mar 2012)
+
+ 08 Mar 2012; Naohiro Aota <naota@gentoo.org>
+ +files/freebsd-libexec-8.2-rtld.patch, +freebsd-libexec-8.2-r1.ebuild:
+ Add upstream patch to init TLS for shared object. #390425
*freebsd-libexec-9.0 (16 Jan 2012)
diff --git a/sys-freebsd/freebsd-libexec/files/freebsd-libexec-8.2-rtld.patch b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-8.2-rtld.patch
new file mode 100644
index 000000000000..c60b2fec102c
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-8.2-rtld.patch
@@ -0,0 +1,40 @@
+--- head/libexec/rtld-elf/rtld.c 2011/09/15 11:50:09 225582
++++ head/libexec/rtld-elf/rtld.c 2011/10/08 12:39:47 226155
+@@ -495,8 +495,12 @@
+ exit (0);
+ }
+
+- /* setup TLS for main thread */
+- dbg("initializing initial thread local storage");
++ /*
++ * Processing tls relocations requires having the tls offsets
++ * initialized. Prepare offsets before starting initial
++ * relocation processing.
++ */
++ dbg("initializing initial thread local storage offsets");
+ STAILQ_FOREACH(entry, &list_main, link) {
+ /*
+ * Allocate all the initial objects out of the static TLS
+@@ -504,7 +508,6 @@
+ */
+ allocate_tls_offset(entry->obj);
+ }
+- allocate_initial_tls(obj_list);
+
+ if (relocate_objects(obj_main,
+ ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, NULL) == -1)
+@@ -519,6 +522,14 @@
+ exit (0);
+ }
+
++ /*
++ * Setup TLS for main thread. This must be done after the
++ * relocations are processed, since tls initialization section
++ * might be the subject for relocations.
++ */
++ dbg("initializing initial thread local storage");
++ allocate_initial_tls(obj_list);
++
+ dbg("initializing key program variables");
+ set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : "");
+ set_program_var("environ", env);
diff --git a/sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild b/sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild
new file mode 100644
index 000000000000..d5c40f794d05
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/freebsd-libexec-8.2-r1.ebuild,v 1.1 2012/03/08 11:02:04 naota Exp $
+
+EAPI=2
+
+inherit bsdmk freebsd pam
+
+DESCRIPTION="FreeBSD libexec things"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+SRC_URI="mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+RDEPEND="${RDEPEND}
+ xinetd? ( sys-apps/xinetd )"
+
+S="${WORKDIR}/libexec"
+
+PATCHES=( "${FILESDIR}/${PN}-7.2-pic.patch"
+ "${FILESDIR}/${PN}-8.2-rtld.patch" )
+# Remove sendmail, tcp_wrapper and other useless stuff
+REMOVE_SUBDIRS="smrsh mail.local tcpd telnetd rshd rlogind lukemftpd ftpd"
+
+IUSE="pam ssl kerberos ipv6 nis xinetd"
+
+pkg_setup() {
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS_SUPPORT= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use pam || mymakeopts="${mymakeopts} WITHOUT_PAM_SUPPORT= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+
+ mymakeopts="${mymakeopts} WITHOUT_SENDMAIL= WITHOUT_PF= WITHOUT_RCMDS= "
+}
+
+src_prepare() {
+ ln -s /usr/include "${WORKDIR}/include"
+}
+
+src_install() {
+ freebsd_src_install
+
+ insinto /etc
+ doins "${WORKDIR}/etc/gettytab"
+ newinitd "${FILESDIR}/bootpd.initd" bootpd
+ newconfd "${FILESDIR}/bootpd.confd" bootpd
+
+ if use xinetd; then
+ for rpcd in rstatd rusersd walld rquotad sprayd; do
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${rpcd}.xinetd" ${rpcd}
+ done
+ fi
+}