mirror of
https://github.com/libretro/Lakka.git
synced 2025-03-03 05:06:16 +00:00
eglibc: update to eglibc-2.16-19673
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
85d5f24916
commit
b895a2a996
@ -4,14 +4,13 @@ Changelog OpenELEC-1.0 to OpenELEC-2.0
|
||||
|
||||
Package updates:
|
||||
- update XBMC to XBMC-11.0 (Eden)
|
||||
- update eglibc to eglibc-2.15
|
||||
- update eglibc to eglibc-2.16
|
||||
- update Python to Python-2.7
|
||||
- update gcc to gcc-4.7
|
||||
- update openssl to openssl-1.0.1
|
||||
- update xorg-server to xorg-server-1.11
|
||||
- update to Kernel 3.2
|
||||
- update to Mesa-8.0
|
||||
- update to xorg-server-1.12
|
||||
- update xorg-server to xorg-server-1.12
|
||||
- update linux to Kernel 3.2
|
||||
- update Mesa to Mesa-8.0
|
||||
|
||||
Added functions:
|
||||
- PXE netboot support:
|
||||
|
@ -132,8 +132,9 @@ EOF
|
||||
--enable-bind-now \
|
||||
--with-elf \
|
||||
--with-tls \
|
||||
--enable-kernel=2.6.39 \
|
||||
--enable-kernel=3.0.0 \
|
||||
--with-__thread \
|
||||
--enable-obsolete-rpc \
|
||||
--with-binutils=$BUILD/toolchain/bin \
|
||||
--with-headers=$SYSROOT_PREFIX/usr/include \
|
||||
--without-cvs \
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="eglibc"
|
||||
PKG_VERSION="2.15-18222"
|
||||
PKG_VERSION="2.16-19673"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -1,134 +0,0 @@
|
||||
From 675155e9084e060fd0e1e637b843f14e82898aa5 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Wed, 22 Sep 2010 12:06:30 +0200
|
||||
Subject: [PATCH] Fix memory leak on init/fini dependency list
|
||||
|
||||
diff -Naur eglibc-2.14.1-15769/elf/dl-close.c eglibc-2.14.1-15769.patch/elf/dl-close.c
|
||||
--- eglibc-2.14.1-15769/elf/dl-close.c 2011-11-10 17:59:49.000000000 +0100
|
||||
+++ eglibc-2.14.1-15769.patch/elf/dl-close.c 2011-11-11 13:11:54.317765891 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Close a shared object opened by `_dl_open'.
|
||||
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -119,17 +119,8 @@
|
||||
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|
||||
|| dl_close_state != not_pending)
|
||||
{
|
||||
- if (map->l_direct_opencount == 0)
|
||||
- {
|
||||
- if (map->l_type == lt_loaded)
|
||||
- dl_close_state = rerun;
|
||||
- else if (map->l_type == lt_library)
|
||||
- {
|
||||
- struct link_map **oldp = map->l_initfini;
|
||||
- map->l_initfini = map->l_orig_initfini;
|
||||
- _dl_scope_free (oldp);
|
||||
- }
|
||||
- }
|
||||
+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
|
||||
+ dl_close_state = rerun;
|
||||
|
||||
/* There are still references to this object. Do nothing more. */
|
||||
if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
|
||||
diff -Naur eglibc-2.14.1-15769/elf/dl-deps.c eglibc-2.14.1-15769.patch/elf/dl-deps.c
|
||||
--- eglibc-2.14.1-15769/elf/dl-deps.c 2011-11-10 17:59:49.000000000 +0100
|
||||
+++ eglibc-2.14.1-15769.patch/elf/dl-deps.c 2011-11-11 13:14:07.711207504 +0100
|
||||
@@ -478,6 +478,7 @@
|
||||
nneeded * sizeof needed[0]);
|
||||
atomic_write_barrier ();
|
||||
l->l_initfini = l_initfini;
|
||||
+ l->l_free_initfini = 1;
|
||||
}
|
||||
|
||||
/* If we have no auxiliary objects just go on to the next map. */
|
||||
@@ -678,6 +679,7 @@
|
||||
l_initfini[nlist] = NULL;
|
||||
atomic_write_barrier ();
|
||||
map->l_initfini = l_initfini;
|
||||
+ map->l_free_initfini = 1;
|
||||
if (l_reldeps != NULL)
|
||||
{
|
||||
atomic_write_barrier ();
|
||||
@@ -686,7 +688,7 @@
|
||||
_dl_scope_free (old_l_reldeps);
|
||||
}
|
||||
if (old_l_initfini != NULL)
|
||||
- map->l_orig_initfini = old_l_initfini;
|
||||
+ _dl_scope_free (old_l_initfini);
|
||||
|
||||
if (errno_reason)
|
||||
_dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
|
||||
diff -Naur eglibc-2.14.1-15769/elf/dl-libc.c eglibc-2.14.1-15769.patch/elf/dl-libc.c
|
||||
--- eglibc-2.14.1-15769/elf/dl-libc.c 2011-11-10 17:59:49.000000000 +0100
|
||||
+++ eglibc-2.14.1-15769.patch/elf/dl-libc.c 2011-11-11 13:11:54.319765853 +0100
|
||||
@@ -265,13 +265,13 @@
|
||||
|
||||
for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
|
||||
{
|
||||
- /* Remove all additional names added to the objects. */
|
||||
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
||||
{
|
||||
struct libname_list *lnp = l->l_libname->next;
|
||||
|
||||
l->l_libname->next = NULL;
|
||||
|
||||
+ /* Remove all additional names added to the objects. */
|
||||
while (lnp != NULL)
|
||||
{
|
||||
struct libname_list *old = lnp;
|
||||
@@ -279,6 +279,10 @@
|
||||
if (! old->dont_free)
|
||||
free (old);
|
||||
}
|
||||
+
|
||||
+ /* Free the initfini dependency list. */
|
||||
+ if (l->l_free_initfini)
|
||||
+ free (l->l_initfini);
|
||||
}
|
||||
|
||||
if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
|
||||
diff -Naur eglibc-2.14.1-15769/elf/rtld.c eglibc-2.14.1-15769.patch/elf/rtld.c
|
||||
--- eglibc-2.14.1-15769/elf/rtld.c 2011-11-10 17:59:49.000000000 +0100
|
||||
+++ eglibc-2.14.1-15769.patch/elf/rtld.c 2011-11-11 13:11:54.320765834 +0100
|
||||
@@ -2264,6 +2264,7 @@
|
||||
lnp->dont_free = 1;
|
||||
lnp = lnp->next;
|
||||
}
|
||||
+ l->l_free_initfini = 0;
|
||||
|
||||
if (l != &GL(dl_rtld_map))
|
||||
_dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
|
||||
diff -Naur eglibc-2.14.1-15769/include/link.h eglibc-2.14.1-15769.patch/include/link.h
|
||||
--- eglibc-2.14.1-15769/include/link.h 2011-11-10 17:59:51.000000000 +0100
|
||||
+++ eglibc-2.14.1-15769.patch/include/link.h 2011-11-11 13:11:54.321765815 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Data structure for communication from the run-time dynamic linker for
|
||||
loaded ELF shared objects.
|
||||
- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -192,6 +192,9 @@
|
||||
during LD_TRACE_PRELINKING=1
|
||||
contains any DT_SYMBOLIC
|
||||
libraries. */
|
||||
+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
|
||||
+ freed, ie. not allocated with
|
||||
+ the dummy malloc in ld.so. */
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
@@ -240,9 +243,6 @@
|
||||
|
||||
/* List of object in order of the init and fini calls. */
|
||||
struct link_map **l_initfini;
|
||||
- /* The init and fini list generated at startup, saved when the
|
||||
- object is also loaded dynamically. */
|
||||
- struct link_map **l_orig_initfini;
|
||||
|
||||
/* List of the dependencies introduced through symbol binding. */
|
||||
struct link_map_reldeps
|
@ -1,64 +0,0 @@
|
||||
diff -Naur glibc-2.11.orig/Makeconfig glibc-2.11/Makeconfig
|
||||
--- glibc-2.11.orig/Makeconfig 2009-10-30 13:17:08.000000000 -0400
|
||||
+++ glibc-2.11/Makeconfig 2009-11-13 12:14:18.000000000 -0500
|
||||
@@ -538,12 +538,20 @@
|
||||
libunwind = -lunwind
|
||||
endif
|
||||
ifneq ($(have-as-needed),yes)
|
||||
- libgcc_eh := -lgcc_eh $(libunwind)
|
||||
+ ifneq ($(have-cc-with-libgcc_eh),yes)
|
||||
+ libgcc_eh := $(libunwind)
|
||||
+ else
|
||||
+ libgcc_eh := -lgcc_eh $(libunwind)
|
||||
+ endif
|
||||
else
|
||||
libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
|
||||
endif
|
||||
gnulib := -lgcc $(libgcc_eh)
|
||||
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
|
||||
+ifneq ($(have-cc-with-libgcc_eh),yes)
|
||||
+ static-gnulib := -lgcc $(libunwind)
|
||||
+else
|
||||
+ static-gnulib := -lgcc -lgcc_eh $(libunwind)
|
||||
+endif
|
||||
libc.so-gnulib := -lgcc
|
||||
endif
|
||||
ifeq ($(elf),yes)
|
||||
diff -Naur glibc-2.11.orig/config.make.in glibc-2.11/config.make.in
|
||||
--- glibc-2.11.orig/config.make.in 2009-10-30 13:17:08.000000000 -0400
|
||||
+++ glibc-2.11/config.make.in 2009-11-13 12:14:18.000000000 -0500
|
||||
@@ -64,6 +64,7 @@
|
||||
have-libaudit = @have_libaudit@
|
||||
have-libcap = @have_libcap@
|
||||
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
|
||||
+have-cc-with-libgcc_eh = @libc_cv_cc_with_libgcc_eh@
|
||||
fno-unit-at-a-time = @fno_unit_at_a_time@
|
||||
bind-now = @bindnow@
|
||||
have-hash-style = @libc_cv_hashstyle@
|
||||
diff -Naur glibc-2.11.orig/configure.in glibc-2.11/configure.in
|
||||
--- glibc-2.11.orig/configure.in 2009-10-30 13:17:08.000000000 -0400
|
||||
+++ glibc-2.11/configure.in 2009-11-13 12:14:18.000000000 -0500
|
||||
@@ -1505,6 +1505,23 @@
|
||||
AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
|
||||
fi
|
||||
|
||||
+ AC_CACHE_CHECK(whether to link against libgcc_eh,
|
||||
+ libc_cv_cc_with_libgcc_eh, [
|
||||
+ cat > conftest.c <<EOF
|
||||
+int main (void) { return 0; }
|
||||
+EOF
|
||||
+ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
|
||||
+ conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
|
||||
+ libc_cv_cc_with_libgcc_eh=yes
|
||||
+ else
|
||||
+ libc_cv_cc_with_libgcc_eh=no
|
||||
+ fi
|
||||
+ rm -f conftest*])
|
||||
+ AC_SUBST(libc_cv_cc_with_libgcc_eh)
|
||||
+ if test $libc_cv_cc_with_libgcc_eh = yes; then
|
||||
+ AC_DEFINE(HAVE_CC_WITH_LIBGCC_EH)
|
||||
+ fi
|
||||
+
|
||||
AC_CACHE_CHECK(for -z nodelete option,
|
||||
libc_cv_z_nodelete, [dnl
|
||||
cat > conftest.c <<EOF
|
@ -1,59 +0,0 @@
|
||||
diff -Naur eglibc-2.14-15360/include/libc-symbols.h eglibc-2.14-15360.patch/include/libc-symbols.h
|
||||
--- eglibc-2.14-15360/include/libc-symbols.h 2011-09-17 16:13:20.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/include/libc-symbols.h 2011-09-18 19:00:16.559302295 +0200
|
||||
@@ -656,7 +656,7 @@
|
||||
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
|
||||
# define libc_hidden_def(name) hidden_def (name)
|
||||
# define libc_hidden_weak(name) hidden_weak (name)
|
||||
-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
|
||||
+# define libc_hidden_nolink(name, version) hidden_def (name)
|
||||
# define libc_hidden_ver(local, name) hidden_ver (local, name)
|
||||
# define libc_hidden_data_def(name) hidden_data_def (name)
|
||||
# define libc_hidden_data_weak(name) hidden_data_weak (name)
|
||||
diff -Naur eglibc-2.14-15360/nis/Makefile eglibc-2.14-15360.patch/nis/Makefile
|
||||
--- eglibc-2.14-15360/nis/Makefile 2011-09-17 16:13:06.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/nis/Makefile 2011-09-18 19:00:16.526301845 +0200
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
aux := nis_hash
|
||||
|
||||
+headers := $(wildcard rpcsvc/*.[hx])
|
||||
distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
|
||||
- nisplus-parser.h nis_xdr.h nss \
|
||||
- $(wildcard rpcsvc/*.[hx])
|
||||
+ nisplus-parser.h nis_xdr.h nss
|
||||
|
||||
# These are the databases available for the nis (and perhaps later nisplus)
|
||||
# service. This must be a superset of the services in nss.
|
||||
@@ -78,6 +78,8 @@
|
||||
|
||||
include ../Rules
|
||||
|
||||
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
|
||||
+CFLAGS-ypclnt.c += -fno-strict-aliasing
|
||||
|
||||
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
|
||||
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
|
||||
diff -Naur eglibc-2.14-15360/sunrpc/Makefile eglibc-2.14-15360.patch/sunrpc/Makefile
|
||||
--- eglibc-2.14-15360/sunrpc/Makefile 2011-09-17 16:13:12.000000000 +0200
|
||||
+++ eglibc-2.14-15360.patch/sunrpc/Makefile 2011-09-18 19:01:31.772325016 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
des_crypt.h)
|
||||
headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
|
||||
$(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
|
||||
-headers = rpc/netdb.h
|
||||
+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
|
||||
$(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
|
||||
generated-dirs := rpcsvc
|
||||
@@ -165,6 +165,10 @@
|
||||
|
||||
CPPFLAGS += -D_RPC_THREAD_SAFE_
|
||||
|
||||
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
|
||||
+
|
||||
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
|
@ -0,0 +1,344 @@
|
||||
From 95f5a9a866695da4e038aa4e6ccbbfd5d9cf63b7 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Tue, 3 Jul 2012 19:14:59 +0000
|
||||
Subject: [PATCH] Avoid use of libgcc_s and libgcc_eh when building glibc.
|
||||
|
||||
---
|
||||
ChangeLog | 47 ++++++++++++++++++++++++++++++
|
||||
Makeconfig | 68 ++++++++++++++++++++++++++++++++++++++------
|
||||
Rules | 45 ++++++++++++++++++++++-------
|
||||
elf/Makefile | 6 +++-
|
||||
elf/static-stubs.c | 46 +++++++++++++++++++++++++++++
|
||||
ports/ChangeLog.arm | 7 ++++
|
||||
ports/sysdeps/arm/Makefile | 8 +++++
|
||||
7 files changed, 206 insertions(+), 21 deletions(-)
|
||||
create mode 100644 elf/static-stubs.c
|
||||
|
||||
diff --git a/Makeconfig b/Makeconfig
|
||||
index 417fa50..859b588 100644
|
||||
--- a/Makeconfig
|
||||
+++ b/Makeconfig
|
||||
@@ -415,9 +415,9 @@ LDFLAGS.so += $(hashstyle-LDFLAGS)
|
||||
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
|
||||
endif
|
||||
|
||||
-# Command for linking programs with the C library.
|
||||
+# Commands for linking programs with the C library.
|
||||
ifndef +link
|
||||
-+link = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
++link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
|
||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
|
||||
$(addprefix $(csu-objpfx),$(start-installed-name)) \
|
||||
@@ -426,7 +426,10 @@ ifndef +link
|
||||
$(start-installed-name))\
|
||||
$(+preinit) $(link-extra-libs) \
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
- $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
|
||||
+ $(link-extra-libs)
|
||||
++link-after-libc = $(+postctor) $(+postinit)
|
||||
++link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
|
||||
++link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
|
||||
endif
|
||||
# Command for linking PIE programs with the C library.
|
||||
ifndef +link-pie
|
||||
@@ -443,7 +446,7 @@ ifndef +link-pie
|
||||
endif
|
||||
# Command for statically linking programs with the C library.
|
||||
ifndef +link-static
|
||||
-+link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \
|
||||
++link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
|
||||
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||
$(addprefix $(csu-objpfx),$(static-start-installed-name)) \
|
||||
$(+preinit) $(+prector) \
|
||||
@@ -451,7 +454,12 @@ ifndef +link-static
|
||||
$(start-installed-name))\
|
||||
$(+preinit) $(link-extra-libs-static) \
|
||||
$(common-objpfx)libc% $(+postinit),$^) \
|
||||
- $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
|
||||
+ $(link-extra-libs-static) $(link-libc-static)
|
||||
++link-static-after-libc = $(+postctor) $(+postinit)
|
||||
++link-static = $(+link-static-before-libc) $(link-libc-static) \
|
||||
+ $(+link-static-after-libc)
|
||||
++link-static-tests = $(+link-static-before-libc) $(link-libc-static-tests) \
|
||||
+ $(+link-static-after-libc)
|
||||
endif
|
||||
# Command for statically linking bounded-pointer programs with the C library.
|
||||
ifndef +link-bounded
|
||||
@@ -475,10 +483,12 @@ ifeq (yes,$(build-shared))
|
||||
# We need the versioned name of libc.so in the deps of $(others) et al
|
||||
# so that the symlink to libc.so is created before anything tries to
|
||||
# run the linked programs.
|
||||
-link-libc = -Wl,-rpath-link=$(rpath-link) \
|
||||
+link-libc-before-gnulib = -Wl,-rpath-link=$(rpath-link) \
|
||||
$(common-objpfx)libc.so$(libc.so-version) \
|
||||
$(common-objpfx)$(patsubst %,$(libtype.oS),c) \
|
||||
- $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib)
|
||||
+ $(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed)
|
||||
+link-libc = $(link-libc-before-gnulib) $(gnulib)
|
||||
+link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests)
|
||||
# This is how to find at build-time things that will be installed there.
|
||||
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
|
||||
rpath-link = \
|
||||
@@ -488,6 +498,7 @@ else
|
||||
nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
|
||||
resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
|
||||
link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
|
||||
+link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -513,8 +524,43 @@ endif
|
||||
|
||||
# The static libraries.
|
||||
link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
|
||||
+link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-group
|
||||
link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
|
||||
|
||||
+# How to link against libgcc. Some libgcc functions, such as those
|
||||
+# for "long long" arithmetic or software floating point, can always be
|
||||
+# built without use of C library headers and do not have any global
|
||||
+# state so can safely be linked statically into any executable or
|
||||
+# shared library requiring them; these functions are in libgcc.a.
|
||||
+# Other functions, relating to exception handling, may require C
|
||||
+# library headers to build and it may not be safe to have more than
|
||||
+# one copy of them in a process; these functions are only in
|
||||
+# libgcc_s.so and libgcc_eh.a.
|
||||
+#
|
||||
+# To avoid circular dependencies when bootstrapping, it is desirable
|
||||
+# to avoid use of libgcc_s and libgcc_eh in building glibc. Where any
|
||||
+# glibc functionality (in particular, thread cancellation) requires
|
||||
+# exception handling, this is implemented through dlopen of libgcc_s
|
||||
+# to avoid unnecessary dependencies on libgcc_s by programs not using
|
||||
+# that functionality; executables built with glibc do not use
|
||||
+# exception handling other than through thread cancellation.
|
||||
+#
|
||||
+# Undefined references to functions from libgcc_eh or libgcc_s may
|
||||
+# arise for code built with -fexceptions. In the case of statically
|
||||
+# linked programs installed by glibc, unwinding will never actually
|
||||
+# occur at runtime and the use of elf/static-stubs.c to resolve these
|
||||
+# references is safe. In the case of statically linked test programs
|
||||
+# and test programs built with -fexceptions, unwinding may occur in
|
||||
+# some cases and it is preferable to link with libgcc_eh or libgcc_s
|
||||
+# so that the testing is as similar as possible to how programs will
|
||||
+# be built with the installed glibc.
|
||||
+#
|
||||
+# Some architectures have architecture-specific systems for exception
|
||||
+# handling that may involve undefined references to
|
||||
+# architecture-specific functions. On those architectures,
|
||||
+# gnulib-arch and static-gnulib-arch may be defined in sysdeps
|
||||
+# makefiles to use additional libraries for linking executables and
|
||||
+# shared libraries built by glibc.
|
||||
ifndef gnulib
|
||||
ifneq ($(have-cc-with-libunwind),yes)
|
||||
libunwind =
|
||||
@@ -522,8 +568,12 @@ else
|
||||
libunwind = -lunwind
|
||||
endif
|
||||
libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
|
||||
-gnulib := -lgcc $(libgcc_eh)
|
||||
-static-gnulib := -lgcc -lgcc_eh $(libunwind)
|
||||
+gnulib-arch =
|
||||
+gnulib = -lgcc $(gnulib-arch)
|
||||
+gnulib-tests := -lgcc $(libgcc_eh)
|
||||
+static-gnulib-arch =
|
||||
+static-gnulib = -lgcc $(static-gnulib-arch)
|
||||
+static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
|
||||
libc.so-gnulib := -lgcc
|
||||
endif
|
||||
+preinit = $(addprefix $(csu-objpfx),crti.o)
|
||||
diff --git a/Rules b/Rules
|
||||
index 3c61a29..17d938e 100644
|
||||
--- a/Rules
|
||||
+++ b/Rules
|
||||
@@ -1,5 +1,4 @@
|
||||
-# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011
|
||||
-# Free Software Foundation, Inc.
|
||||
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -103,29 +102,46 @@ xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-bp.out)
|
||||
endif
|
||||
|
||||
ifeq ($(build-programs),yes)
|
||||
-binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
|
||||
-binaries-static = $(others-static) $(tests-static) $(xtests-static)
|
||||
+binaries-all-notests = $(others) $(sysdep-others)
|
||||
+binaries-all-tests = $(tests) $(xtests) $(test-srcs)
|
||||
+binaries-all = $(binaries-all-notests) $(binaries-all-tests)
|
||||
+binaries-static-notests = $(others-static)
|
||||
+binaries-static-tests = $(tests-static) $(xtests-static)
|
||||
+binaries-static = $(binaries-static-notests) $(binaries-static-tests)
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
binaries-pie = $(others-pie) $(tests-pie) $(xtests-pie)
|
||||
else
|
||||
binaries-pie =
|
||||
endif
|
||||
else
|
||||
-binaries-all = $(tests) $(xtests) $(test-srcs)
|
||||
+binaries-all-notests =
|
||||
+binaries-all-tests = $(tests) $(xtests) $(test-srcs)
|
||||
+binaries-all = $(binaries-all-tests)
|
||||
+binaries-static-notests =
|
||||
+binaries-static-tests =
|
||||
binaries-static =
|
||||
binaries-pie =
|
||||
endif
|
||||
|
||||
-binaries-shared = $(filter-out $(binaries-pie) $(binaries-static), \
|
||||
- $(binaries-all))
|
||||
+binaries-shared-tests = $(filter-out $(binaries-pie) $(binaries-static), \
|
||||
+ $(binaries-all-tests))
|
||||
+binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
|
||||
+ $(binaries-all-notests))
|
||||
|
||||
-ifneq "$(strip $(binaries-shared))" ""
|
||||
-$(addprefix $(objpfx),$(binaries-shared)): %: %.o \
|
||||
+ifneq "$(strip $(binaries-shared-notests))" ""
|
||||
+$(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
$(+link)
|
||||
endif
|
||||
|
||||
+ifneq "$(strip $(binaries-shared-tests))" ""
|
||||
+$(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \
|
||||
+ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
|
||||
+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
+ $(+link-tests)
|
||||
+endif
|
||||
+
|
||||
ifneq "$(strip $(binaries-pie))" ""
|
||||
$(addprefix $(objpfx),$(binaries-pie)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
|
||||
@@ -133,13 +149,20 @@ $(addprefix $(objpfx),$(binaries-pie)): %: %.o \
|
||||
$(+link-pie)
|
||||
endif
|
||||
|
||||
-ifneq "$(strip $(binaries-static))" ""
|
||||
-$(addprefix $(objpfx),$(binaries-static)): %: %.o \
|
||||
+ifneq "$(strip $(binaries-static-notests))" ""
|
||||
+$(addprefix $(objpfx),$(binaries-static-notests)): %: %.o \
|
||||
$(sort $(filter $(common-objpfx)lib%,$(link-libc-static))) \
|
||||
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
$(+link-static)
|
||||
endif
|
||||
|
||||
+ifneq "$(strip $(binaries-static-tests))" ""
|
||||
+$(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \
|
||||
+ $(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \
|
||||
+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
|
||||
+ $(+link-static-tests)
|
||||
+endif
|
||||
+
|
||||
ifeq ($(build-bounded),yes)
|
||||
binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
|
||||
$(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 0c26ce5..9054199 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -71,6 +71,8 @@ others = sprof sln pldd
|
||||
install-bin = sprof pldd
|
||||
others-static = sln
|
||||
install-rootsbin = sln
|
||||
+sln-modules := static-stubs
|
||||
+extra-objs += $(sln-modules:=.o)
|
||||
|
||||
ifeq (yes,$(use-ldconfig))
|
||||
ifeq (yes,$(build-shared))
|
||||
@@ -78,7 +80,7 @@ others-static += ldconfig
|
||||
others += ldconfig
|
||||
install-rootsbin += ldconfig
|
||||
|
||||
-ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon
|
||||
+ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs
|
||||
extra-objs += $(ldconfig-modules:=.o)
|
||||
endif
|
||||
endif
|
||||
@@ -411,6 +413,8 @@ $(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \
|
||||
|
||||
$(objpfx)sprof: $(libdl)
|
||||
|
||||
+$(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
||||
+
|
||||
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
||||
|
||||
$(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
|
||||
diff --git a/elf/static-stubs.c b/elf/static-stubs.c
|
||||
new file mode 100644
|
||||
index 0000000..6c5eebc
|
||||
--- /dev/null
|
||||
+++ b/elf/static-stubs.c
|
||||
@@ -0,0 +1,46 @@
|
||||
+/* Stub implementations of functions to link into statically linked
|
||||
+ programs without needing libgcc_eh.
|
||||
+ Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* Avoid backtrace (and so _Unwind_Backtrace) dependencies from
|
||||
+ sysdeps/unix/sysv/linux/libc_fatal.c. */
|
||||
+#include <sysdeps/posix/libc_fatal.c>
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <unwind.h>
|
||||
+
|
||||
+/* These programs do not use thread cancellation, so _Unwind_Resume
|
||||
+ and the personality routine are never actually called. */
|
||||
+
|
||||
+void
|
||||
+_Unwind_Resume (struct _Unwind_Exception *exc __attribute__ ((unused)))
|
||||
+{
|
||||
+ abort ();
|
||||
+}
|
||||
+
|
||||
+_Unwind_Reason_Code
|
||||
+__gcc_personality_v0 (int version __attribute__ ((unused)),
|
||||
+ _Unwind_Action actions __attribute__ ((unused)),
|
||||
+ _Unwind_Exception_Class exception_class
|
||||
+ __attribute__ ((unused)),
|
||||
+ struct _Unwind_Exception *ue_header
|
||||
+ __attribute__ ((unused)),
|
||||
+ struct _Unwind_Context *context __attribute__ ((unused)))
|
||||
+{
|
||||
+ abort ();
|
||||
+}
|
||||
diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile
|
||||
index 5fd5136..3bdb6b3 100644
|
||||
--- a/ports/sysdeps/arm/Makefile
|
||||
+++ b/ports/sysdeps/arm/Makefile
|
||||
@@ -1,8 +1,16 @@
|
||||
+gnulib-arch = $(elfobjdir)/libgcc-stubs.a
|
||||
+static-gnulib-arch = $(elfobjdir)/libgcc-stubs.a
|
||||
+
|
||||
ifeq ($(subdir),elf)
|
||||
sysdep-dl-routines += tlsdesc dl-tlsdesc
|
||||
sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx tlsdesc dl-tlsdesc
|
||||
sysdep-rtld-routines += aeabi_unwind_cpp_pr1 tlsdesc dl-tlsdesc
|
||||
shared-only-routines += aeabi_unwind_cpp_pr1
|
||||
+
|
||||
+$(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os
|
||||
+ $(build-extra-lib)
|
||||
+
|
||||
+lib-noranlib: $(objpfx)libgcc-stubs.a
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
--
|
||||
1.7.3.4
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Naur eglibc-2.15-17022/misc/sys/select.h eglibc-2.15-17022.patch/misc/sys/select.h
|
||||
--- eglibc-2.15-17022/misc/sys/select.h 2012-02-07 05:47:47.000000000 +0100
|
||||
+++ eglibc-2.15-17022.patch/misc/sys/select.h 2012-02-07 06:12:34.237528007 +0100
|
||||
@@ -52,14 +52,14 @@
|
||||
diff -Naur glibc-2.16.0-old/misc/sys/select.h glibc-2.16.0-new/misc/sys/select.h
|
||||
--- glibc-2.16.0-old/misc/sys/select.h 2012-07-01 17:30:03.000000000 -0700
|
||||
+++ glibc-2.16.0-new/misc/sys/select.h 2012-07-01 17:31:14.000000000 -0700
|
||||
@@ -51,14 +51,14 @@
|
||||
|
||||
|
||||
/* The fd_set member is required to be an array of longs. */
|
@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
echo "getting sources..."
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/libc eglibc-2.14.1-latest
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/ports eglibc-2.14.1-latest/ports
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads eglibc-2.14.1-latest/linuxthreads
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads_db eglibc-2.14.1-latest/linuxthreads_db
|
||||
|
||||
echo "getting version..."
|
||||
cd eglibc-2.14.1-latest
|
||||
SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'`
|
||||
echo $SVN_REV
|
||||
cd ..
|
||||
|
||||
echo "copying sources..."
|
||||
rm -rf eglibc-2.14.1-$SVN_REV
|
||||
cp -R eglibc-2.14.1-latest eglibc-2.14.1-$SVN_REV
|
||||
|
||||
echo "cleaning sources..."
|
||||
find eglibc-2.14.1-$SVN_REV -name .svn -exec rm -rf {} ";"
|
||||
|
||||
echo "packing sources..."
|
||||
tar cvJf eglibc-2.14.1-$SVN_REV.tar.xz eglibc-2.14.1-$SVN_REV
|
||||
|
||||
echo "remove temporary sourcedir..."
|
||||
rm -rf eglibc-2.14.1-$SVN_REV
|
@ -20,26 +20,48 @@
|
||||
################################################################################
|
||||
|
||||
echo "getting sources..."
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/libc eglibc-2.14-latest
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/ports eglibc-2.14-latest/ports
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads eglibc-2.14-latest/linuxthreads
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads_db eglibc-2.14-latest/linuxthreads_db
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_16/libc eglibc-2.16-latest
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_16/ports eglibc-2.16-latest/ports
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_16/linuxthreads/linuxthreads eglibc-2.16-latest/linuxthreads
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_16/linuxthreads/linuxthreads_db eglibc-2.16-latest/linuxthreads_db
|
||||
|
||||
echo "getting version..."
|
||||
cd eglibc-2.14-latest
|
||||
cd eglibc-2.16-latest
|
||||
SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'`
|
||||
echo $SVN_REV
|
||||
cd ..
|
||||
|
||||
echo "copying sources..."
|
||||
rm -rf eglibc-2.14-$SVN_REV
|
||||
cp -R eglibc-2.14-latest eglibc-2.14-$SVN_REV
|
||||
rm -rf eglibc-2.16-$SVN_REV
|
||||
cp -R eglibc-2.16-latest eglibc-2.16-$SVN_REV
|
||||
|
||||
echo "cleaning sources..."
|
||||
find eglibc-2.14-$SVN_REV -name .svn -exec rm -rf {} ";"
|
||||
find eglibc-2.16-$SVN_REV -name .svn -exec rm -rf {} ";"
|
||||
|
||||
echo "packing sources..."
|
||||
tar cvJf eglibc-2.14-$SVN_REV.tar.xz eglibc-2.14-$SVN_REV
|
||||
tar cvJf eglibc-2.16-$SVN_REV.tar.xz eglibc-2.16-$SVN_REV
|
||||
|
||||
echo "remove temporary sourcedir..."
|
||||
rm -rf eglibc-2.14-$SVN_REV
|
||||
rm -rf eglibc-2.16-$SVN_REV
|
||||
|
||||
# now localedef
|
||||
svn co svn://svn.eglibc.org/branches/eglibc-2_16/localedef eglibc-localedef-2.16-latest
|
||||
|
||||
echo "getting version..."
|
||||
cd eglibc-localedef-2.16-latest
|
||||
SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'`
|
||||
echo $SVN_REV
|
||||
cd ..
|
||||
|
||||
echo "copying sources..."
|
||||
rm -rf eglibc-localedef-2.16-$SVN_REV
|
||||
cp -R eglibc-localedef-2.16-latest eglibc-localedef-2.16-$SVN_REV
|
||||
|
||||
echo "cleaning sources..."
|
||||
find eglibc-localedef-2.16-$SVN_REV -name .svn -exec rm -rf {} ";"
|
||||
|
||||
echo "packing sources..."
|
||||
tar cvJf eglibc-localedef-2.16-$SVN_REV.tar.xz eglibc-localedef-2.16-$SVN_REV
|
||||
|
||||
echo "remove temporary sourcedir..."
|
||||
rm -rf eglibc-localedef-2.16-$SVN_REV
|
Loading…
x
Reference in New Issue
Block a user