summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-03-31 02:02:55 +0000
committerMike Frysinger <vapier@gentoo.org>2005-03-31 02:02:55 +0000
commitdbd95b45d4da6f352dfa2e1ae1082e6a42054067 (patch)
treef50fb16884958beb93e783bd90c004573bcad39d /sys-libs
parentInitial import into the tree. Final closure of bug #87337. Thanks to exposu... (diff)
downloadgentoo-2-dbd95b45d4da6f352dfa2e1ae1082e6a42054067.tar.gz
gentoo-2-dbd95b45d4da6f352dfa2e1ae1082e6a42054067.tar.bz2
gentoo-2-dbd95b45d4da6f352dfa2e1ae1082e6a42054067.zip
old
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/uclibc/files/0.9.26-r8-cvs.patch40
-rw-r--r--sys-libs/uclibc/files/0.9.26/arm-ucontext.patch10
-rw-r--r--sys-libs/uclibc/files/0.9.26/ssp.c160
-rw-r--r--sys-libs/uclibc/files/0.9.26/uClibc-20040921-ldso-unsecvars.patch36
-rw-r--r--sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch23
-rw-r--r--sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ldso-cache.patch10
-rw-r--r--sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch47
-rw-r--r--sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch19
-rw-r--r--sys-libs/uclibc/files/0.9.26/unsecvars.h26
-rw-r--r--sys-libs/uclibc/files/digest-uclibc-0.9.26-r73
-rw-r--r--sys-libs/uclibc/files/digest-uclibc-0.9.26-r83
-rw-r--r--sys-libs/uclibc/uclibc-0.9.26-r7.ebuild265
-rw-r--r--sys-libs/uclibc/uclibc-0.9.26-r8.ebuild338
13 files changed, 0 insertions, 980 deletions
diff --git a/sys-libs/uclibc/files/0.9.26-r8-cvs.patch b/sys-libs/uclibc/files/0.9.26-r8-cvs.patch
deleted file mode 100644
index 9ef2375912f6..000000000000
--- a/sys-libs/uclibc/files/0.9.26-r8-cvs.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Fix building with linux26-headers.
-
-http://bugs.gentoo.org/show_bug.cgi?id=73583
-
-Index: include/features.h
-===================================================================
-RCS file: /var/cvs/uClibc/include/features.h,v
-retrieving revision 1.60
-retrieving revision 1.61
-diff -u -r1.60 -r1.61
---- include/features.h 27 Oct 2004 07:26:21 -0000 1.60
-+++ include/features.h 11 Jan 2005 17:02:22 -0000 1.61
-@@ -417,6 +417,9 @@
- #ifndef __LINUX_COMPILER_H
- #define __LINUX_COMPILER_H
- #endif
-+#ifndef __cast__
-+#define __cast__(_to)
-+#endif
-
- /* Arrange to hide uClibc internals */
- #if __GNUC_PREREQ (3, 3)
-Index: libc/sysdeps/linux/common/ssp.c
-===================================================================
-RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/ssp.c,v
-retrieving revision 1.5
-retrieving revision 1.6
-diff -u -r1.5 -r1.6
---- libc/sysdeps/linux/common/ssp.c 25 Nov 2004 19:10:39 -0000 1.5
-+++ libc/sysdeps/linux/common/ssp.c 11 Jan 2005 17:01:53 -0000 1.6
-@@ -29,7 +29,9 @@
- #include <sys/un.h>
- #include <sys/syslog.h>
- #include <sys/time.h>
-+#ifdef HAVE_DEV_ERANDOM
- #include <sys/sysctl.h>
-+#endif
-
- #ifdef __PROPOLICE_BLOCK_SEGV__
- #define SSP_SIGTYPE SIGSEGV
diff --git a/sys-libs/uclibc/files/0.9.26/arm-ucontext.patch b/sys-libs/uclibc/files/0.9.26/arm-ucontext.patch
deleted file mode 100644
index 78b8d4cc04e4..000000000000
--- a/sys-libs/uclibc/files/0.9.26/arm-ucontext.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libc/sysdeps/linux/arm/sys/ucontext.h.orig 2004-08-06 12:08:48.234295048 -0400
-+++ libc/sysdeps/linux/arm/sys/ucontext.h 2004-08-06 12:09:11.123815312 -0400
-@@ -24,6 +24,7 @@
- #include <features.h>
- #include <signal.h>
- #include <sys/procfs.h>
-+#include <bits/sigcontext.h>
-
- typedef int greg_t;
-
diff --git a/sys-libs/uclibc/files/0.9.26/ssp.c b/sys-libs/uclibc/files/0.9.26/ssp.c
deleted file mode 100644
index 0eac14f230fb..000000000000
--- a/sys-libs/uclibc/files/0.9.26/ssp.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/files/0.9.26/ssp.c,v 1.1 2005/01/12 03:51:45 vapier Exp $
- *
- * This is a modified version of Hiroaki Etoh's stack smashing routines
- * implemented for glibc.
- *
- * The following people have contributed input to this code.
- * Ned Ludd - <solar[@]gentoo.org>
- * Alexander Gabert - <pappy[@]gentoo.org>
- * The PaX Team - <pageexec[@]freemail.hu>
- * Peter S. Mazinger - <ps.m[@]gmx.net>
- * Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
- * Robert Connolly - <robert[@]linuxfromscratch.org>
- * Cory Visi <cory@visi.name>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/syslog.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#ifndef _PATH_LOG
-#define _PATH_LOG "/dev/log"
-#endif
-
-#ifdef __PROPOLICE_BLOCK_SEGV__
-#define SSP_SIGTYPE SIGSEGV
-#elif __PROPOLICE_BLOCK_KILL__
-#define SSP_SIGTYPE SIGKILL
-#else
-#define SSP_SIGTYPE SIGABRT
-#endif
-
-unsigned long __guard = 0UL;
-
-void
-__guard_setup (void)
-{
- size_t size;
-#ifdef HAVE_DEV_ERANDOM
- int mib[3];
-#endif
-
- if (__guard != 0UL)
- return;
-
-#ifndef __SSP_QUICK_CANARY__
-#ifdef HAVE_DEV_ERANDOM
- /* Random is another depth in Linux, hence an array of 3. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_RANDOM;
- mib[2] = RANDOM_ERANDOM;
-
- size = sizeof (unsigned long);
- if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
- if (__guard != 0UL)
- return;
-#endif
- /*
- * Attempt to open kernel pseudo random device if one exists before
- * opening urandom to avoid system entropy depletion.
- */
- {
- int fd;
-#ifdef HAVE_DEV_ERANDOM
- if ((fd = open ("/dev/erandom", O_RDONLY)) == (-1))
-#endif
- fd = open ("/dev/urandom", O_RDONLY);
- if (fd != (-1))
- {
- size = read (fd, (char *) &__guard, sizeof (__guard));
- close (fd);
- if (size == sizeof (__guard))
- return;
- }
- }
-#endif
-
- /* If sysctl was unsuccessful, use the "terminator canary". */
- __guard = 0xFF0A0D00UL;
-
- {
- /* Everything failed? Or we are using a weakened model of the
- * terminator canary */
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- __guard ^= tv.tv_usec ^ tv.tv_sec;
- }
-}
-
-void
-__stack_smash_handler (char func[], int damaged)
-{
- struct sockaddr_un sock; /* AF_UNIX address of local logger */
- struct sigaction sa;
- const char message[] = ": stack smashing attack in function ";
- int bufsz, len, log;
- char buf[512];
- extern char *__progname;
-
- sigset_t mask;
- sigfillset (&mask);
-
- sigdelset (&mask, SSP_SIGTYPE); /* Block all signal handlers */
- sigprocmask (SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-
- bufsz = sizeof (buf);
- strcpy (buf, "<2>");
- len = 3;
-
- strncat (buf, __progname, sizeof (buf) - 4);
- len = strlen (buf);
-
- if (bufsz > len)
- {
- strncat (buf, message, bufsz - len - 1);
- len = strlen (buf);
- }
- if (bufsz > len)
- {
- strncat (buf, func, bufsz - len - 1);
- len = strlen (buf);
- }
-
- /* print error message */
- write (STDERR_FILENO, buf + 3, len - 3);
- write (STDERR_FILENO, "()\n", 3);
- if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
- {
- /* Send "found" message to the "/dev/log" path */
- sock.sun_family = AF_UNIX;
- (void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
- sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
- sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
- }
-
- /* Make sure the default handler is associated with the our signal handler */
-
- memset (&sa, 0, sizeof (struct sigaction));
- sigfillset (&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
- sigaction (SSP_SIGTYPE, &sa, NULL);
- (void) kill (getpid (), SSP_SIGTYPE);
- _exit (127);
-}
diff --git a/sys-libs/uclibc/files/0.9.26/uClibc-20040921-ldso-unsecvars.patch b/sys-libs/uclibc/files/0.9.26/uClibc-20040921-ldso-unsecvars.patch
deleted file mode 100644
index 5e58588e7e80..000000000000
--- a/sys-libs/uclibc/files/0.9.26/uClibc-20040921-ldso-unsecvars.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- ldso/ldso/ldso.c 8 Sep 2004 09:43:24 -0000 1.121
-+++ ldso/ldso/ldso.c 21 Sep 2004 05:33:40 -0000
-@@ -31,6 +31,7 @@
-
-
- #include "ldso.h"
-+#include "unsecvars.h"
-
- #define ALLOW_ZERO_PLTGOT
-
-@@ -325,11 +326,21 @@ void _dl_get_ready_to_run(struct elf_res
- _dl_preload = _dl_getenv("LD_PRELOAD", envp);
- _dl_library_path = _dl_getenv("LD_LIBRARY_PATH", envp);
- } else {
-+ static const char unsecure_envvars[] =
-+#ifdef EXTRA_UNSECURE_ENVVARS
-+ EXTRA_UNSECURE_ENVVARS
-+#endif
-+ UNSECURE_ENVVARS;
-+ const char *nextp;
- _dl_secure = 1;
-- _dl_preload = _dl_getenv("LD_PRELOAD", envp);
-- _dl_unsetenv("LD_AOUT_PRELOAD", envp);
-- _dl_unsetenv("LD_LIBRARY_PATH", envp);
-- _dl_unsetenv("LD_AOUT_LIBRARY_PATH", envp);
-+
-+ nextp = unsecure_envvars;
-+ do {
-+ _dl_unsetenv (nextp, envp);
-+ /* We could use rawmemchr but this need not be fast. */
-+ nextp = (char *) _dl_strchr(nextp, '\0') + 1;
-+ } while (*nextp != '\0');
-+ _dl_preload = NULL;
- _dl_library_path = NULL;
- }
- }
diff --git a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch b/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch
deleted file mode 100644
index a1b50c0aa5aa..000000000000
--- a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: ldso/ldso/arm/dl-sysdep.h
-===================================================================
-RCS file: /var/cvs/uClibc/ldso/ldso/arm/dl-sysdep.h,v
-retrieving revision 1.9
-diff -u -b -B -w -p -r1.9 dl-sysdep.h
---- ldso/ldso/arm/dl-sysdep.h 17 Feb 2004 10:55:54 -0000 1.9
-+++ ldso/ldso/arm/dl-sysdep.h 23 Jun 2004 17:57:35 -0000
-@@ -5,6 +5,9 @@
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codpoet.org>
- */
-
-+#ifndef __DL_SYSDEP_H__
-+#define __DL_SYSDEP_H__
-+
- /* Define this if the system uses RELOCA. */
- #undef ELF_USES_RELOCA
-
-@@ -66,3 +69,5 @@ unsigned long _dl_linux_resolver(struct
- #define elf_machine_type_class(type) \
- ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
-+
-+#endif /* __DL_SYSDEP_H__ */
diff --git a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ldso-cache.patch b/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ldso-cache.patch
deleted file mode 100644
index 40867d15152b..000000000000
--- a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ldso-cache.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- ldso/ldso/dl-elf.c.orig 2004-08-09 19:01:02 +0000
-+++ ldso/ldso/dl-elf.c 2004-08-09 19:00:40 +0000
-@@ -329,6 +329,7 @@
- #endif
- for (i = 0; i < header->nlibs; i++) {
- if ((libent[i].flags == LIB_ELF ||
-+ libent[i].flags == LIB_ELF_LIBC0 ||
- libent[i].flags == LIB_ELF_LIBC5) &&
- _dl_strcmp(libname, strs + libent[i].sooffset) == 0 &&
- (tpnt1 = _dl_load_elf_shared_library(secure,
diff --git a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch b/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch
deleted file mode 100644
index 2b9b1ab1dc66..000000000000
--- a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-resolve-segfault.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- libc/inet/resolv.c.orig 2004-08-09 14:04:58 +0000
-+++ libc/inet/resolv.c 2004-08-09 14:07:09 +0000
-@@ -1846,6 +1846,7 @@
- {
- struct in_addr *in;
- struct in_addr **addr_list;
-+ char **alias;
- unsigned char *packet;
- struct resolv_answer a;
- int i;
-@@ -1899,17 +1900,27 @@
-
- addr_list[0] = in;
- addr_list[1] = 0;
--
-+
-+ if (buflen < sizeof(char *)*(ALIAS_DIM))
-+ return ERANGE;
-+ alias=(char **)buf;
-+ buf+=sizeof(char **)*(ALIAS_DIM);
-+ buflen-=sizeof(char **)*(ALIAS_DIM);
-+
- if (buflen<256)
- return ERANGE;
- strncpy(buf, name, buflen);
-
-+ alias[0] = buf;
-+ alias[1] = NULL;
-+
- /* First check if this is already an address */
- if (inet_aton(name, in)) {
- result_buf->h_name = buf;
- result_buf->h_addrtype = AF_INET;
- result_buf->h_length = sizeof(*in);
- result_buf->h_addr_list = (char **) addr_list;
-+ result_buf->h_aliases = alias;
- *result=result_buf;
- *h_errnop = NETDB_SUCCESS;
- return NETDB_SUCCESS;
-@@ -1954,6 +1965,7 @@
- result_buf->h_addrtype = AF_INET;
- result_buf->h_length = sizeof(*in);
- result_buf->h_addr_list = (char **) addr_list;
-+ result_buf->h_aliases = alias; /* TODO: generate the full list */
- free(packet);
- break;
- } else {
diff --git a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch b/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch
deleted file mode 100644
index b3619d079ece..000000000000
--- a/sys-libs/uclibc/files/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./libc/sysdeps/linux/common/ssp.c.old 2004-05-17 06:46:31.000000000 -0400
-+++ ./libc/sysdeps/linux/common/ssp.c 2004-05-17 07:46:42.264773000 -0400
-@@ -44,9 +44,15 @@
- #define SSP_SIGTYPE SIGABRT
- #endif
-
-+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-+#define __attribute_used__ __attribute__((__used__))
-+#else
-+#define __attribute_used__ __attribute__((__unused__))
-+#endif
-+
- unsigned long __guard = 0UL;
-
--void
-+__attribute_used__ void __attribute__ ((visibility ("default")))
- __guard_setup (void)
- {
- size_t size;
diff --git a/sys-libs/uclibc/files/0.9.26/unsecvars.h b/sys-libs/uclibc/files/0.9.26/unsecvars.h
deleted file mode 100644
index 5e060a6516dc..000000000000
--- a/sys-libs/uclibc/files/0.9.26/unsecvars.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Environment variable to be removed for SUID programs. The names are all
- * stuffed in a single string which means they have to be terminated with a
- * '\0' explicitly.
- */
-
-#define UNSECURE_ENVVARS \
- "LD_AOUT_PRELOAD\0" \
- "LD_AOUT_LIBRARY_PATH\0" \
- "LD_PRELOAD\0" \
- "LD_LIBRARY_PATH\0" \
- "LD_DEBUG\0" \
- "LD_DEBUG_OUTPUT\0" \
- "HOSTALIASES\0" \
- "LOCALDOMAIN\0" \
- "RES_OPTIONS\0" \
- "TMPDIR\0"
-
-/*
- * These environment variables are defined by glibc but ignored in
- * uClibc, but may very well have an equivalent in uClibc.
- *
- * MALLOC_TRACE, RESOLV_HOST_CONF, TZDIR, GCONV_PATH, LD_USE_LOAD_BIAS,
- * LD_PROFILE, LD_ORIGIN_PATH, LOCPATH, NLSPATH
- */
-
diff --git a/sys-libs/uclibc/files/digest-uclibc-0.9.26-r7 b/sys-libs/uclibc/files/digest-uclibc-0.9.26-r7
deleted file mode 100644
index 355f8d702bae..000000000000
--- a/sys-libs/uclibc/files/digest-uclibc-0.9.26-r7
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 7212713c432dd0de6ec2140c2a6212e4 uClibc-0.9.26.tar.bz2 1604543
-MD5 1c082d43f02e7fa199fe724469111d88 uClibc-0.9.26-cvs-update-20040808.patch.bz2 345344
-MD5 b7820c6b79f02d2d07a7ac75abfe90a5 uClibc-0.9.26-patches-1.1.tar.bz2 7162
diff --git a/sys-libs/uclibc/files/digest-uclibc-0.9.26-r8 b/sys-libs/uclibc/files/digest-uclibc-0.9.26-r8
deleted file mode 100644
index d630ae20babd..000000000000
--- a/sys-libs/uclibc/files/digest-uclibc-0.9.26-r8
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 7212713c432dd0de6ec2140c2a6212e4 uClibc-0.9.26.tar.bz2 1604543
-MD5 27f9c3067674f1f479a4ea6491c7e63b uClibc-0.9.26-cvs-update-20041209.patch.bz2 403987
-MD5 87c26182b2254e65682408444adb9e90 uClibc-0.9.26-patches-1.4.tar.bz2 35502
diff --git a/sys-libs/uclibc/uclibc-0.9.26-r7.ebuild b/sys-libs/uclibc/uclibc-0.9.26-r7.ebuild
deleted file mode 100644
index abfc9e7985df..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.26-r7.ebuild
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.26-r7.ebuild,v 1.1 2005/01/12 03:51:45 vapier Exp $
-
-inherit eutils flag-o-matic gcc
-
-# To make a new CVS_VER we do.
-# wget -O - http://uclibc.org/downloads/snapshots/uClibc-`date +%Y%m%d`.tar.bz2 | tar jxf -
-# tar jxf /usr/portage/distfiles/uClibc-0.9.26.tar.bz2
-# diff -urN --exclude .cvsignore --exclude CVS uClibc-0.9.26 uClibc | bzip2 - > uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2
-# rm -rf uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2 uClibc uClibc-0.9.26
-
-MY_P="${P/ucl/uCl}"
-CVS_VER="20040808"
-PATCH_VER="1.1"
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2
- mirror://gentoo/${MY_P}-cvs-update-${CVS_VER}.patch.bz2
- mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="x86 ppc ~sparc mips arm"
-IUSE="build hardened ipv6 static debug" # nls is not supported yet
-RESTRICT="nostrip"
-
-DEPEND="sys-devel/gcc"
-RDEPEND=""
-PROVIDE="virtual/glibc virtual/libc"
-
-S=${WORKDIR}/${MY_P}
-
-check_main_libc() {
- if [ "${CHOST/uclibc}" != "${CHOST}" ] ; then
- SYS_LIBC=uClibc
- else
- SYS_LIBC=glibc
- fi
- export SYS_LIBC
- echo
- einfo "We are building for ${SYS_LIBC} system library"
- echo
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- if [ -n "${CVS_VER}" ]
- then
- epatch ${DISTDIR}/${MY_P}-cvs-update-${CVS_VER}.patch.bz2
- fi
-
- cp ${FILESDIR}/0.9.26/ssp.c ${S}/libc/sysdeps/linux/common/ \
- || die "failed to copy ssp.c to ${S}/libc/sysdeps/linux/common/"
- # gcc 3.4 nukes ssp without this patch
- if [ "`gcc-major-version`" -eq "3" -a "`gcc-minor-version`" -ge "4" ]
- then
- epatch ${FILESDIR}/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch
- fi
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2
- # for now we remove relro/now, no support for relro in ldso
- rm -f ${WORKDIR}/patch/*relro*
- rm -f ${WORKDIR}/patch/*now*
- rm -f ${WORKDIR}/patch/11_all_uClibc-0.9.26-socket.patch.bz2
- # remove default ssp build
- use hardened || rm -f ${WORKDIR}/patch/*enable-ssp*
- epatch ${WORKDIR}/patch
- fi
-
- # support archs which dont implement all syscalls
- [ -z "${CVS_VER}" ] \
- && epatch ${FILESDIR}/${PV}/arm-fix-missing-syscalls.patch \
- || epatch ${FILESDIR}/${PV}/uclibc-0.9.26-arm-dl-sysdep.patch
- epatch ${FILESDIR}/${PV}/arm-ucontext.patch
-
- # build all .S files w/ -Wa,--noexecstack
- if [ "0${CVS_VER}" -ge "20040730" ]; then
- einfo "Skipping noexecstack patch. (need update)"
- else
- epatch ${FILESDIR}/${PV}/${PN}-${PV}-noexecstack.patch
- fi
-
- # fix segfaults when running things like `emerge sync`
- epatch ${FILESDIR}/${PV}/${PN}-${PV}-resolve-segfault.patch
-
- # allow libs tagged as ELF_LIBC0 in the cache to be loaded
- epatch ${FILESDIR}/${PV}/${PN}-${PV}-ldso-cache.patch
-
- # Take extra security precaution's for suid handling with environment variables
- epatch ${FILESDIR}/${PV}/uClibc-20040921-ldso-unsecvars.patch
- cp ${FILESDIR}/${PV}/unsecvars.h ${S}/ldso/include/ || die
-
- # fixup for install perms
- sed -i -e "s:-fa:-dRf:g" Makefile
-
- local target=""
- if [ "${ARCH}" == "x86" ] ; then
- target="i386"
- elif [ "${ARCH}" == "ppc" ] ; then
- target="powerpc"
- else
- # sparc|mips|alpha|arm|sh
- target="${ARCH}"
- fi
- sed -i \
- -e "s:default TARGET_i386:default TARGET_${target}:" \
- extra/Configs/Config.in
- sed -i \
- -e "s:default CONFIG_GENERIC_386:default CONFIG_${UCLIBC_CPU:-GENERIC_386}:" \
- extra/Configs/Config.${target}
-
- make defconfig >/dev/null || die "could not config"
-
- for def in UCLIBC_PROFILING DO{DEBUG,ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:" .config
- done
- if use debug ; then
- echo "SUPPORT_LD_DEBUG=y" >> .config
- echo "DODEBUG=y" >> .config
- fi
-
- for def in DO_C99_MATH UCLIBC_HAS_{RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} ; do
- sed -i -e "s:# ${def} is not set:${def}=y:" .config
- done
- echo "UCLIBC_HAS_FULL_RPC=y" >> .config
- echo "PTHREADS_DEBUG_SUPPORT=y" >> .config
-
- #if use nls
- #then
- # sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config
- # echo "UCLIBC_HAS_XLOCALE=n" >> .config
- # echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config
- # echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config
- # echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config
- # # on pax enabled kernels the locale files can't be built
- # echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config
- #fi
- # we disable LOCALE for any case, gettext has to be used
- echo "UCLIBC_HAS_LOCALE=n" >> .config
-
- use ipv6 && sed -i -e "s:# UCLIBC_HAS_IPV6 is not set:UCLIBC_HAS_IPV6=y:" .config
-
- if use hardened
- then
- if use x86
- then
- einfo "Enable Position Independent Executable support in ${P}"
- sed -i -e "s:# UCLIBC_PIE_SUPPORT.*:UCLIBC_PIE_SUPPORT=y:" .config
- fi
-
- einfo "Enable Stack Smashing Protections support in ${P}"
- sed -i -e "s:# UCLIBC_PROPOLICE.*:UCLIBC_PROPOLICE=y:" .config
- echo "PROPOLICE_BLOCK_ABRT=n" >> .config
- echo "PROPOLICE_BLOCK_SEGV=n" >> .config
- echo "PROPOLICE_BLOCK_KILL=y" >> .config
- fi
-
- # we are building against system installed kernel headers
- sed -i -e 's:KERNEL_SOURCE.*:KERNEL_SOURCE="/usr":' .config
-
- check_main_libc
- if [ "${SYS_LIBC}" = "uClibc" ] ; then
- sed -i \
- -e 's:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX="/lib":' \
- -e 's:DEVEL_PREFIX=.*:DEVEL_PREFIX="/usr":' \
- -e 's:RUNTIME_PREFIX=.*:RUNTIME_PREFIX="/":' \
- .config
- sed -i '/LIBRARY_CACHE:=/s:#::' Rules.mak
- fi
-
- make -s oldconfig > /dev/null || die "could not make oldconfig"
-
- chmod +x extra/scripts/relative_path.sh
-
- cp .config myconfig
-
- emake clean >/dev/null || die "could not clean"
-
- sed -i 's:-DUCLIBC:$(LIBRARY_CACHE) -DUCLIBC:' ldso/{ldso,libdl}/Makefile
- sed -i 's:\$(R_PREFIX):\\"$(RUNTIME_PREFIX)\\" $(LIBRARY_CACHE):' utils/Makefile
- sed -i 's: I\.: -I.:' ldso/libdl/Makefile
- sed -i 's:sys/user\.h:asm/page.h:' libc/misc/internals/__uClibc_main.c
-}
-
-src_compile() {
- # running tests require this
- use build || addwrite /dev/ptmx
- cp myconfig .config
-
- #if use nls
- #then
- # # these can be built only if the build system supports locales (as of 0.9.26)
- # emake -j1 headers
- # cd extra/locale
- # make clean
- # find ./charmaps -name "*.pairs" > codesets.txt
- # cp LOCALES locales.txt
- # emake -j1 || die "could not make locales"
- # cd ../..
- #fi
-
- emake -j1 || die "could not make"
- check_main_libc
- if [ "${SYS_LIBC}" = "uClibc" ]
- then
- emake -j1 utils || die "could not make utils"
- fi
-
- if ! use build
- then
- if ! hasq maketest $RESTRICT
- then
- # assert test fails on pax enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- cd test; make; cd ..
- fi
- fi
-}
-
-src_install() {
- emake PREFIX=${D} install || die "install failed"
-
- # remove files coming from kernel-headers
- # scsi is uclibc's own directory since cvs 20040212
- check_main_libc
- if [ "${SYS_LIBC}" = "uClibc" ]
- then
- rm -rf ${D}/usr/include/{asm,linux}
- rm -f ${D}/usr/lib/lib*_pic.a
- ! use static && use build && rm -f ${D}/usr/lib/lib*.a
-
- emake PREFIX=${D} install_utils || die "install-utils failed"
- dodir /usr/bin
- exeinto /usr/bin
- doexe ${FILESDIR}/getent
- fi
-
- # shameless plug for mjn3 who gives us so much...
- # please give back if you can. -solar
- f=DEDICATION.mjn3 ; [ -e "$f" ] && ( cat $f ; epause 2 )
-
- if ! use build
- then
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
- doman debian/*.1
- fi
-}
-
-#pkg_postinst() {
-#check_main_libc
-#if [ "${SYS_LIBC}" = "uClibc" ] ; then
-# if [ "${ROOT}" = "/" ] ; then
-# /sbin/ldconfig
-# [ ! -e /etc/TZ ] && echo UTC > /etc/TZ
-# # reload init?
-# fi
-#else
-#should we add the lib dir to ld.so.conf?
-#fi
-#}
diff --git a/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild b/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild
deleted file mode 100644
index 3819eda84195..000000000000
--- a/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.6 2005/01/27 03:39:50 vapier Exp $
-
-inherit eutils flag-o-matic toolchain-funcs
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-# Handle the case where we want uclibc on glibc ...
-if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc ]] ; then
- export UCLIBC_AND_GLIBC="sitting in a tree"
- export CTARGET=${CHOST%%-*}-pc-linux-uclibc
-else
- export UCLIBC_AND_GLIBC=""
-fi
-
-# To make a new CVS_VER we do.
-# wget -O - http://uclibc.org/downloads/snapshots/uClibc-`date +%Y%m%d`.tar.bz2 | tar jxf -
-# tar jxf /usr/portage/distfiles/uClibc-0.9.26.tar.bz2
-# diff -urN --exclude .cvsignore --exclude CVS uClibc-0.9.26 uClibc | bzip2 - > uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2
-# rm -rf uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2 uClibc uClibc-0.9.26
-
-MY_P=${P/ucl/uCl}
-# only CVS_VER >= 20041117 is supported
-CVS_VER="20041209"
-PATCH_VER="1.4"
-DESCRIPTION="C library for developing embedded Linux systems"
-HOMEPAGE="http://www.uclibc.org/"
-SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2
- mirror://gentoo/${MY_P}-cvs-update-${CVS_VER}.patch.bz2
- mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2"
-
-LICENSE="LGPL-2"
-[[ ${CTARGET} != ${CHOST} ]] \
- && SLOT="${CTARGET}" \
- || SLOT="0"
-KEYWORDS="~arm ~mips ~ppc ~sh ~sparc ~x86"
-IUSE="alsa build debug hardened ipv6 static" # nls is not supported yet
-RESTRICT="nostrip"
-
-DEPEND="sys-devel/gcc"
-RDEPEND=""
-PROVIDE="virtual/libc"
-
-S=${WORKDIR}/${MY_P}
-
-alt_kprefix() {
- if [[ ${CTARGET} == ${CHOST} ]] || [[ -n ${UCLIBC_AND_GLIBC} ]] ; then
- echo /usr
- else
- echo /usr/${CTARGET}
- fi
-}
-alt_prefix() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- echo /usr
- else
- echo /usr/${CTARGET}
- fi
-}
-alt_rprefix() {
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- echo /
- else
- echo /usr/${CTARGET}
- fi
-}
-
-CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}"
-CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}"
-CPU_PPC=""
-CPU_SH="SH{2,3,4,5}"
-CPU_X86="GENERIC_386 {3,4,5,6}86 PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
-IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_X86}"
-
-check_cpu_opts() {
- local cpu_var="CPU_$(echo $(tc-arch ${CTARGET}) | tr [a-z] [A-Z])"
- if [[ -z ${UCLIBC_CPU} ]] ; then
- ewarn "You really should consider setting UCLIBC_CPU"
- ewarn "Otherwise, the build will be generic (read: slow)."
- ewarn "Available CPU options:"
- UCLIBC_CPU=$(eval echo ${!cpu_var})
- echo ${UCLIBC_CPU}
- export UCLIBC_CPU=${UCLIBC_CPU%% *}
- else
- local cpu found=0
- for cpu in $(eval echo ${!cpu_var}) ; do
- [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
- done
- if [[ ${found} -eq 0 ]] ; then
- ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
- ewarn "Valid choices:"
- eval echo ${!cpu_var}
- die "pick a supported cpu type"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
- check_cpu_opts
-
- ########## PATCHES ##########
-
- [[ -n ${CVS_VER} ]] && \
- epatch ${DISTDIR}/${MY_P}-cvs-update-${CVS_VER}.patch.bz2
-
- if [[ -n ${PATCH_VER} ]] ; then
- unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2
- epatch ${WORKDIR}/patch
- # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f)
- use build || epatch ${WORKDIR}/patch/math
- fi
-
- epatch ${FILESDIR}/${PVR}-cvs.patch #73583
-
- ########## CPU SELECTION ##########
-
- local target config_target
- case $(tc-arch ${CTARGET}) in
- arm) target="arm"; config_target="GENERIC_ARM";;
- mips) target="mips"; config_target="MIPS_ISA_1";;
- ppc) target="powerpc"; config_target="no cpu-specific options";;
- sh) target="sh"; config_target="SH4";;
- x86) target="i386"; config_target="GENERIC_386";;
- *) die "$(tc-arch ${CTARGET}) lists no defaults :/";;
- esac
- sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \
- extra/Configs/Config.in
- sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
- extra/Configs/Config.${target}
-
- ########## CONFIG SETUP ##########
-
- make defconfig >/dev/null || die "could not config"
-
- for def in UCLIBC_PROFILING DO{DEBUG,ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do
- sed -i -e "s:${def}=y:# ${def} is not set:" .config
- done
- if use debug ; then
- echo "SUPPORT_LD_DEBUG=y" >> .config
- echo "DODEBUG=y" >> .config
- fi
-
- sed -i -e 's:^ARCH_.*_ENDIAN=y::' .config
- echo "ARCH_$(tc-endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config
-
- for def in DO_C99_MATH UCLIBC_HAS_{RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} ; do
- sed -i -e "s:# ${def} is not set:${def}=y:" .config
- done
- echo "UCLIBC_HAS_FULL_RPC=y" >> .config
- echo "PTHREADS_DEBUG_SUPPORT=y" >> .config
-
- #if use nls ; then
- # sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config
- # echo "UCLIBC_HAS_XLOCALE=n" >> .config
- # echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config
- # echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config
- # # removed on 20040907 by mjn3
- # echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config
- # # on pax enabled kernels the locale files can't be built
- # echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config
- #fi
- # we disable LOCALE for any case, gettext has to be used
- echo "UCLIBC_HAS_LOCALE=n" >> .config
-
- use ipv6 && sed -i -e "s:# UCLIBC_HAS_IPV6 is not set:UCLIBC_HAS_IPV6=y:" .config
-
- # uncomment if you miss wordexp (alsa-lib)
- use alsa && sed -i -e "s:# UCLIBC_HAS_WORDEXP is not set:UCLIBC_HAS_WORDEXP=y:" .config
-
- # we need to do it independently of hardened to get ssp.c built into libc
- sed -i -e "s:# UCLIBC_SECURITY.*:UCLIBC_SECURITY=y:" .config
- einfo "Enable Stack Smashing Protections support in ${P}"
- echo "UCLIBC_HAS_SSP=y" >> .config
- echo "PROPOLICE_BLOCK_ABRT=n" >> .config
- if use debug ; then
- echo "PROPOLICE_BLOCK_SEGV=y" >> .config
- echo "PROPOLICE_BLOCK_KILL=n" >> .config
- else
- echo "PROPOLICE_BLOCK_SEGV=n" >> .config
- echo "PROPOLICE_BLOCK_KILL=y" >> .config
- fi
-
- if use hardened ; then
- if has $(tc-arch ${CTARGET}) mips ppc x86 ; then
- echo "UCLIBC_BUILD_PIE=y" >> .config
- else
- echo "UCLIBC_BUILD_PIE=n" >> .config
- fi
-
- echo "UCLIBC_BUILD_SSP=y" >> .config
- echo "UCLIBC_BUILD_RELRO=y" >> .config
- echo "UCLIBC_BUILD_NOW=y" >> .config
- echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config
- else
- echo "UCLIBC_BUILD_PIE=n" >> .config
- echo "UCLIBC_BUILD_SSP=n" >> .config
- echo "UCLIBC_BUILD_RELRO=n" >> .config
- echo "UCLIBC_BUILD_NOW=n" >> .config
- echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config
- fi
-
- echo "UCLIBC_XATTR=y" >> .config
-
- # we are building against system installed kernel headers
- sed -i \
- -e "s:KERNEL_SOURCE.*:KERNEL_SOURCE=\"$(alt_kprefix)\":" \
- -e "s:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX=\"$(alt_rprefix)/$(get_libdir)\":" \
- -e "s:DEVEL_PREFIX=.*:DEVEL_PREFIX=\"$(alt_prefix)\":" \
- -e "s:RUNTIME_PREFIX=.*:RUNTIME_PREFIX=\"$(alt_rprefix)\":" \
- .config
-
- yes "" | make -s oldconfig > /dev/null || die "could not make oldconfig"
-
- chmod +x extra/scripts/relative_path.sh
-
- cp .config myconfig
-
- emake clean >/dev/null || die "could not clean"
-
- echo
- einfo "Runtime Prefix: $(alt_rprefix)"
- einfo "Kernel Prefix: $(alt_kprefix)"
- einfo "Devel Prefix: $(alt_prefix)"
- einfo "CBUILD: ${CBUILD:-${CHOST}}"
- einfo "CHOST: ${CHOST}"
- einfo "CTARGET: ${CTARGET}"
-}
-
-src_compile() {
- # running tests require this
- use build || addwrite /dev/ptmx
- cp myconfig .config
-
- #if use nls ; then
- # # these can be built only if the build system supports locales (as of 0.9.26)
- # emake -j1 headers
- # cd extra/locale
- # make clean
- # find ./charmaps -name "*.pairs" > codesets.txt
- # cp LOCALES locales.txt
- # emake -j1 || die "could not make locales"
- # cd ../..
- #fi
- local makeopts
- type -p ${CTARGET}-ar && makeopts="CROSS=${CTARGET}-"
-
- emake -j1 ${makeopts} || die "could not make"
- [[ ${CTARGET} != ${CHOST} ]] && return 0
-
- if [[ ${CHOST} == *-uclibc ]] ; then
- emake -j1 ${makeopts} utils || die "could not make utils"
- fi
-
- if ! use build ; then
- if ! hasq maketest $RESTRICT ; then
- src_test
- fi
- fi
-}
-
-src_test() {
- # This is wrong, but uclibc's tests fail bad when screwing
- # around with sandbox, so lets just punt it
- unset LD_PRELOAD
-
- # assert test fails on pax/grsec enabled kernels - normal
- # vfork test fails in sandbox (both glibc/uclibc)
- cd test
- make || die "test failed"
-}
-
-src_install() {
- emake PREFIX="${D}" install || die "install failed"
-
- # remove files coming from kernel-headers
- # scsi is uclibc's own directory since cvs 20040212
- rm -r "${D}"$(alt_prefix)/include/{asm,linux,asm-generic}
-
- if [[ ${CTARGET} != ${CHOST} ]] ; then
- # Need this symlink in order for gcc to find the system
- # headers properly when creating final stage compiler.
- # See the '--with-headers' option in the gcc manual.
- dosym include $(alt_prefix)/sys-include
- return 0
- fi
-
- if [[ ${CHOST} == *-uclibc ]] ; then
- emake PREFIX="${D}" install_utils || die "install-utils failed"
- dodir /usr/bin
- exeinto /usr/bin
- doexe extra/scripts/getent
- fi
-
- if ! use build ; then
- dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
- doman debian/*.1
- fi
-}
-
-pkg_postinst() {
-[[ ${CTARGET} != ${CHOST} ]] && return 0
-
-if [[ ${CHOST} == *-uclibc ]] ; then
- # remove invalid symlinks if any
- #local x=
- #for x in TZ ld.so.conf ld.so.preload ; do
- # [ ! -e "${ROOT}/etc/${x}" ] && rm -f ${ROOT}/etc/${x}
- #done
-
- if [[ ! -e ${ROOT}/etc/TZ ]] ; then
- echo "Please remember to set your timezone in /etc/TZ."
- echo "UTC" > "${ROOT}"/etc/TZ
- fi
-
- if [[ ! -e ${ROOT}/etc/ld.so.conf ]] ; then
- [[ -d ${ROOT}/usr/X11R6/lib ]] \
- && echo "/usr/X11R6/lib" > "${ROOT}"/etc/ld.so.conf \
- || > "${ROOT}"/etc/ld.so.conf
- fi
-
- if [[ ${ROOT} == "/" ]] ; then
- # update cache before reloading init
- /sbin/ldconfig
- # reload init ...
- [ -x /sbin/init ] && /sbin/init U &> /dev/null
- # add entries for alternatives (like minit)
- fi
-#else
-#should we add the libdir on a non-uclibc based system to ld.so.conf?
-fi
-}