Add glibc: 2.5.1 - 2.6 - 2.6.1.

Apply the same patches as glibc 2.5: they apply without any problem (except for ridiculously small offsets).
This commit is contained in:
Yann E. MORIN" 2007-08-11 10:57:18 +00:00
parent 25f164c32f
commit 06153223e2
28 changed files with 1623 additions and 0 deletions

View File

@ -106,6 +106,21 @@ config LIBC_V_2_5
bool
prompt "2.5"
config LIBC_V_2_5_1
bool
prompt "2.5.1 (EXPERIMENTAL)"
depends on EXPERIMENTAL
config LIBC_V_2_6
bool
prompt "2.6 (EXPERIMENTAL)"
depends on EXPERIMENTAL
config LIBC_V_2_6_1
bool
prompt "2.6.1 (EXPERIMENTAL)"
depends on EXPERIMENTAL
# CT_INSERT_VERSION_ABOVE
# Don't remove above line!
endchoice
@ -133,6 +148,9 @@ config LIBC_VERSION
default "2.3.6" if LIBC_V_2_3_6
default "2.4" if LIBC_V_2_4
default "2.5" if LIBC_V_2_5
default "2.5.1" if LIBC_V_2_5_1
default "2.6" if LIBC_V_2_6
default "2.6.1" if LIBC_V_2_6_1
# CT_INSERT_VERSION_STRING_ABOVE
# Don't remove above line!

View File

@ -0,0 +1,70 @@
Fixes error
dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
e.o] Error 1
make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822'
make: *** [all] Error 2
-----------------
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
-----------------
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_3-branch
Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
Modified files:
sysdeps/s390/s390-64: dl-machine.h
sysdeps/s390/s390-32: dl-machine.h
Log message:
2004-07-10 GOTO Masanori <gotom@debian.or.jp>
[BZ #398]
* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
directive.
* sysdeps/s390/s390-64/dl-machine.h: Likewise.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
retrieving revision 1.19.4.1
retrieving revision 1.19.4.2
diff -u -r1.19.4.1 -r1.19.4.2
--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
retrieving revision 1.20.4.1
retrieving revision 1.20.4.2
diff -u -r1.20.4.1 -r1.20.4.2
--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390

View File

@ -0,0 +1,59 @@
Fixes
../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
%changelog
+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
+- fix build on 64-bit arches with new GCC
Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
Branch: fedora-branch
CVS Tags: fedora-glibc-2_3_4-18
Changes since 1.4: +2 -0 lines
Diff to previous 1.4 (colored)
* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
* sysdeps/wordsize-64/wcstol_l.c: Likewise.
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,7 +8,9 @@
#undef ____strtoll_l_internal
#undef __strtoll_l
#undef strtoll_l
+#if !UNSIGNED
strong_alias (____strtol_l_internal, ____strtoll_l_internal)
libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
weak_alias (__strtol_l, __strtoll_l)
weak_alias (__strtol_l, strtoll_l)
+#endif
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,6 +8,8 @@
#undef ____wcstoll_l_internal
#undef __wcstoll_l
#undef wcstoll_l
+#if !UNSIGNED
strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
weak_alias (__wcstol_l, __wcstoll_l)
weak_alias (__wcstol_l, wcstoll_l)
+#endif
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,187 @@
Fixes
elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
...
when building glibc-2.3.x on cygwin
Idea from
http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
Basically, make glibc use .oST as suffix for 'object static'
instead of .oS, since cygwin has trouble distinguishing .os from .oS
(Original patch had .on, but .oST is more mnemonic for 'object static')
glibc-linuxthreads-2.3.5 also requires a patch, see
../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
Message-ID: <4282FCBA.3040000@unicontrols.cz>
Date: Thu, 12 May 2005 08:50:34 +0200
From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
CC: crossgcc@sources.redhat.com
Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
Hi Dan,
following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
--
Petr Cvachoucek
Unicontrols a.s.
http://www.unicontrols.cz
]
diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
@@ -472,7 +472,7 @@
# run the linked programs.
link-libc = -Wl,-rpath-link=$(rpath-link) \
$(common-objpfx)libc.so$(libc.so-version) \
- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
endif
@@ -693,7 +693,7 @@
# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
# to pass different flags for each flavor.
libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
-all-object-suffixes := .o .os .op .og .ob .oS
+all-object-suffixes := .o .os .op .og .ob .oST
object-suffixes :=
CPPFLAGS-.o = $(pic-default)
CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
@@ -749,14 +749,14 @@
ifeq (yes,$(build-shared))
# Build special library that contains the static-only routines for libc.
-object-suffixes-for-libc += .oS
+object-suffixes-for-libc += .oST
# Must build the routines as PIC, though, because they can end up in (users')
# shared objects. We don't want to use CFLAGS-os because users may, for
# example, make that processor-specific.
-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
-libtype.oS = lib%_nonshared.a
+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
+libtype.oST = lib%_nonshared.a
endif
# The assembler can generate debug information too.
diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
@@ -417,7 +417,7 @@
# Bounded pointer thunks are only built for *.ob
elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
-elide-routines.oS += $(filter-out $(static-only-routines),\
+elide-routines.oST += $(filter-out $(static-only-routines),\
$(routines) $(aux) $(sysdep_routines)) \
$(elide-bp-thunks)
elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
@@ -981,7 +981,7 @@
install: $(inst_libdir)/libc.so
$(inst_libdir)/libc.so: $(common-objpfx)format.lds \
$(common-objpfx)libc.so$(libc.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)$(libc-name)) \
$(+force)
(echo '/* GNU ld script';\
@@ -989,7 +989,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
@@ -13,7 +13,7 @@
ifneq (,$($(lib)-static-only-routines))
ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
endif
endif
@@ -29,7 +29,7 @@
# Add each flavor of library to the lists of things to build and install.
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
$(patsubst %,%$o,$(filter-out \
$($(lib)-shared-only-routines),\
$(all-$(lib)-routines))))
@@ -57,7 +57,7 @@
# Use o-iterator.mk to generate a rule for each flavor of library.
-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%$o,\
@@ -65,7 +65,7 @@
$(all-$(lib)-routines))); \
$$(build-extra-lib)
endef
-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
endif
@@ -77,9 +77,9 @@
$(build-extra-lib)
endif
-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
- $(patsubst %,$(objpfx)%.oS,\
+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
+ $(patsubst %,$(objpfx)%.oST,\
$(filter $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
$(build-extra-lib)
diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
@@ -375,7 +375,7 @@
$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
$(objpfx)libpthread.so$(libpthread.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)pthread) \
$(+force)
(echo '/* GNU ld script';\
@@ -383,7 +383,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
')' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
@@ -10,4 +10,4 @@
ASFLAGS-.op += -Wa,-Av9a
ASFLAGS-.og += -Wa,-Av9a
ASFLAGS-.ob += -Wa,-Av9a
-ASFLAGS-.oS += -Wa,-Av9a
+ASFLAGS-.oST += -Wa,-Av9a
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,67 @@
From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
Fixes
rtld.c: In function '_dl_start':
dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
when compiling glibc-2.3.4 with gcc-4.0
But see also
http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
and
http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
which seem to propose less radical fixes?
Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
@@ -19,47 +19,6 @@
#include <elf.h>
#include <assert.h>
-
-#ifdef RESOLVE_MAP
-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
- ElfW(Addr), because not all architectures can assume that the
- relocated address is properly aligned, whereas the compiler is
- entitled to assume that a pointer to a type is properly aligned for
- the type. Even if we cast the pointer back to some other type with
- less strict alignment requirements, the compiler might still
- remember that the pointer was originally more aligned, thereby
- optimizing away alignment tests or using word instructions for
- copying memory, breaking the very code written to handle the
- unaligned cases. */
-# if ! ELF_MACHINE_NO_REL
-auto inline void __attribute__((always_inline))
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- void *const reloc_addr);
-# endif
-# if ! ELF_MACHINE_NO_RELA
-auto inline void __attribute__((always_inline))
-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
- void *const reloc_addr);
-# endif
-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
-# else
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
-# endif
-#endif
-
#include <dl-machine.h>
#ifndef VERSYMIDX
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,25 @@
http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
The following makes it possible to configure glibc-2.3.2 on Mac OS X,
where the assembler but doesn't understand the --version flag.
Fixes the symptom
checking whether ld is GNU ld... no
checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
checking version of /usr/libexec/gcc/darwin/ppc/as...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
@@ -4039,7 +4039,7 @@
# Found it, now check the version.
echo "$as_me:$LINENO: checking version of $AS" >&5
echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,45 @@
From dank@kegel.com
Wed Jun 15 09:12:43 PDT 2005
Fixes
build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
... 53 lines deleted ...
build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
collect2: ld returned 1 exit status
make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
when building glibc with --enable-static-nss.
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
@@ -510,7 +510,7 @@
# The static libraries.
ifeq (yes,$(build-static))
-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...
--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
@@ -120,6 +120,13 @@
install-bin-script = ldd
endif
+ifeq (yes,$(build-static-nss))
+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
+ $(resolvobjdir)/libresolv.a
+endif
+
others = sprof sln
install-bin = sprof
others-static = sln
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,38 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
===================================================================
--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
+asm ("\n#undef __i686");
+asm ("\n#define __i686 __i686");
+asm ("\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");

View File

@ -0,0 +1,18 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
License: LGPL v2.1
Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
and 2 is not.
diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
@@ -36,7 +36,7 @@
ifeq ($(subdir),csu)
sysdep-CFLAGS += -mpreferred-stack-boundary=4
else
-sysdep-CFLAGS += -mpreferred-stack-boundary=2
+sysdep-CFLAGS += -mpreferred-stack-boundary=4
# Likewise, any function which calls user callbacks
uses-callbacks += -mpreferred-stack-boundary=4
# Likewise, any stack alignment tests

View File

@ -0,0 +1,26 @@
From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
Rule to install all needed libraries, not just the ones installed by install-lib,
yet not install programs.
Needed because we can't use the main install target, as we can't build programs before
we have the final gcc installed; linking fails because libeh.a is not present,
and glibc insists on linking programs with that library.
diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
@@ -864,6 +864,13 @@
installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
$(inst_libdir)/$(patsubst %,$(libtype$o),\
$(libprefix)$(libc-name)))
+
+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
+ $(inst_slibdir)/libc-$(version).so \
+ $(inst_libdir)/libc.so \
+ $(inst_libdir)/libc.a \
+ install-lib
+
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,70 @@
Fixes error
dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
e.o] Error 1
make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822'
make: *** [all] Error 2
-----------------
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
-----------------
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_3-branch
Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
Modified files:
sysdeps/s390/s390-64: dl-machine.h
sysdeps/s390/s390-32: dl-machine.h
Log message:
2004-07-10 GOTO Masanori <gotom@debian.or.jp>
[BZ #398]
* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
directive.
* sysdeps/s390/s390-64/dl-machine.h: Likewise.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
retrieving revision 1.19.4.1
retrieving revision 1.19.4.2
diff -u -r1.19.4.1 -r1.19.4.2
--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
retrieving revision 1.20.4.1
retrieving revision 1.20.4.2
diff -u -r1.20.4.1 -r1.20.4.2
--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390

View File

@ -0,0 +1,59 @@
Fixes
../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
%changelog
+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
+- fix build on 64-bit arches with new GCC
Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
Branch: fedora-branch
CVS Tags: fedora-glibc-2_3_4-18
Changes since 1.4: +2 -0 lines
Diff to previous 1.4 (colored)
* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
* sysdeps/wordsize-64/wcstol_l.c: Likewise.
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,7 +8,9 @@
#undef ____strtoll_l_internal
#undef __strtoll_l
#undef strtoll_l
+#if !UNSIGNED
strong_alias (____strtol_l_internal, ____strtoll_l_internal)
libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
weak_alias (__strtol_l, __strtoll_l)
weak_alias (__strtol_l, strtoll_l)
+#endif
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,6 +8,8 @@
#undef ____wcstoll_l_internal
#undef __wcstoll_l
#undef wcstoll_l
+#if !UNSIGNED
strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
weak_alias (__wcstol_l, __wcstoll_l)
weak_alias (__wcstol_l, wcstoll_l)
+#endif
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,187 @@
Fixes
elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
...
when building glibc-2.3.x on cygwin
Idea from
http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
Basically, make glibc use .oST as suffix for 'object static'
instead of .oS, since cygwin has trouble distinguishing .os from .oS
(Original patch had .on, but .oST is more mnemonic for 'object static')
glibc-linuxthreads-2.3.5 also requires a patch, see
../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
Message-ID: <4282FCBA.3040000@unicontrols.cz>
Date: Thu, 12 May 2005 08:50:34 +0200
From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
CC: crossgcc@sources.redhat.com
Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
Hi Dan,
following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
--
Petr Cvachoucek
Unicontrols a.s.
http://www.unicontrols.cz
]
diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
@@ -472,7 +472,7 @@
# run the linked programs.
link-libc = -Wl,-rpath-link=$(rpath-link) \
$(common-objpfx)libc.so$(libc.so-version) \
- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
endif
@@ -693,7 +693,7 @@
# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
# to pass different flags for each flavor.
libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
-all-object-suffixes := .o .os .op .og .ob .oS
+all-object-suffixes := .o .os .op .og .ob .oST
object-suffixes :=
CPPFLAGS-.o = $(pic-default)
CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
@@ -749,14 +749,14 @@
ifeq (yes,$(build-shared))
# Build special library that contains the static-only routines for libc.
-object-suffixes-for-libc += .oS
+object-suffixes-for-libc += .oST
# Must build the routines as PIC, though, because they can end up in (users')
# shared objects. We don't want to use CFLAGS-os because users may, for
# example, make that processor-specific.
-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
-libtype.oS = lib%_nonshared.a
+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
+libtype.oST = lib%_nonshared.a
endif
# The assembler can generate debug information too.
diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
@@ -417,7 +417,7 @@
# Bounded pointer thunks are only built for *.ob
elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
-elide-routines.oS += $(filter-out $(static-only-routines),\
+elide-routines.oST += $(filter-out $(static-only-routines),\
$(routines) $(aux) $(sysdep_routines)) \
$(elide-bp-thunks)
elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
@@ -981,7 +981,7 @@
install: $(inst_libdir)/libc.so
$(inst_libdir)/libc.so: $(common-objpfx)format.lds \
$(common-objpfx)libc.so$(libc.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)$(libc-name)) \
$(+force)
(echo '/* GNU ld script';\
@@ -989,7 +989,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
@@ -13,7 +13,7 @@
ifneq (,$($(lib)-static-only-routines))
ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
endif
endif
@@ -29,7 +29,7 @@
# Add each flavor of library to the lists of things to build and install.
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
$(patsubst %,%$o,$(filter-out \
$($(lib)-shared-only-routines),\
$(all-$(lib)-routines))))
@@ -57,7 +57,7 @@
# Use o-iterator.mk to generate a rule for each flavor of library.
-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%$o,\
@@ -65,7 +65,7 @@
$(all-$(lib)-routines))); \
$$(build-extra-lib)
endef
-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
endif
@@ -77,9 +77,9 @@
$(build-extra-lib)
endif
-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
- $(patsubst %,$(objpfx)%.oS,\
+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
+ $(patsubst %,$(objpfx)%.oST,\
$(filter $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
$(build-extra-lib)
diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
@@ -375,7 +375,7 @@
$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
$(objpfx)libpthread.so$(libpthread.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)pthread) \
$(+force)
(echo '/* GNU ld script';\
@@ -383,7 +383,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
')' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
@@ -10,4 +10,4 @@
ASFLAGS-.op += -Wa,-Av9a
ASFLAGS-.og += -Wa,-Av9a
ASFLAGS-.ob += -Wa,-Av9a
-ASFLAGS-.oS += -Wa,-Av9a
+ASFLAGS-.oST += -Wa,-Av9a
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,67 @@
From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
Fixes
rtld.c: In function '_dl_start':
dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
when compiling glibc-2.3.4 with gcc-4.0
But see also
http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
and
http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
which seem to propose less radical fixes?
Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
@@ -19,47 +19,6 @@
#include <elf.h>
#include <assert.h>
-
-#ifdef RESOLVE_MAP
-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
- ElfW(Addr), because not all architectures can assume that the
- relocated address is properly aligned, whereas the compiler is
- entitled to assume that a pointer to a type is properly aligned for
- the type. Even if we cast the pointer back to some other type with
- less strict alignment requirements, the compiler might still
- remember that the pointer was originally more aligned, thereby
- optimizing away alignment tests or using word instructions for
- copying memory, breaking the very code written to handle the
- unaligned cases. */
-# if ! ELF_MACHINE_NO_REL
-auto inline void __attribute__((always_inline))
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- void *const reloc_addr);
-# endif
-# if ! ELF_MACHINE_NO_RELA
-auto inline void __attribute__((always_inline))
-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
- void *const reloc_addr);
-# endif
-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
-# else
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
-# endif
-#endif
-
#include <dl-machine.h>
#ifndef VERSYMIDX
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,25 @@
http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
The following makes it possible to configure glibc-2.3.2 on Mac OS X,
where the assembler but doesn't understand the --version flag.
Fixes the symptom
checking whether ld is GNU ld... no
checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
checking version of /usr/libexec/gcc/darwin/ppc/as...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
@@ -4039,7 +4039,7 @@
# Found it, now check the version.
echo "$as_me:$LINENO: checking version of $AS" >&5
echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,45 @@
From dank@kegel.com
Wed Jun 15 09:12:43 PDT 2005
Fixes
build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
... 53 lines deleted ...
build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
collect2: ld returned 1 exit status
make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
when building glibc with --enable-static-nss.
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
@@ -510,7 +510,7 @@
# The static libraries.
ifeq (yes,$(build-static))
-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...
--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
@@ -120,6 +120,13 @@
install-bin-script = ldd
endif
+ifeq (yes,$(build-static-nss))
+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
+ $(resolvobjdir)/libresolv.a
+endif
+
others = sprof sln
install-bin = sprof
others-static = sln
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,38 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
===================================================================
--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
+asm ("\n#undef __i686");
+asm ("\n#define __i686 __i686");
+asm ("\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");

View File

@ -0,0 +1,18 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
License: LGPL v2.1
Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
and 2 is not.
diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
@@ -36,7 +36,7 @@
ifeq ($(subdir),csu)
sysdep-CFLAGS += -mpreferred-stack-boundary=4
else
-sysdep-CFLAGS += -mpreferred-stack-boundary=2
+sysdep-CFLAGS += -mpreferred-stack-boundary=4
# Likewise, any function which calls user callbacks
uses-callbacks += -mpreferred-stack-boundary=4
# Likewise, any stack alignment tests

View File

@ -0,0 +1,26 @@
From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
Rule to install all needed libraries, not just the ones installed by install-lib,
yet not install programs.
Needed because we can't use the main install target, as we can't build programs before
we have the final gcc installed; linking fails because libeh.a is not present,
and glibc insists on linking programs with that library.
diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
@@ -864,6 +864,13 @@
installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
$(inst_libdir)/$(patsubst %,$(libtype$o),\
$(libprefix)$(libc-name)))
+
+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
+ $(inst_slibdir)/libc-$(version).so \
+ $(inst_libdir)/libc.so \
+ $(inst_libdir)/libc.a \
+ install-lib
+
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,70 @@
Fixes error
dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
e.o] Error 1
make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
822'
make: *** [all] Error 2
-----------------
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
-----------------
CVSROOT: /cvs/glibc
Module name: libc
Branch: glibc-2_3-branch
Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
Modified files:
sysdeps/s390/s390-64: dl-machine.h
sysdeps/s390/s390-32: dl-machine.h
Log message:
2004-07-10 GOTO Masanori <gotom@debian.or.jp>
[BZ #398]
* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
directive.
* sysdeps/s390/s390-64/dl-machine.h: Likewise.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
retrieving revision 1.19.4.1
retrieving revision 1.19.4.2
diff -u -r1.19.4.1 -r1.19.4.2
--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
retrieving revision 1.20.4.1
retrieving revision 1.20.4.2
diff -u -r1.20.4.1 -r1.20.4.2
--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
@@ -27,6 +27,7 @@
#include <sys/param.h>
#include <string.h>
#include <link.h>
+#include <sysdep.h>
/* This is an older, now obsolete value. */
#define EM_S390_OLD 0xA390

View File

@ -0,0 +1,59 @@
Fixes
../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
%changelog
+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
+- fix build on 64-bit arches with new GCC
Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
Branch: fedora-branch
CVS Tags: fedora-glibc-2_3_4-18
Changes since 1.4: +2 -0 lines
Diff to previous 1.4 (colored)
* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
* sysdeps/wordsize-64/wcstol_l.c: Likewise.
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,7 +8,9 @@
#undef ____strtoll_l_internal
#undef __strtoll_l
#undef strtoll_l
+#if !UNSIGNED
strong_alias (____strtol_l_internal, ____strtoll_l_internal)
libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
weak_alias (__strtol_l, __strtoll_l)
weak_alias (__strtol_l, strtoll_l)
+#endif
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
@@ -8,6 +8,8 @@
#undef ____wcstoll_l_internal
#undef __wcstoll_l
#undef wcstoll_l
+#if !UNSIGNED
strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
weak_alias (__wcstol_l, __wcstoll_l)
weak_alias (__wcstol_l, wcstoll_l)
+#endif
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,187 @@
Fixes
elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
...
when building glibc-2.3.x on cygwin
Idea from
http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
Basically, make glibc use .oST as suffix for 'object static'
instead of .oS, since cygwin has trouble distinguishing .os from .oS
(Original patch had .on, but .oST is more mnemonic for 'object static')
glibc-linuxthreads-2.3.5 also requires a patch, see
../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
Message-ID: <4282FCBA.3040000@unicontrols.cz>
Date: Thu, 12 May 2005 08:50:34 +0200
From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
CC: crossgcc@sources.redhat.com
Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
Hi Dan,
following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
--
Petr Cvachoucek
Unicontrols a.s.
http://www.unicontrols.cz
]
diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
@@ -472,7 +472,7 @@
# run the linked programs.
link-libc = -Wl,-rpath-link=$(rpath-link) \
$(common-objpfx)libc.so$(libc.so-version) \
- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
endif
@@ -693,7 +693,7 @@
# The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
# to pass different flags for each flavor.
libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
-all-object-suffixes := .o .os .op .og .ob .oS
+all-object-suffixes := .o .os .op .og .ob .oST
object-suffixes :=
CPPFLAGS-.o = $(pic-default)
CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
@@ -749,14 +749,14 @@
ifeq (yes,$(build-shared))
# Build special library that contains the static-only routines for libc.
-object-suffixes-for-libc += .oS
+object-suffixes-for-libc += .oST
# Must build the routines as PIC, though, because they can end up in (users')
# shared objects. We don't want to use CFLAGS-os because users may, for
# example, make that processor-specific.
-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
-libtype.oS = lib%_nonshared.a
+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
+libtype.oST = lib%_nonshared.a
endif
# The assembler can generate debug information too.
diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
@@ -417,7 +417,7 @@
# Bounded pointer thunks are only built for *.ob
elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
-elide-routines.oS += $(filter-out $(static-only-routines),\
+elide-routines.oST += $(filter-out $(static-only-routines),\
$(routines) $(aux) $(sysdep_routines)) \
$(elide-bp-thunks)
elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
@@ -981,7 +981,7 @@
install: $(inst_libdir)/libc.so
$(inst_libdir)/libc.so: $(common-objpfx)format.lds \
$(common-objpfx)libc.so$(libc.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)$(libc-name)) \
$(+force)
(echo '/* GNU ld script';\
@@ -989,7 +989,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
@@ -13,7 +13,7 @@
ifneq (,$($(lib)-static-only-routines))
ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
endif
endif
@@ -29,7 +29,7 @@
# Add each flavor of library to the lists of things to build and install.
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
$(patsubst %,%$o,$(filter-out \
$($(lib)-shared-only-routines),\
$(all-$(lib)-routines))))
@@ -57,7 +57,7 @@
# Use o-iterator.mk to generate a rule for each flavor of library.
-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%$o,\
@@ -65,7 +65,7 @@
$(all-$(lib)-routines))); \
$$(build-extra-lib)
endef
-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
endif
@@ -77,9 +77,9 @@
$(build-extra-lib)
endif
-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
- $(patsubst %,$(objpfx)%.oS,\
+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
+ $(patsubst %,$(objpfx)%.oST,\
$(filter $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
$(build-extra-lib)
diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
@@ -375,7 +375,7 @@
$(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
$(objpfx)libpthread.so$(libpthread.so-version) \
- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
$(libprefix)pthread) \
$(+force)
(echo '/* GNU ld script';\
@@ -383,7 +383,7 @@
echo ' the static library, so try that secondarily. */';\
cat $<; \
echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
')' \
) > $@.new
mv -f $@.new $@
diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
@@ -10,4 +10,4 @@
ASFLAGS-.op += -Wa,-Av9a
ASFLAGS-.og += -Wa,-Av9a
ASFLAGS-.ob += -Wa,-Av9a
-ASFLAGS-.oS += -Wa,-Av9a
+ASFLAGS-.oST += -Wa,-Av9a
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,67 @@
From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
Fixes
rtld.c: In function '_dl_start':
dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
when compiling glibc-2.3.4 with gcc-4.0
But see also
http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
and
http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
which seem to propose less radical fixes?
Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
@@ -19,47 +19,6 @@
#include <elf.h>
#include <assert.h>
-
-#ifdef RESOLVE_MAP
-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
- ElfW(Addr), because not all architectures can assume that the
- relocated address is properly aligned, whereas the compiler is
- entitled to assume that a pointer to a type is properly aligned for
- the type. Even if we cast the pointer back to some other type with
- less strict alignment requirements, the compiler might still
- remember that the pointer was originally more aligned, thereby
- optimizing away alignment tests or using word instructions for
- copying memory, breaking the very code written to handle the
- unaligned cases. */
-# if ! ELF_MACHINE_NO_REL
-auto inline void __attribute__((always_inline))
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- void *const reloc_addr);
-# endif
-# if ! ELF_MACHINE_NO_RELA
-auto inline void __attribute__((always_inline))
-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr);
-auto inline void __attribute__((always_inline))
-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
- void *const reloc_addr);
-# endif
-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
-# else
-auto inline void __attribute__((always_inline))
-elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
-# endif
-#endif
-
#include <dl-machine.h>
#ifndef VERSYMIDX
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,25 @@
http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
The following makes it possible to configure glibc-2.3.2 on Mac OS X,
where the assembler but doesn't understand the --version flag.
Fixes the symptom
checking whether ld is GNU ld... no
checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
checking version of /usr/libexec/gcc/darwin/ppc/as...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
@@ -4039,7 +4039,7 @@
# Found it, now check the version.
echo "$as_me:$LINENO: checking version of $AS" >&5
echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,45 @@
From dank@kegel.com
Wed Jun 15 09:12:43 PDT 2005
Fixes
build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
... 53 lines deleted ...
build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
collect2: ld returned 1 exit status
make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
when building glibc with --enable-static-nss.
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
@@ -510,7 +510,7 @@
# The static libraries.
ifeq (yes,$(build-static))
-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...
--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
@@ -120,6 +120,13 @@
install-bin-script = ldd
endif
+ifeq (yes,$(build-static-nss))
+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
+ $(resolvobjdir)/libresolv.a
+endif
+
others = sprof sln
install-bin = sprof
others-static = sln
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

View File

@ -0,0 +1,38 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
===================================================================
--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
===================================================================
--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
@@ -45,6 +45,11 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
+asm ("\n#undef __i686");
+asm ("\n#define __i686 __i686");
+asm ("\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");

View File

@ -0,0 +1,18 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
License: LGPL v2.1
Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
and 2 is not.
diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
@@ -36,7 +36,7 @@
ifeq ($(subdir),csu)
sysdep-CFLAGS += -mpreferred-stack-boundary=4
else
-sysdep-CFLAGS += -mpreferred-stack-boundary=2
+sysdep-CFLAGS += -mpreferred-stack-boundary=4
# Likewise, any function which calls user callbacks
uses-callbacks += -mpreferred-stack-boundary=4
# Likewise, any stack alignment tests

View File

@ -0,0 +1,26 @@
From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
Rule to install all needed libraries, not just the ones installed by install-lib,
yet not install programs.
Needed because we can't use the main install target, as we can't build programs before
we have the final gcc installed; linking fails because libeh.a is not present,
and glibc insists on linking programs with that library.
diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
@@ -864,6 +864,13 @@
installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
$(inst_libdir)/$(patsubst %,$(libtype$o),\
$(libprefix)$(libc-name)))
+
+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
+ $(inst_slibdir)/libc-$(version).so \
+ $(inst_libdir)/libc.so \
+ $(inst_libdir)/libc.a \
+ install-lib
+
install: $(installed-libcs)
$(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
$(make-target-directory)
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>