Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 17 years ago
parent
commit
66be03cda0
10 changed files with 2902 additions and 0 deletions
  1. +10
    -0
      package/base/findutils/glibc27-hotfix.patch
  2. +14
    -0
      package/base/glibc/glibc27/RTLD_SINGLE_THREAD_P.patch
  3. +425
    -0
      package/base/glibc/glibc27/glibc-2.6-cross_hacks-1.patch.diff
  4. +46
    -0
      package/base/glibc/glibc27/glibc-2.7-alpha_ioperm_fix-1.patch
  5. +2046
    -0
      package/base/glibc/glibc27/glibc-2.7-branch_update-1.patch
  6. +136
    -0
      package/base/glibc/glibc27/glibc-2.7-libgcc_eh-1.patch
  7. +56
    -0
      package/base/glibc/glibc27/glibc-2.7-localedef_segfault-1.patch
  8. +99
    -0
      package/base/glibc/glibc27/ldconfig-glob.patch
  9. +14
    -0
      package/base/glibc/glibc27/zrelrocheck.patch
  10. +56
    -0
      package/base/tar/wchar_hotfix.patch

+ 10
- 0
package/base/findutils/glibc27-hotfix.patch

@ -0,0 +1,10 @@
--- ./gnulib/lib/mbuiter.h.orig 2007-11-04 11:35:42.000000000 +0000
+++ ./gnulib/lib/mbuiter.h 2007-11-04 11:37:06.000000000 +0000
@@ -94,6 +94,7 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <malloc.h>
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.

+ 14
- 0
package/base/glibc/glibc27/RTLD_SINGLE_THREAD_P.patch

@ -0,0 +1,14 @@
copied from http://www.nabble.com/-PATCH--Define-RTLD_SINGLE_THREAD_P-on-ARM-tf3814888.html
--- glibc-2.6/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-03 11:03:16.000000000 +0200
+++ glibc-2.6/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h 2007-07-03 11:04:30.000000000 +0200
@@ -126,3 +126,9 @@
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif

+ 425
- 0
package/base/glibc/glibc27/glibc-2.6-cross_hacks-1.patch.diff

@ -0,0 +1,425 @@
Copied from www.linuxfromscratch.org to ROCK Linux.
Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
Date: 2006-11-26
Initial Package Version: 2.5
Rediffed against 2.6 by Joe Ciccone
Origin: Joe Ciccone
Upstream Status: Unknown
Description: Adds native compile support to the build system then uses that
support to build zic-native, for installing timezone info,
rpcgen-native, for building librpcsvc.a, and localedef-native,
for creating the locale-archive.
diff -Naur glibc-2.6.orig/iconv/Makefile glibc-2.6/iconv/Makefile
--- glibc-2.6.orig/iconv/Makefile 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/iconv/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -57,6 +57,9 @@
iconvconfig.h
others = iconv_prog iconvconfig
+ifneq ($(cross-compiling),no)
+others-native = iconvconfig-native
+endif
install-others-programs = $(inst_bindir)/iconv
install-sbin = iconvconfig
@@ -79,6 +82,7 @@
$(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
$(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
+$(objpfx)iconvconfig-native: $(iconvconfig-modules:%=$(objpfx)%-native.o)
ifneq ($(cross-compiling),yes)
xtests: test-iconvconfig
--- glibc-2.6.orig/iconvdata/Makefile 2007-07-02 15:20:35.000000000 -0400
+++ glibc-2.6/iconvdata/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -312,23 +312,25 @@
headers: $(addprefix $(objpfx), $(generated-modules:=.h))
+ifeq ($(cross-compiling),no)
+iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
+ $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
+ $(common-objpfx)iconv/iconvconfig
+else
+iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
+ $(common-objpfx)iconv/iconvconfig-native
+endif
+
$(addprefix $(inst_gconvdir)/, $(modules.so)): \
$(inst_gconvdir)/%: $(objpfx)% $(+force)
$(do-install-program)
$(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
$(do-install)
-ifeq (no,$(cross-compiling))
# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
# if this libc has more gconv modules than the previously installed one.
if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
- LC_ALL=C LANGUAGE=C \
- $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
- $(common-objpfx)iconv/iconvconfig \
- $(addprefix --prefix=,$(install_root)); \
+ $(iconvconfig-cmd) $(addprefix --prefix=,$(install_root)); \
fi
-else
- @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
-endif
endif # build-shared = yes
--- glibc-2.6.orig/include-native/bits/libc-tsd.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/bits/libc-tsd.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1,3 @@
+#ifndef __libc_tsd_define
+#define __libc_tsd_define(A,B)
+#endif
--- glibc-2.6.orig/include-native/config.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/config.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1 @@
+/* Empty */
--- glibc-2.6.orig/include-native/gnu/stubs.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/gnu/stubs.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1 @@
+/* Empty */
--- glibc-2.6.orig/include-native/intl/loadinfo.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/intl/loadinfo.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1,4 @@
+#ifndef LOADINFO_H
+#define LOADINFO_H
+struct loaded_l10nfile;
+#endif
--- glibc-2.6.orig/include-native/libintl.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/libintl.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1,13 @@
+#include_next <libintl.h>
+
+#ifndef _
+#define _(X) (X)
+#endif
+
+#ifndef N_
+#define N_(X) (X)
+#endif
+
+#ifndef _libc_intl_domainname
+#define _libc_intl_domainname "libc"
+#endif
--- glibc-2.6.orig/include-native/symbol-hacks.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/symbol-hacks.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1 @@
+/* Empty */
--- glibc-2.6.orig/include-native/tls.h 1969-12-31 19:00:00.000000000 -0500
+++ glibc-2.6/include-native/tls.h 2007-07-02 15:28:24.000000000 -0400
@@ -0,0 +1,11 @@
+#ifndef _include_tls_h
+#define _include_tls_h 1
+
+#if USE_TLS && HAVE___THREAD \
+ && (!defined NOT_IN_libc || defined IS_IN_libpthread)
+# define USE___THREAD 1
+#else
+# define USE___THREAD 0
+#endif
+
+#endif
--- glibc-2.6.orig/locale/Makefile 2007-07-02 15:20:37.000000000 -0400
+++ glibc-2.6/locale/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -44,6 +44,9 @@
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
xlocale localename global-locale coll-lookup
others = localedef locale
+ifneq ($(cross-compiling),no)
+others-native = localedef-native
+endif
#others-static = localedef locale
install-bin = localedef locale
extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
@@ -81,6 +84,12 @@
$(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
$(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
+ifneq ($(cross-compiling),no)
+$(objpfx)localedef-native: $(localedef-modules:%=$(objpfx)%-native.o)
+$(objpfx)localedef-native: $(localedef-aux:%=$(objpfx)%-native.o)
+$(objpfx)localedef-native: $(lib-modules:%=$(objpfx)%-native.o)
+endif
+
C-translit.h: C-translit.h.in gen-translit.pl
$(PERL) gen-translit.pl < $< > $@.tmp
mv -f $@.tmp $@
--- glibc-2.6.orig/localedata/Makefile 2007-07-02 15:20:34.000000000 -0400
+++ glibc-2.6/localedata/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -206,8 +206,13 @@
INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
# Sometimes the whole collection of locale files should be installed.
+ifeq ($(cross-compiling),no)
LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
$(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
+else
+LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+$(common-objpfx)locale/localedef-native
+endif
install-locales: $(INSTALL-SUPPORTED-LOCALES)
install-locales-dir:
--- glibc-2.6.orig/Makeconfig 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/Makeconfig 2007-07-02 15:32:37.000000000 -0400
@@ -445,6 +445,13 @@
$(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
endif
+# Command for linking programs against the host system.
+ifndef +link-native
++link-native = $(BUILD_CC) -static -g -o $@ $^ \
+ $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ $(link-extra-libs)
+endif
# Command for statically linking bounded-pointer programs with the C library.
ifndef +link-bounded
+link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
@@ -658,6 +665,8 @@
$(+sysdep-includes) $(includes) \
$(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
++includes-native = -I$(..)include-native -I$(objpfx) -I.
+
# Since libio has several internal header files, we use a -I instead
# of many little headers in the include directory.
libio-include = -I$(..)libio
@@ -672,10 +681,15 @@
$(foreach lib,$(libof-$(basename $(@F))) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
+CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \
+ $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \
+ $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
$(CFLAGS-$(@F))
+override CFLAGS-native = -std=gnu99 $(default_cflags) $(+gccwarn-c) \
+ $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
override CXXFLAGS = $(c++-sysincludes) \
$(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
$(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
--- glibc-2.6.orig/Makerules 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/Makerules 2007-07-02 15:28:24.000000000 -0400
@@ -292,6 +292,9 @@
object-suffixes-left := $(all-object-suffixes)
include $(o-iterator)
+$(objpfx)%-native.o: %.c $(before-compile)
+ $(native-compile-command.c)
+
# Omit the objpfx rules when building in the source tree, because
# objpfx is empty and so these rules just override the ones above.
ifdef objpfx
@@ -368,6 +371,8 @@
compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
+# Native commands
+native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
# GCC can grok options after the file name, and it looks nicer that way.
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
@@ -377,6 +382,8 @@
COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
$(ASFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
+# Native commands
+native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native)
# We need this for the output to go in the right place. It will default to
# empty if make was configured to work with a cc that can't grok -c and -o
@@ -1168,7 +1175,7 @@
$(make-target-directory)
$(patsubst %/,cd % &&,$(objpfx)) \
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
- $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
+ $(addprefix $(shell pwd)/, $^) -o $(@F)
endef
# Command to compile $< in $(common-objdir) using the native libraries.
--- glibc-2.6.orig/malloc/Makefile 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/malloc/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -73,10 +73,6 @@
endif
endif
-# Unless we get a test for the availability of libgd which also works
-# for cross-compiling we disable the memusagestat generation in this
-# situation.
-ifneq ($(cross-compiling),yes)
# If the gd library is available we build the `memusagestat' program.
ifneq ($(LIBGD),no)
others: $(objpfx)memusage
@@ -91,7 +87,6 @@
# is to presume that the standard system headers will be ok for this file.
$(objpfx)memusagestat.o: sysincludes = # nothing
endif
-endif
# Another goal which can be used to override the configure decision.
.PHONY: do-memusagestat
--- glibc-2.6.orig/Rules 2007-07-02 15:20:35.000000000 -0400
+++ glibc-2.6/Rules 2007-07-02 15:28:24.000000000 -0400
@@ -87,7 +87,7 @@
.PHONY: others tests
ifeq ($(build-programs),yes)
-others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
+others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs))
else
others: $(addprefix $(objpfx),$(extra-objs))
endif
@@ -106,9 +106,11 @@
ifeq ($(build-programs),yes)
binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
binaries-static = $(others-static) $(tests-static) $(xtests-static)
+binaries-native = $(others-native)
else
binaries-all = $(tests) $(xtests) $(test-srcs)
binaries-static =
+binaries-native =
endif
binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
@@ -127,6 +129,11 @@
$(+link-static)
endif
+ifneq "$(strip $(binaries-native))" ""
+$(addprefix $(objpfx),$(binaries-native)): %: %.o
+ $(+link-native)
+endif
+
ifeq ($(build-bounded),yes)
binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
$(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
--- glibc-2.6.orig/sunrpc/Makefile 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/sunrpc/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -70,6 +70,9 @@
clnt_unix svc_unix create_xid xdr_intXX_t
others := rpcinfo
+ifneq ($(cross-compiling),no)
+others-native := rpcgen-native
+endif
install-bin := rpcgen
install-sbin := rpcinfo
rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
@@ -98,15 +101,12 @@
$(resolvobjdir)/libresolv.a
endif
-ifeq (no,$(cross-compiling))
-# We can only build this library if we can run the rpcgen we build.
headers += $(rpcsvc:%.x=rpcsvc/%.h)
extra-libs := librpcsvc
extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
librpcsvc-routines = $(rpcsvc:%.x=x%)
librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
omit-deps = $(librpcsvc-routines)
-endif
CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag)
CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag)
@@ -136,13 +136,26 @@
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link)
+ifneq ($(cross-compiling),no)
+rpcgen.c:
+ touch rpcgen.c
+
+$(objpfx)rpcgen-native: $(addprefix $(objpfx),$(rpcgen-objs:%.o=%-native.o))
+endif
+
# This makes sure -DNOT_IN_libc is passed for all these modules.
cpp-srcs-left := $(rpcgen-objs:.o=.c)
lib := nonlib
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
# Tell rpcgen where to find the C preprocessor.
+ifeq ($(cross-compiling),no)
rpcgen-cmd = CPP='$(CC) -E -x c-header' $(built-program-cmd) -Y ../scripts
+rpcgen = $(objpfx)rpcgen
+else
+rpcgen-cmd = CPP='$(CC) -E -x c-header' $(objpfx)rpcgen-native -Y ../scripts
+rpcgen = $(objpfx)rpcgen-native
+endif
# Install the rpc data base file.
$(inst_sysconfdir)/rpc: etc.rpc $(+force)
@@ -153,7 +166,7 @@
# relinked.
$(rpcsvc:%.x=$(objpfx)rpcsvc/%.h): $(objpfx)rpcsvc/%.h: $(objpfx)rpcsvc/%.stmp
@:
-$(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(objpfx)rpcgen
+$(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(rpcgen)
$(make-target-directory)
-@rm -f ${@:stmp=T} $@
$(rpcgen-cmd) -h $< -o ${@:stmp=T}
@@ -163,7 +176,7 @@
# Generate the rpcsvc XDR functions with rpcgen.
$(rpcsvc:%.x=$(objpfx)x%.c): $(objpfx)x%.c: $(objpfx)x%.stmp
@:
-$(objpfx)x%.stmp: rpcsvc/%.x $(objpfx)rpcgen
+$(objpfx)x%.stmp: rpcsvc/%.x $(rpcgen)
-@rm -f ${@:stmp=T} $@
$(rpcgen-cmd) -c $< -o ${@:stmp=T}
$(move-if-change) $(@:stmp=T) $(@:stmp=c)
--- glibc-2.6.orig/timezone/Makefile 2007-07-02 15:20:36.000000000 -0400
+++ glibc-2.6/timezone/Makefile 2007-07-02 15:28:24.000000000 -0400
@@ -28,6 +28,9 @@
extra-objs := scheck.o ialloc.o
others := zdump zic
+ifneq ($(cross-compiling),no)
+others-native := zic-native
+endif
tests := test-tz tst-timezone
tzbases := africa antarctica asia australasia europe northamerica \
@@ -69,13 +72,10 @@
$(addprefix $(inst_zonedir)/, \
$(posixrules-file)))
-ifeq ($(cross-compiling),no)
-# Don't try to install the zoneinfo files since we can't run zic.
install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
$(zonenames:%=posix/%) \
$(zonenames:%=right/%)) \
$(installed-localtime-file) $(installed-posixrules-file)
-endif
ifeq ($(have-ksh),yes)
install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
@@ -128,7 +128,11 @@
# We have to use `-d $(inst_zonedir)' to explictly tell zic where to
# place the output files although $(zonedir) is compiled in. But the
# user might have set $(install_root) on the command line of `make install'.
+ifeq ($(cross-compiling),no)
zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
+else
+zic-cmd = $(common-objpfx)/timezone/zic-native -d $(inst_zonedir)
+endif
tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
-y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
@@ -158,8 +162,10 @@
$(zic-cmd) -p $(posixrules)
endif
-
$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
+ifneq ($(cross-compiling),no)
+$(objpfx)zic-native: $(objpfx)scheck-native.o $(objpfx)ialloc-native.o
+endif
tz-cflags = -DTZDIR='"$(zonedir)"' \
-DTZDEFAULT='"$(localtime-file)"' \

+ 46
- 0
package/base/glibc/glibc27/glibc-2.7-alpha_ioperm_fix-1.patch

@ -0,0 +1,46 @@
Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
Date: 2007-05-19
Initial Package Version: 2.6
Origin: Joe Ciccone
Upstream Status: Unknown
Description: Fixes a build issue with alpha on some processors. The
instructions being modified are specific to ev56/ev6.
diff -Naur glibc-2.6.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.6/sysdeps/unix/sysv/linux/alpha/ioperm.c
--- glibc-2.6.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2007-05-07 15:57:20.000000000 -0700
+++ glibc-2.6/sysdeps/unix/sysv/linux/alpha/ioperm.c 2007-05-19 13:29:49.000000000 -0700
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
{
- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
}
static inline void
stw_mb(unsigned short val, unsigned long addr)
{
- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
}
static inline void
@@ -356,7 +356,7 @@
unsigned long int addr = dense_port_to_cpu_addr (port);
unsigned char r;
- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
return r;
}
@@ -366,7 +366,7 @@
unsigned long int addr = dense_port_to_cpu_addr (port);
unsigned short r;
- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
return r;
}

+ 2046
- 0
package/base/glibc/glibc27/glibc-2.7-branch_update-1.patch
File diff suppressed because it is too large
View File


+ 136
- 0
package/base/glibc/glibc27/glibc-2.7-libgcc_eh-1.patch

@ -0,0 +1,136 @@
Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
Date: 2006-11-09
Initial Package Version: 2.5
Origin: Joe Ciccone
Upstream Status: Unknown
Description: Checks to see if libgcc_eh has been provided by gcc. If it has
the glibc will attempt to link to it.
Rediffed for 2.7 by Jim Gifford
diff -Naur glibc-2.7.orig/Makeconfig glibc-2.7/Makeconfig
--- glibc-2.7.orig/Makeconfig 2007-07-05 15:03:47.000000000 -0700
+++ glibc-2.7/Makeconfig 2007-10-20 15:23:21.000000000 -0700
@@ -524,12 +524,20 @@
libunwind = -lunwind
endif
ifneq ($(have-as-needed),yes)
+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.7.orig/config.make.in glibc-2.7/config.make.in
--- glibc-2.7.orig/config.make.in 2007-08-25 15:25:24.000000000 -0700
+++ glibc-2.7/config.make.in 2007-10-20 15:23:21.000000000 -0700
@@ -60,6 +60,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.7.orig/configure glibc-2.7/configure
--- glibc-2.7.orig/configure 2007-10-18 04:22:23.000000000 -0700
+++ glibc-2.7/configure 2007-10-20 21:26:18.000000000 -0700
@@ -716,6 +716,7 @@
BISON
VERSIONING
libc_cv_cc_with_libunwind
+libc_cv_cc_with_libgcc_eh
libc_cv_Bgroup
libc_cv_libgcc_s_suffix
libc_cv_as_needed
@@ -6045,6 +6046,33 @@
fi
+ { echo "$as_me:$LINENO: checking whether to link against libgcc_eh" >&5
+echo $ECHO_N "checking whether to link against libgcc_eh... $ECHO_C" >&6; }
+if test "${libc_cv_cc_with_libgcc_eh+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ 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*
+fi
+{ echo "$as_me:$LINENO: result: $libc_cv_cc_with_libgcc_eh" >&5
+echo "${ECHO_T}$libc_cv_cc_with_libgcc_eh" >&6; }
+
+ if test $libc_cv_cc_with_libgcc_eh = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CC_WITH_LIBGCC_EH 1
+_ACEOF
+
+ fi
+
{ echo "$as_me:$LINENO: checking for -z nodelete option" >&5
echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6; }
if test "${libc_cv_z_nodelete+set}" = set; then
@@ -9243,6 +9271,7 @@
BISON!$BISON$ac_delim
VERSIONING!$VERSIONING$ac_delim
libc_cv_cc_with_libunwind!$libc_cv_cc_with_libunwind$ac_delim
+libc_cv_cc_with_libgcc_eh!$libc_cv_cc_with_libgcc_eh$ac_delim
libc_cv_Bgroup!$libc_cv_Bgroup$ac_delim
libc_cv_libgcc_s_suffix!$libc_cv_libgcc_s_suffix$ac_delim
libc_cv_as_needed!$libc_cv_as_needed$ac_delim
@@ -9294,7 +9323,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 53; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff -Naur glibc-2.7.orig/configure.in glibc-2.7/configure.in
--- glibc-2.7.orig/configure.in 2007-06-07 20:16:36.000000000 -0700
+++ glibc-2.7/configure.in 2007-10-20 15:23:21.000000000 -0700
@@ -1388,6 +1388,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

+ 56
- 0
package/base/glibc/glibc27/glibc-2.7-localedef_segfault-1.patch

@ -0,0 +1,56 @@
Submitted By: Jim Gifford (patches at jg555 dot com)
Date: 2007-05-19
Initial Package Version: 2.6
Origin: Debian
Upstream Status: Unknown
Description: Fixes Segfault when using localdef.
This problem is only noticed when using PaX
and some architectures besides x86.
See debian bug # 231438
diff -Naur glibc-2.6.orig/locale/programs/3level.h glibc-2.6/locale/programs/3level.h
--- glibc-2.6.orig/locale/programs/3level.h 2005-12-06 21:47:27.000000000 -0800
+++ glibc-2.6/locale/programs/3level.h 2007-05-19 13:38:01.000000000 -0700
@@ -202,6 +202,42 @@
}
}
}
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+ to inlined functions. Help it a little bit with this hack. */
+#define wchead_table_iterate(tp, fn) \
+do \
+ { \
+ struct wchead_table *t = (tp); \
+ uint32_t index1; \
+ for (index1 = 0; index1 < t->level1_size; index1++) \
+ { \
+ uint32_t lookup1 = t->level1[index1]; \
+ if (lookup1 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup1_shifted = lookup1 << t->q; \
+ uint32_t index2; \
+ for (index2 = 0; index2 < (1 << t->q); index2++) \
+ { \
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
+ if (lookup2 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup2_shifted = lookup2 << t->p; \
+ uint32_t index3; \
+ for (index3 = 0; index3 < (1 << t->p); index3++) \
+ { \
+ struct element_t *lookup3 \
+ = t->level3[index3 + lookup2_shifted]; \
+ if (lookup3 != NULL) \
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
+ lookup3); \
+ } \
+ } \
+ } \
+ } \
+ } \
+ } while (0)
+
#endif
#ifndef NO_FINALIZE

+ 99
- 0
package/base/glibc/glibc27/ldconfig-glob.patch

@ -0,0 +1,99 @@
# --- 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 - 2006 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 ---
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);
- 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;
+ /* assume path is a pattern. - Valentin */
- 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++)
+ {
+ /* 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"), 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 {
+ /* 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);

+ 14
- 0
package/base/glibc/glibc27/zrelrocheck.patch

@ -0,0 +1,14 @@
Glibc checks if the linker supports the -z relro option by reading the output
of '$CC -v --help', but at least with native builds in stage 3, only
'$CC -v --target-help' would give the needed output.
--- ./configure 2007-05-18 04:07:18.000000000 +0200
+++ ./configure 2007-05-31 00:09:59.000000000 +0200
@@ -6134,6 +6134,7 @@
case "$base_machine" in
i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
+ libc_cv_z_relro=yes
{ echo "$as_me:$LINENO: checking for -z relro option" >&5
echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6; }
if test "${libc_cv_z_relro+set}" = set; then

+ 56
- 0
package/base/tar/wchar_hotfix.patch

@ -0,0 +1,56 @@
wchar.h must be included directly (and not via _G_config.h, which happens eg.
when including stdio.h before wchar.h). strange - can't reproduce it in the
chroot filesystem. ~~ Clifford
diff -ru tar-1.19/lib/mbchar.c tar-1.19-x/lib/mbchar.c
--- tar-1.19/lib/mbchar.c 2007-09-28 13:11:36.000000000 +0000
+++ tar-1.19-x/lib/mbchar.c 2007-11-04 13:01:32.000000000 +0000
@@ -14,6 +14,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+// HACK! HACK!
+#include <wchar.h>
#include <config.h>
diff -ru tar-1.19/lib/mbscasecmp.c tar-1.19-x/lib/mbscasecmp.c
--- tar-1.19/lib/mbscasecmp.c 2007-09-28 13:11:36.000000000 +0000
+++ tar-1.19-x/lib/mbscasecmp.c 2007-11-04 13:02:16.000000000 +0000
@@ -17,6 +17,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+// HACK! HACK!
+#include <wchar.h>
+
#include <config.h>
/* Specification. */
diff -ru tar-1.19/lib/regex.c tar-1.19-x/lib/regex.c
--- tar-1.19/lib/regex.c 2007-09-28 13:11:36.000000000 +0000
+++ tar-1.19-x/lib/regex.c 2007-11-04 13:03:16.000000000 +0000
@@ -17,6 +17,9 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+// HACK! HACK!
+#include <wchar.h>
+
#include <config.h>
/* Make sure noone compiles this code with a C++ compiler. */
diff -ru tar-1.19/lib/vasnprintf.c tar-1.19-x/lib/vasnprintf.c
--- tar-1.19/lib/vasnprintf.c 2007-09-28 13:11:37.000000000 +0000
+++ tar-1.19-x/lib/vasnprintf.c 2007-11-04 13:03:49.000000000 +0000
@@ -44,6 +44,9 @@
DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t.
DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */
+// HACK! HACK!
+#include <wchar.h>
+
/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */

Loading…
Cancel
Save