summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--profiles/package.mask5
-rw-r--r--profiles/package.mask.d/glibc4
-rw-r--r--sys-libs/glibc/Manifest15
-rw-r--r--sys-libs/glibc/files/2.11/glibc-2.11-deadlock-free.patch49
-rw-r--r--sys-libs/glibc/files/2.11/glibc-2.11-hardened-pie.patch40
-rw-r--r--sys-libs/glibc/files/eblits/CVS/Entries10
-rw-r--r--sys-libs/glibc/files/eblits/CVS/Repository1
-rw-r--r--sys-libs/glibc/files/eblits/CVS/Root1
-rw-r--r--sys-libs/glibc/files/eblits/common.eblit288
-rw-r--r--sys-libs/glibc/files/eblits/pkg_postinst.eblit29
-rw-r--r--sys-libs/glibc/files/eblits/pkg_preinst.eblit80
-rw-r--r--sys-libs/glibc/files/eblits/pkg_setup.eblit67
-rw-r--r--sys-libs/glibc/files/eblits/src_compile.eblit208
-rw-r--r--sys-libs/glibc/files/eblits/src_install-2.6.eblit250
-rw-r--r--sys-libs/glibc/files/eblits/src_install.eblit249
-rw-r--r--sys-libs/glibc/files/eblits/src_test.eblit42
-rw-r--r--sys-libs/glibc/files/eblits/src_unpack.eblit170
-rw-r--r--sys-libs/glibc/glibc-2.11-r1.ebuild243
-rw-r--r--sys-libs/glibc/metadata.xml22
19 files changed, 0 insertions, 1773 deletions
diff --git a/profiles/package.mask b/profiles/package.mask
index fc5578c128a..d683d99780c 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -5,11 +5,6 @@
# Name changed to plasma-applet-daisy.
kde-misc/daisy
-# Adding a masked glibc in overlay, which solves crashes for KDE development versions. Also see:
-# http://www.purinchu.net/wp/2009/11/16/malloc_check_-crashes/
-# Gentoo bug 293527 upstream (glibc) bug 10282
-=sys-libs/glibc-2.11-r1
-
# Autogenerated by regenerate-files, DO NOT EDIT.
# You can use this file to mask/unmask KDE 4.4 release.
# Edit Documentation/package.unmask/kde-4.4.d/ files instead.
diff --git a/profiles/package.mask.d/glibc b/profiles/package.mask.d/glibc
deleted file mode 100644
index f94c00a4cc1..00000000000
--- a/profiles/package.mask.d/glibc
+++ /dev/null
@@ -1,4 +0,0 @@
-# Adding a masked glibc in overlay, which solves crashes for KDE development versions. Also see:
-# http://www.purinchu.net/wp/2009/11/16/malloc_check_-crashes/
-# Gentoo bug 293527 upstream (glibc) bug 10282
-=sys-libs/glibc-2.11-r1
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
deleted file mode 100644
index 80f719d3997..00000000000
--- a/sys-libs/glibc/Manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-AUX 2.11/glibc-2.11-deadlock-free.patch 1195 RMD160 8cb2b66dd664e7d7d06800ae93a0b0baec690a78 SHA1 841373c0ee6c2bfba7dbd66ee2cf1c85931562f1 SHA256 f366155ba7d7864e9127b2f22062df7dce3a90b9a6d99d2f6b06bae53e3cbedb
-AUX 2.11/glibc-2.11-hardened-pie.patch 1492 RMD160 dacf988364e3eeeaa2bd588420a19db373347678 SHA1 f44b4389d031bc618c83a2f196c4e2afa647a68a SHA256 74277f76ace9cb6b408ef7c1d43a3604ae0d6c1af539055aeaeb542d2bfa2a46
-AUX eblits/common.eblit 8751 RMD160 7e0b5242366606725ef06e0a496638cafcdac676 SHA1 aa5976529ac4a22d8924fada9fc6e50f2792902f SHA256 f32fd4017acca5f0d9aca12025ee105822030058702507b740212e8434ee36b7
-AUX eblits/pkg_postinst.eblit 1159 RMD160 4b99846819bf0471d1104a8a17dd260796644f9d SHA1 4a2980fede3edebc7960d40db7cf935c7c854859 SHA256 76c403cf5c77a3a3bb7441566335f0c8da2584eaa21f05ab400e7bb00f9db810
-AUX eblits/pkg_preinst.eblit 3285 RMD160 990d7ee7cfa1ba79a19bc6c01c05817ebfc0ee96 SHA1 3ee2fe58fa7ca246311cf5ef23fa1ccbe509cf49 SHA256 8bc7dea37213048787ce0bec61e9abe8adabb547b5385024bf2549d0a036239c
-AUX eblits/pkg_setup.eblit 2814 RMD160 8352c4b9cc460b7193e17be8bca227db5b6df5ba SHA1 8de7ea78e364521b55574b16036d57e7d35a596f SHA256 b803723f75571649e10e0707a6dbe8b459eabdc149ef155558792db736faa201
-AUX eblits/src_compile.eblit 5843 RMD160 2fffbc9b3cd5a5b5c21de778ea2614927fcbf54d SHA1 79e80f2ebb3e5739941a7a3e85b5e5f46240211a SHA256 f6e19e703a0849c0a14e941c92991f50516938ca7b6bd6fe74bdf1c9a96ec4c5
-AUX eblits/src_install-2.6.eblit 7946 RMD160 6cc258a316b78212777ab328a3c0cb73de1616d4 SHA1 94895689b56fd712156e8ac84a2a639d8475da03 SHA256 54081c34217c230d0ff43c5df378897a37576e727fe41ee4d681767110667f3e
-AUX eblits/src_install.eblit 7994 RMD160 0f3fc3715f589ae485f730686acb69a11d31960a SHA1 51db782428290a5a641a48038e6436dd50efca5e SHA256 61ddbb1cf22f79662235a67c29c704059a6dbfaf6f501b6b12c3895c2593747b
-AUX eblits/src_test.eblit 1162 RMD160 349db09c5f2c2e412a108b8c5371adf946e1a3f0 SHA1 357ef650e1dce62d5d688133426bc62b9085009d SHA256 bac1db2da478f6e6709275c36cc1f9a98fac7fcc2e80bd8831f2077207754962
-AUX eblits/src_unpack.eblit 5148 RMD160 59fe45ab19ab005b9ad1fe1d5fcfa41cf3f3fdde SHA1 c8b0099903b1bc861bab0b9bf43cda2e4b5148e2 SHA256 28d475d0154ee2eb54eda4c0711accccbae80ce3c537470d076006734705e7dd
-DIST glibc-2.11-patches-3.tar.bz2 83308 RMD160 e4e32c4e83a4fd14ecf9180d1669d171284d4988 SHA1 a79078569efb7f0d130759025c590aad2df9e877 SHA256 cb4055c76e820934927138b2a21d4c3f3afdeadc219f377bbe95bedaacd6feb7
-DIST glibc-2.11.tar.bz2 15684114 RMD160 817ed8febe8876602d6fe37983505908046d0925 SHA1 f89c0651ca25423523c872a27b0ccf70f5670b6e SHA256 9ef10e498fac4acc458029898fd8fa76c3cedee1f63d23fedf0c579c505ed62c
-EBUILD glibc-2.11-r1.ebuild 8300 RMD160 b129721e15b3a4aa9d5163ad9d9c0db699b42de2 SHA1 da08beee71d7e8957342d32dfff6fe3ed56b970c SHA256 4d6c3603980cad00de42edb603887cbfeba751e6f526e951cc867660f4a22ac1
-MISC metadata.xml 1112 RMD160 1aa9770356149948593ebe35a1bd3940dd72fca2 SHA1 40514cc45c26bab671d78aa1567441bf72b0c6cc SHA256 4acea698dc4f66c17f4f3f81b28cd6b32f5425fd49f380df4a016489f786b1f5
diff --git a/sys-libs/glibc/files/2.11/glibc-2.11-deadlock-free.patch b/sys-libs/glibc/files/2.11/glibc-2.11-deadlock-free.patch
deleted file mode 100644
index b2745df99f7..00000000000
--- a/sys-libs/glibc/files/2.11/glibc-2.11-deadlock-free.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-2009-06-15 Petr Baudis <pasky@suse.cz>
-
- * malloc/hooks.c (free_check): Do not invoke mem2chunk_check()
- without main_arena mutex held.
-
-diff --git a/malloc/hooks.c b/malloc/hooks.c
-index 622a815..47d3c85 100644
---- a/malloc/hooks.c
-+++ b/malloc/hooks.c
-@@ -276,25 +276,33 @@ free_check(mem, caller) Void_t* mem; const Void_t *caller;
- mchunkptr p;
-
- if(!mem) return;
-+#ifndef ATOMIC_FASTBINS
-+ (void)mutex_lock(&main_arena.mutex);
-+#endif
- p = mem2chunk_check(mem, NULL);
- if(!p) {
-+#ifndef ATOMIC_FASTBINS
-+ (void)mutex_unlock(&main_arena.mutex);
-+#endif
- malloc_printerr(check_action, "free(): invalid pointer", mem);
- return;
- }
- #if HAVE_MMAP
- if (chunk_is_mmapped(p)) {
- munmap_chunk(p);
-- return;
-- }
-+ } else
- #endif
-+ {
- #if 0 /* Erase freed memory. */
-- memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
-+ memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
- #endif
- #ifdef ATOMIC_FASTBINS
-- _int_free(&main_arena, p, 0);
-+ _int_free(&main_arena, p, 0);
- #else
-- (void)mutex_lock(&main_arena.mutex);
-- _int_free(&main_arena, p);
-+ _int_free(&main_arena, p);
-+#endif
-+ }
-+#ifndef ATOMIC_FASTBINS
- (void)mutex_unlock(&main_arena.mutex);
- #endif
- }
diff --git a/sys-libs/glibc/files/2.11/glibc-2.11-hardened-pie.patch b/sys-libs/glibc/files/2.11/glibc-2.11-hardened-pie.patch
deleted file mode 100644
index df7292f4153..00000000000
--- a/sys-libs/glibc/files/2.11/glibc-2.11-hardened-pie.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-http://bugs.gentoo.org/292139
-
-2009-11-08 Magnus Granberg <zorry@ume.nu>
-
- * Makeconfig (+link): Set to +link-pie.
- (+link-static): Change $(static-start-installed-name) to
- S$(static-start-installed-name).
- (+prector): Set to +prectorS.
- (+postctor): Set to +postctorS.
-
---- libc/Makeconfig
-+++ libc/Makeconfig
-@@ -447,11 +447,12 @@
- $(common-objpfx)libc% $(+postinit),$^) \
- $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit)
- endif
-++link = $(+link-pie)
- # Command for statically linking programs with the C library.
- ifndef +link-static
- +link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
- $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
-- $(addprefix $(csu-objpfx),$(static-start-installed-name)) \
-+ $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \
- $(+preinit) $(+prector) \
- $(filter-out $(addprefix $(csu-objpfx),start.o \
- $(start-installed-name))\
-@@ -549,11 +550,10 @@
- ifeq ($(elf),yes)
- +preinit = $(addprefix $(csu-objpfx),crti.o)
- +postinit = $(addprefix $(csu-objpfx),crtn.o)
--+prector = `$(CC) --print-file-name=crtbegin.o`
--+postctor = `$(CC) --print-file-name=crtend.o`
--# Variants of the two previous definitions for linking PIE programs.
- +prectorS = `$(CC) --print-file-name=crtbeginS.o`
- +postctorS = `$(CC) --print-file-name=crtendS.o`
-++prector = $(+prectorS)
-++postctor = $(+postctorS)
- +interp = $(addprefix $(elf-objpfx),interp.os)
- endif
- csu-objpfx = $(common-objpfx)csu/
diff --git a/sys-libs/glibc/files/eblits/CVS/Entries b/sys-libs/glibc/files/eblits/CVS/Entries
deleted file mode 100644
index d2cccae7828..00000000000
--- a/sys-libs/glibc/files/eblits/CVS/Entries
+++ /dev/null
@@ -1,10 +0,0 @@
-/common.eblit/1.9/Wed Jan 28 18:11:41 2009//
-/pkg_postinst.eblit/1.1/Sun Mar 1 21:06:22 2009//
-/pkg_preinst.eblit/1.1/Sun Mar 1 21:06:22 2009//
-/pkg_setup.eblit/1.4/Fri Aug 21 05:46:04 2009//
-/src_compile.eblit/1.10/Fri Nov 6 00:33:03 2009//
-/src_install-2.6.eblit/1.2/Sun Jun 29 16:39:23 2008//
-/src_install.eblit/1.8/Fri Sep 18 15:15:07 2009//
-/src_test.eblit/1.3/Sun Mar 23 18:06:18 2008//
-/src_unpack.eblit/1.9/Mon Nov 9 22:16:13 2009//
-D
diff --git a/sys-libs/glibc/files/eblits/CVS/Repository b/sys-libs/glibc/files/eblits/CVS/Repository
deleted file mode 100644
index c5105452cbe..00000000000
--- a/sys-libs/glibc/files/eblits/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-gentoo-x86/sys-libs/glibc/files/eblits
diff --git a/sys-libs/glibc/files/eblits/CVS/Root b/sys-libs/glibc/files/eblits/CVS/Root
deleted file mode 100644
index 38409391daf..00000000000
--- a/sys-libs/glibc/files/eblits/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:tampakrap@cvs.gentoo.org:/var/cvsroot
diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit
deleted file mode 100644
index 6160c0fed55..00000000000
--- a/sys-libs/glibc/files/eblits/common.eblit
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.9 2009/01/28 18:11:41 vapier Exp $
-
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- fi
- ;;
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
-
- # -march needed for #185404
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then
- filter-flags '-march=*'
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- fi
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- GLIBCMAJOR=$(get_version_component_range 1 ${PV})
- GLIBCMINOR=$(get_version_component_range 2 ${PV})
-
- # set CTARGET_OPT so glibc can use cpu-specific .S files for better performance
- # - UltraSPARC T1 (niagara) support requires >= glibc 2.8
- # - UltraSPARC T2 (niagara2) support requires >= glibc 2.7
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
- CTARGET_OPT="sparc64v2-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
- CTARGET_OPT="sparc64v-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
- CTARGET_OPT="sparcv9v-unknown-linux-gnu"
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
- CTARGET_OPT="sparcv9v-unknown-linux-gnu"
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-
- # Cant build glibc itself with fortify code
- append-cppflags -U_FORTIFY_SOURCE
-
- # building glibc with SSP is fraught with difficulty, especially
- # due to __stack_chk_fail_local which would mean significant changes
- # to the glibc build process. See bug #94325
- filter-flags -fstack-protector
-
- if use hardened && gcc-specs-pie ; then
- # Force PIC macro definition for all compilations since they're all
- # either -fPIC or -fPIE with the default-PIE compiler.
- append-cppflags -DPIC
- else
- # Don't build -fPIE without the default-PIE compiler and the
- # hardened-pie patch
- filter-flags -fPIE
- fi
-}
-
-want_nptl() {
- [[ -z ${LT_VER} ]] && return 0
- want_tls || return 1
- use nptl || return 1
-
- # Only list the arches that cannot do NPTL
- case $(tc-arch) in
- m68k) return 1;;
- sparc)
- # >= v9 is needed for nptl.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
- ;;
- esac
-
- return 0
-}
-
-want_linuxthreads() {
- [[ -z ${LT_VER} ]] && return 1
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
-
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
diff --git a/sys-libs/glibc/files/eblits/pkg_postinst.eblit b/sys-libs/glibc/files/eblits/pkg_postinst.eblit
deleted file mode 100644
index 2566eed3552..00000000000
--- a/sys-libs/glibc/files/eblits/pkg_postinst.eblit
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $
-
-eblit-glibc-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ... if in a chroot or a diff init package, ignore
- # errors from this step #253697
- /sbin/telinit U 2>/dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}etc/locale.gen"
- if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
- ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
- locale_list="${ROOT}usr/share/i18n/SUPPORTED"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-}
diff --git a/sys-libs/glibc/files/eblits/pkg_preinst.eblit b/sys-libs/glibc/files/eblits/pkg_preinst.eblit
deleted file mode 100644
index dcc5d9b12e3..00000000000
--- a/sys-libs/glibc/files/eblits/pkg_preinst.eblit
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-eblit-glibc-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- [[ -d ${D}/$(get_libdir) ]] || return 0
- cd / #228809
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
diff --git a/sys-libs/glibc/files/eblits/pkg_setup.eblit b/sys-libs/glibc/files/eblits/pkg_setup.eblit
deleted file mode 100644
index 04445a5ab5b..00000000000
--- a/sys-libs/glibc/files/eblits/pkg_setup.eblit
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.4 2009/08/21 05:46:04 vapier Exp $
-
-eblit-glibc-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
-
- # Check for broken kernels #262698
- cd "${T}"
- printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c
- emake kern-clo-test || die
- if ! ./kern-clo-test ; then
- eerror "Your patched vendor kernel is broken. You need to get an"
- eerror "update from whoever is providing the kernel to you."
- eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227"
- die "keeping your system alive, say thank you"
- fi
-
- # Check for broken kernels #279260
- cd "${T}"
- printf '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' > kern-enosys-test.c
- emake kern-enosys-test || die
- if ! ./kern-enosys-test ; then
- eerror "Your old kernel is broken. You need to update it to"
- eerror "a newer version as syscall(<bignum>) will break."
- eerror "http://bugs.gentoo.org/279260"
- die "keeping your system alive, say thank you"
- fi
- fi
-
- # users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${ROOT}/etc/locales.build."
- eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
- die "lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if [[ -n ${LT_VER} ]] ; then
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-}
diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit b/sys-libs/glibc/files/eblits/src_compile.eblit
deleted file mode 100644
index 2dbc3fa0005..00000000000
--- a/sys-libs/glibc/files/eblits/src_compile.eblit
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.10 2009/11/06 00:33:03 vapier Exp $
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- [[ -d ports ]] && ADDONS="${ADDONS},ports"
- popd > /dev/null
-
- use nls || myconf="${myconf} --disable-nls"
- myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
- myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
- fi
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [[ $1 == "linuxthreads" ]] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if ! want__thread || use glibc-compat20 || [[ ${LT_KER_VER} == 2.[02].* ]] ; then
- myconf="${myconf} --without-__thread"
- else
- myconf="${myconf} --with-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --disable-sanity-checks"
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KER_VER}"
- elif [[ $1 == "nptl" ]] ; then
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERN_VER}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- --libdir=/usr/$(get_libdir)
- --mandir=/usr/share/man
- --infodir=/usr/share/info
- --libexecdir=/usr/$(get_libdir)/misc/glibc
- ${EXTRA_ECONF}"
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_slibdir=/$(get_libdir)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-
- # since we'll be punting them for cross-compilers, and they can cause
- # problems (ia64+static), we'll just skip building altogether
- is_crosscompile && sed -i '1ibuild-programs = no' config.make
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # if we don't have a compiler yet, we cant really test it now ...
- # hopefully they don't affect header geneation, so let's hope for
- # the best here ...
- export \
- libc_cv_386_tls=yes \
- libc_cv_asm_cfi_directives=yes \
- libc_cv_broken_visibility_attribute=no \
- libc_cv_gcc___thread=yes \
- libc_cv_mlong_double_128=yes \
- libc_cv_mlong_double_128ibm=yes \
- libc_cv_ppc_machine=yes \
- libc_cv_visibility_attribute=yes \
- libc_cv_z_combreloc=yes \
- libc_cv_z_execstack=yes \
- libc_cv_z_initfirst=yes \
- libc_cv_z_nodelete=yes \
- libc_cv_z_nodlopen=yes \
- libc_cv_z_relro=yes
-
- # Pick out the correct location for build headers
- local ports="" myconf="--disable-sanity-checks --enable-hacker-mode"
- [[ -d ${S}/ports ]] && ports=",ports"
- myconf="${myconf}
- --enable-add-ons=nptl${ports}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- # Nothing is compiled here which would affect the headers for the target.
- # so forcing CC/CFLAGS is sane. unless you dont have `gcc`. then i
- # dont care :p.
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to