summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-09-12 00:04:35 +0000
committerRoy Marples <uberlord@gentoo.org>2007-09-12 00:04:35 +0000
commit03d9251b9ddac6f2d2012949890e8605f80a6b38 (patch)
treeb17ad91f72acb8086528cbc0d8e282236305f837 /sys-freebsd
parentmasked x11-wm/ion2 (diff)
downloadhistorical-03d9251b9ddac6f2d2012949890e8605f80a6b38.tar.gz
historical-03d9251b9ddac6f2d2012949890e8605f80a6b38.tar.bz2
historical-03d9251b9ddac6f2d2012949890e8605f80a6b38.zip
Backport dl_iterate_phdr from FreeBSD-7 so that future gcc's dont pull in libgcc_s.so.1
Package-Manager: portage-2.1.3.7
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/freebsd-sources/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-sources/Manifest19
-rw-r--r--sys-freebsd/freebsd-sources/files/digest-freebsd-sources-6.2-r33
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-dl_iterate_phdr.patch55
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-6.2-r3.ebuild92
5 files changed, 174 insertions, 5 deletions
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog
index d14201eb905a..8af8d97081b3 100644
--- a/sys-freebsd/freebsd-sources/ChangeLog
+++ b/sys-freebsd/freebsd-sources/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-freebsd/freebsd-sources
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.38 2007/07/03 11:08:00 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.39 2007/09/12 00:04:35 uberlord Exp $
+
+*freebsd-sources-6.2-r3 (12 Sep 2007)
+
+ 12 Sep 2007; Roy Marples <uberlord@gentoo.org>
+ +files/freebsd-sources-6.2-dl_iterate_phdr.patch,
+ +freebsd-sources-6.2-r3.ebuild:
+ Backport dl_iterate_phdr from FreeBSD-7 so that future gcc's don't pull in
+ libgcc_s.so.1
*freebsd-sources-6.2-r2 (03 Jul 2007)
diff --git a/sys-freebsd/freebsd-sources/Manifest b/sys-freebsd/freebsd-sources/Manifest
index d2c9dfd63fff..abebbba209ec 100644
--- a/sys-freebsd/freebsd-sources/Manifest
+++ b/sys-freebsd/freebsd-sources/Manifest
@@ -22,6 +22,10 @@ AUX freebsd-sources-6.2-debug-O2.patch 815 RMD160 ae2c83117b81b47589e7ee35096c94
MD5 f2c9bb12b453528f9337ac5cfa8918ea files/freebsd-sources-6.2-debug-O2.patch 815
RMD160 ae2c83117b81b47589e7ee35096c94cc8eceb29b files/freebsd-sources-6.2-debug-O2.patch 815
SHA256 92a5070fbb6e951417bf83065c9f8ba11d3f5f2b17bc340f1c3080d54af52177 files/freebsd-sources-6.2-debug-O2.patch 815
+AUX freebsd-sources-6.2-dl_iterate_phdr.patch 1508 RMD160 b177f38755288c19a07bcf962e0fccd962c3a16c SHA1 7be2021de659a6d003eab9fdf2962d2e0ddcc7c5 SHA256 dad9ee18ab8fca2cef72f326231113f5ac5465127f6e6e046c715aed15fc715e
+MD5 4bfaea0267a5eb407f93513da9f22828 files/freebsd-sources-6.2-dl_iterate_phdr.patch 1508
+RMD160 b177f38755288c19a07bcf962e0fccd962c3a16c files/freebsd-sources-6.2-dl_iterate_phdr.patch 1508
+SHA256 dad9ee18ab8fca2cef72f326231113f5ac5465127f6e6e046c715aed15fc715e files/freebsd-sources-6.2-dl_iterate_phdr.patch 1508
AUX freebsd-sources-6.2-gcc41.patch 16887 RMD160 8ca5a1a76db802ca3e833ad15796bdf337002cb1 SHA1 5d4cec24352e20200028a98700008e8388999b3e SHA256 b28f57d0c73cf31bcac6c8424b0bc9fb24b5652f11a3e85d8a4a40b376976fab
MD5 0cf6f8a9595b6beefafbdb0fa3e745c2 files/freebsd-sources-6.2-gcc41.patch 16887
RMD160 8ca5a1a76db802ca3e833ad15796bdf337002cb1 files/freebsd-sources-6.2-gcc41.patch 16887
@@ -51,14 +55,18 @@ EBUILD freebsd-sources-6.2-r2.ebuild 2961 RMD160 ca90f67bdbb0e8dd63c40e5a278e028
MD5 c350fbeb34446956c6c6639f2789699c freebsd-sources-6.2-r2.ebuild 2961
RMD160 ca90f67bdbb0e8dd63c40e5a278e028ef674da06 freebsd-sources-6.2-r2.ebuild 2961
SHA256 cb23463204bb29f3a8282ef9afbb274c453a191f7d475aceee0dee6be64bb59e freebsd-sources-6.2-r2.ebuild 2961
+EBUILD freebsd-sources-6.2-r3.ebuild 3015 RMD160 841e9c90c643e06b8005972bf9185a1ce033e97f SHA1 227fe7b51ad94ccda87f8f44ea41779334c78643 SHA256 c8bce6fe3f992c95c7c5b0843ae5af3680ec8ee8e30ae68da41d7891f2f89781
+MD5 21bd5fe52b8ca16b6aeee6519dcec9ec freebsd-sources-6.2-r3.ebuild 3015
+RMD160 841e9c90c643e06b8005972bf9185a1ce033e97f freebsd-sources-6.2-r3.ebuild 3015
+SHA256 c8bce6fe3f992c95c7c5b0843ae5af3680ec8ee8e30ae68da41d7891f2f89781 freebsd-sources-6.2-r3.ebuild 3015
EBUILD freebsd-sources-6.2.ebuild 2746 RMD160 0ca4ceb5773bc3e2cb01fe7679aee482c194b5dc SHA1 23609b30548648578b9d3d06de8bb6dffc032a72 SHA256 8edd769332a9532e3573725d9f721966c6653c4f213b6a0379df1383445a55bc
MD5 ebc9c9463e0c1581c0959f2482f9673a freebsd-sources-6.2.ebuild 2746
RMD160 0ca4ceb5773bc3e2cb01fe7679aee482c194b5dc freebsd-sources-6.2.ebuild 2746
SHA256 8edd769332a9532e3573725d9f721966c6653c4f213b6a0379df1383445a55bc freebsd-sources-6.2.ebuild 2746
-MISC ChangeLog 10830 RMD160 aab3a5d7f88b861b149c03481352427b157b596b SHA1 c1a5c654966d37c9516f349ed0d3a60a32991d6b SHA256 1f88a98426ff7b00d079a5e2e741aac03abc4c0ee107be966d38e4d6e35e8ade
-MD5 3b208123ec5a5322fb830926ec0c72ee ChangeLog 10830
-RMD160 aab3a5d7f88b861b149c03481352427b157b596b ChangeLog 10830
-SHA256 1f88a98426ff7b00d079a5e2e741aac03abc4c0ee107be966d38e4d6e35e8ade ChangeLog 10830
+MISC ChangeLog 11098 RMD160 0b1aac8a092224edc250540ceab544cb146c80d0 SHA1 7f8edead2dedc69f80bafb817e75c4a6d8de1132 SHA256 c262e7d504f849b0e55d72fd4a648624cde3e38a64fc824b2603fc3ee2796c50
+MD5 575d379cfbfc6d6094728073edb8d99a ChangeLog 11098
+RMD160 0b1aac8a092224edc250540ceab544cb146c80d0 ChangeLog 11098
+SHA256 c262e7d504f849b0e55d72fd4a648624cde3e38a64fc824b2603fc3ee2796c50 ChangeLog 11098
MISC metadata.xml 156 RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 SHA1 d9d9d4f2b5afc58339ea3e562fca490156935f1f SHA256 30ab515d6ac492d3d6c36ac3c675511742c2149e56a6b3228c8d22ab8edb3ff7
MD5 2bd48a5ae413433cbb36110b219ce97c metadata.xml 156
RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 metadata.xml 156
@@ -72,3 +80,6 @@ SHA256 69e6dc9f0eb26473d50a9e4ecece2a92c4177e8491dc8d5722772e3e23f9c922 files/di
MD5 44a5c3d9ab8211e3d27c2a0bd4b23e5d files/digest-freebsd-sources-6.2-r2 256
RMD160 b7c0e2d559e11b94402d2a752c3cbda7f782824b files/digest-freebsd-sources-6.2-r2 256
SHA256 69e6dc9f0eb26473d50a9e4ecece2a92c4177e8491dc8d5722772e3e23f9c922 files/digest-freebsd-sources-6.2-r2 256
+MD5 44a5c3d9ab8211e3d27c2a0bd4b23e5d files/digest-freebsd-sources-6.2-r3 256
+RMD160 b7c0e2d559e11b94402d2a752c3cbda7f782824b files/digest-freebsd-sources-6.2-r3 256
+SHA256 69e6dc9f0eb26473d50a9e4ecece2a92c4177e8491dc8d5722772e3e23f9c922 files/digest-freebsd-sources-6.2-r3 256
diff --git a/sys-freebsd/freebsd-sources/files/digest-freebsd-sources-6.2-r3 b/sys-freebsd/freebsd-sources/files/digest-freebsd-sources-6.2-r3
new file mode 100644
index 000000000000..f15ec910fc83
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/digest-freebsd-sources-6.2-r3
@@ -0,0 +1,3 @@
+MD5 79c16213744e76d3bf13a9ac21ede56d freebsd-sys-6.2.tar.bz2 18344936
+RMD160 784230e22ccaf09933ef3f053ff29cc3e579786a freebsd-sys-6.2.tar.bz2 18344936
+SHA256 a754371d88601aaab7152bb3d127bd3777db912e13a26a866e13ba34934c5e5b freebsd-sys-6.2.tar.bz2 18344936
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-dl_iterate_phdr.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-dl_iterate_phdr.patch
new file mode 100644
index 000000000000..791da2190a1d
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-dl_iterate_phdr.patch
@@ -0,0 +1,55 @@
+Backport dl_iterate_phdr from FreeBSD-7 so that we can use gcc-4
+and not pull in libgcc_s.so.1 into every binary we build.
+
+--- sys/link_elf.h 2005/01/07 02:29:23 1.26
++++ sys/link_elf.h 2007/04/03 18:33:41 1.27
+@@ -41,7 +41,7 @@
+ #ifndef _SYS_LINK_ELF_H_
+ #define _SYS_LINK_ELF_H_
+
+-#include <sys/types.h>
++#include <sys/elf.h>
+
+ /*
+ * Flags that describe the origin of the entries in Dl_serinfo.
+@@ -75,5 +75,28 @@ struct r_debug {
+ RT_DELETE /* removing a shared library */
+ } r_state;
+ };
++
++/* Add a define so that libexec and lib can optionally use this */
++#define _GENTOO_DL_ITERATE_PHDR
++
++struct dl_phdr_info
++{
++ Elf_Addr dlpi_addr; /* module relocation base */
++ const char *dlpi_name; /* module name */
++ const Elf_Phdr *dlpi_phdr; /* pointer to module's phdr */
++ Elf_Half dlpi_phnum; /* number of entries in phdr */
++ unsigned long long int dlpi_adds; /* total # of loads */
++ unsigned long long int dlpi_subs; /* total # of unloads */
++ size_t dlpi_tls_modid;
++ void *dlpi_tls_data;
++};
++
++__BEGIN_DECLS
++
++typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t,
++ void *);
++extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *);
++
++__END_DECLS
+
+ #endif /* _SYS_LINK_ELF_H_ */
+--- sys/elf.h 2007-09-10 14:22:42 +0100
++++ sys/elf.h 2007-09-10 14:25:12 +0100
+@@ -0,0 +1,9 @@
++#ifndef _SYS_ELF_H_
++#define _SYS_ELF_H_
++
++#include <sys/types.h>
++#include <machine/elf.h>
++#include <sys/elf32.h>
++#include <sys/elf64.h>
++
++#endif /* !_SYS_ELF_H_ */
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r3.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r3.ebuild
new file mode 100644
index 000000000000..b0697f74fcfa
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-6.2-r3.ebuild,v 1.1 2007/09/12 00:04:35 uberlord Exp $
+
+inherit bsdmk freebsd flag-o-matic
+
+DESCRIPTION="FreeBSD kernel sources"
+SLOT="${PVR}"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="symlink"
+
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
+
+RDEPEND=">=sys-freebsd/freebsd-mk-defs-6.0-r1"
+DEPEND=""
+
+RESTRICT="strip binchecks"
+
+S="${WORKDIR}/sys"
+
+MY_PVR="${PVR}"
+
+[[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # This replaces the gentoover patch, it doesn't need reapply every time.
+ sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
+ -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
+ -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
+ "${S}/conf/newvers.sh"
+
+ epatch "${FILESDIR}/${PN}-gentoo.patch"
+ epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+ epatch "${FILESDIR}/${PN}-6.0-asm.patch"
+ epatch "${FILESDIR}/${PN}-6.0-werror.patch"
+ epatch "${FILESDIR}/${PN}-6.2-gcc41.patch"
+ epatch "${FILESDIR}/${PN}-6.2-sparc64.patch"
+ epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
+ epatch "${FILESDIR}/${PN}-6.2-debug-O2.patch"
+ epatch "${FILESDIR}/${PN}-6.2-dl_iterate_phdr.patch"
+
+ # Errata patches
+ epatch "${FILESDIR}/${P}-EN-07:02.net.patch"
+ epatch "${FILESDIR}/${P}-unp_gc.patch"
+
+ # http://security.freebsd.org/advisories/FreeBSD-SA-07:03.ipv6.asc
+ epatch "${FILESDIR}/${P}-ipv6.patch"
+
+ # Disable SSP for the kernel
+ grep -Zlr -- -ffreestanding "${S}" | xargs -0 sed -i -e \
+ "s:-ffreestanding:-ffreestanding $(test-flags -fno-stack-protector -fno-stack-protector-all):g"
+}
+
+src_compile() {
+ einfo "Nothing to compile.."
+}
+
+src_install() {
+ insinto "/usr/src/sys-${MY_PVR}"
+ doins -r "${S}/"*
+}
+
+pkg_postinst() {
+ if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
+ einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ # just in case...
+ [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ elif use symlink; then
+ einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
+ rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't remove previous symlinks, please fix manually."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ fi
+
+ if use sparc-fbsd ; then
+ ewarn "WARNING: kldload currently causes kernel panics"
+ ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
+ ewarn "we need gcc-4.1 to compile the kernel correctly :/"
+ ewarn "Please compile all modules you need into the kernel"
+ fi
+}