Browse Source

Fake, Andreas V. Meier:


			
			
				rocklinux
			
			
		
fake 19 years ago
parent
commit
1b90ebd479
6 changed files with 154 additions and 100 deletions
  1. +1
    -1
      package/base/glibc/glibc.conf
  2. +3
    -3
      package/base/glibc/glibc.desc
  3. +59
    -0
      package/base/glibc/glibc23/dl-runtime-fix.patch-x
  4. +10
    -0
      package/base/glibc/glibc23/gcc-hotfix.patch
  5. +16
    -9
      package/base/glibc/glibc23/gcc_eh.patch.cross
  6. +65
    -87
      package/base/glibc/glibc23/ldconfig-glob.patch

+ 1
- 1
package/base/glibc/glibc.conf

@ -143,7 +143,7 @@ glibc_custmain() {
--with-gnu-binutils --enable-add-ons"$ADDONS" $G_PROFILE \
--with-headers=$root/$prefix/include --with-gd=/$prefix \
--with-gd-lib=/$prefix/lib --with-gd-include=/$prefix/include \
--build=${arch_build} --host=${arch_target}
--without-tls --build=${arch_build} --host=${arch_target}
eval $MAKE prefix=/usr slibdir=/lib sysconfdir=/etc all
if [ -z "$pkg_glibc_cross" ]

+ 3
- 3
package/base/glibc/glibc.desc

@ -50,9 +50,9 @@
#endif
#if xpkg == glibc23.*
[V] 2.3.3
[D] 3945721449 glibc-2.3.3.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
[D] 1226336353 glibc-linuxthreads-2.3.3.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
[V] 2.3.5
[D] 741938744 glibc-2.3.5.tar.bz2 ftp://ftp.gnu.org/gnu/glibc/
[D] 3398805477 glibc-linuxthreads-2.3.5.tar.bz2 ftp://ftp.gnu.org/gnu/glibc/
#endif
[CD] <COPY> cp $cachedir/glibc2[23].cache $confdir/$pkg.cache

+ 59
- 0
package/base/glibc/glibc23/dl-runtime-fix.patch-x

@ -0,0 +1,59 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/glibc/glibc23/dl-runtime-fix.patch
# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./elf/dl-runtime.c.orig 2004-09-02 12:06:09.000000000 +0200
+++ ./elf/dl-runtime.c 2004-09-02 12:08:02.000000000 +0200
@@ -46,6 +46,9 @@
#ifndef ELF_MACHINE_NO_PLT
static ElfW(Addr) __attribute_used__
+#ifdef ELF_MACHINE_RUNTIME_FIXUP_ATTR
+ ELF_MACHINE_RUNTIME_FIXUP_ATTR
+#endif
fixup (
# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
@@ -133,6 +136,9 @@
#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
static ElfW(Addr) __attribute_used__
+#ifdef ELF_MACHINE_RUNTIME_PROFILE_FIXUP_ATTR
+ ELF_MACHINE_RUNTIME_PROFILE_FIXUP_ATTR
+#endif
profile_fixup (
#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
--- ./sysdeps/i386/dl-machine.h.orig 2004-09-02 12:05:52.000000000 +0200
+++ ./sysdeps/i386/dl-machine.h 2004-09-02 12:08:20.000000000 +0200
@@ -154,11 +154,13 @@
destroys the passed register information. */
/* GKM FIXME: Fix trampoline to pass bounds so we can do
without the `__unbounded' qualifier. */
+#define ELF_MACHINE_RUNTIME_FIXUP_ATTR __attribute__ ((regparm (2)))
+#define ELF_MACHINE_RUNTIME_PROFILE_FIXUP_ATTR __attribute__ ((regparm (3)))
static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
- __attribute__ ((regparm (2), unused));
+ __attribute_used__ ELF_MACHINE_RUNTIME_FIXUP_ATTR;
static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
ElfW(Addr) retaddr)
- __attribute__ ((regparm (3), unused));
+ __attribute_used__ ELF_MACHINE_RUNTIME_PROFILE_FIXUP_ATTR;
# endif
/* This code is used in dl-runtime.c to call the `fixup' function

+ 10
- 0
package/base/glibc/glibc23/gcc-hotfix.patch

@ -0,0 +1,10 @@
--- ./sysdeps/i386/i686/memcmp.S.orig 2005-02-10 15:32:56.000000000 +0200
+++ ./sysdeps/i386/i686/memcmp.S 2005-02-10 15:47:35.000000000 +0200
@@ -351,7 +351,6 @@
popl %esi
RETURN
- .section .rodata
ALIGN (2)
L(table_32bytes) :
.long L(0bytes) - . + 0x0

+ 16
- 9
package/base/glibc/glibc23/gcc_eh.patch.cross

@ -17,14 +17,21 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./Makeconfig 2003-09-17 10:36:10.000000000 +0200
+++ ./Makeconfig.patch 2004-09-06 17:52:29.000000000 +0200
@@ -511,7 +511,7 @@
link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
ifndef gnulib
-gnulib := -lgcc -lgcc_eh
+gnulib := -lgcc
diff -ruN glibc-2.3.4/Makeconfig glibc-2.3.4-new/Makeconfig
--- glibc-2.3.4/Makeconfig 2004-12-15 19:51:47.000000000 +0100
+++ glibc-2.3.4-new/Makeconfig 2005-03-27 15:47:19.000000000 +0200
@@ -514,12 +514,12 @@
libunwind = -lunwind
endif
ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh $(libunwind)
+ libgcc_eh := $(libunwind)
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)
+static-gnulib := -lgcc $(libunwind)
libc.so-gnulib := -lgcc
endif
ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)

+ 65
- 87
package/base/glibc/glibc23/ldconfig-glob.patch

@ -1,102 +1,80 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/glibc/glibc23/ldconfig-glob.patch
# ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./elf/ldconfig.c.orig 2002-09-14 12:12:51.000000000 +0200
+++ ./elf/ldconfig.c 2002-09-14 12:52:50.000000000 +0200
@@ -23,6 +23,7 @@
#include <elf.h>
#include <error.h>
#include <errno.h>
+#include <glob.h>
#include <inttypes.h>
#include <libintl.h>
#include <stdio.h>
@@ -302,8 +303,10 @@
{
char *equal_sign;
struct dir_entry *entry;
+ struct dir_entry *real_entry;
unsigned int i;
struct stat64 stat_buf;
+ glob_t globres;
entry = xmalloc (sizeof (struct dir_entry));
entry->next = NULL;
@@ -338,19 +341,50 @@
--i;
}
This is an alternative ldconfig wildcard expansion (glob) patch for
recent glibc's.
- Valentin Ziegler <valentin@rocklinux-consulting.de>
--- ./elf/ldconfig.c.orig 2004-09-14 13:28:34.000000000 +0200
+++ ./elf/ldconfig.c 2004-09-14 14:19:07.000000000 +0200
@@ -359,21 +359,57 @@
if (opt_chroot)
path = chroot_canon (opt_chroot, path);
- if (stat64 (entry->path, &stat_buf))
- struct stat64 stat_buf;
- if (path == NULL || stat64 (path, &stat_buf))
- {
- if (opt_verbose)
- error (0, errno, _("Can't stat %s"), entry->path);
- free (entry->path);
- free (entry);
- return;
- }
+ if ( glob(entry->path, GLOB_ONLYDIR, NULL, &globres) == 0 )
+ {
+ for (i=0; i<globres.gl_pathc; i++)
+ {
+ real_entry = xmalloc (sizeof (struct dir_entry));
+ memcpy (real_entry, entry, sizeof (struct dir_entry));
+ real_entry->path = xstrdup (globres.gl_pathv[i]);
- else
- {
- entry->ino = stat_buf.st_ino;
- entry->dev = stat_buf.st_dev;
+ /* assume path is a pattern. - Valentin */
- entry->ino = stat_buf.st_ino;
- entry->dev = stat_buf.st_dev;
+ if (stat64 (real_entry->path, &stat_buf))
+ {
+ if (opt_verbose)
+ error (0, errno, _("Can't stat %s"), real_entry->path);
+ free (real_entry->path);
+ free (real_entry);
+ }
+ else
+ {
+ real_entry->ino = stat_buf.st_ino;
+ real_entry->dev = stat_buf.st_dev;
+
+ add_single_dir (real_entry, 1);
+ }
+ }
+ globfree (&globres);
+ free (entry->path);
+ free (entry);
+ }
+ else
- add_single_dir (entry, 1);
- }
+ glob_t result;
+ if (glob(path, GLOB_ONLYDIR, NULL, &result) == 0) {
+
+ for (int j = 0; j < result.gl_pathc; j++)
+ {
+ if (stat64 (entry->path, &stat_buf))
+ /* create a copy entry with expanded path */
+ struct dir_entry *real_entry = xmalloc (sizeof (struct dir_entry));
+ memcpy (real_entry, entry, sizeof (struct dir_entry));
+ real_entry->path = xstrdup (result.gl_pathv[j]);
+
+ struct stat64 stat_buf;
+ if (real_entry -> path == NULL || stat64 (real_entry -> path, &stat_buf))
+ {
+ if (opt_verbose)
+ error (0, errno, _("Can't stat %s"), entry->path);
+ free (entry->path);
+ free (entry);
+ error (0, errno, _("Can't stat %s"), real_entry->path);
+ free (real_entry->path);
+ free (real_entry);
+ }
+ else
+ {
+ real_entry->ino = stat_buf.st_ino;
+ real_entry->dev = stat_buf.st_dev;
+
+ add_single_dir (real_entry, 1);
+ }
+ else
+ {
+ entry->ino = stat_buf.st_ino;
+ entry->dev = stat_buf.st_dev;
- add_single_dir (entry, 1);
+ add_single_dir (entry, 1);
+ }
+ }
}
+
+ } else {
+ /* fallback to code from glibc with orig. error handling */
+ struct stat64 stat_buf;
+ if (path == NULL || stat64 (path, &stat_buf))
+ {
+ if (opt_verbose)
+ error (0, errno, _("Can't stat %s"), entry->path);
+ free (entry->path);
+ free (entry);
+ }
+ else
+ {
+ entry->ino = stat_buf.st_ino;
+ entry->dev = stat_buf.st_dev;
+
+ add_single_dir (entry, 1);
+ }
+ }
+
+ globfree (&result);
+
+ /* ******************************* */
if (opt_chroot)
free (path);

Loading…
Cancel
Save