1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.3.4/bad/glibc-2.3.4-cygwin.patch Fri May 18 08:27:50 2007 +0000
1.3 @@ -0,0 +1,96 @@
1.4 +Fixes
1.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
1.6 +...
1.7 +when building glibc-2.3.3 on cygwin
1.8 +
1.9 +Idea from
1.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
1.11 +Basically, make glibc use .oST as suffix for 'object static'
1.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
1.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
1.14 +
1.15 +glibc-linuxthreads-2.3.3 also requires a patch, see
1.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
1.17 +
1.18 +[ Rediffed against glibc-2.3.3 ]
1.19 +
1.20 +
1.21 +diff -urN glibc-2.3.4-orig/Makeconfig glibc-2.3.4/Makeconfig
1.22 +--- glibc-2.3.4-orig/Makeconfig 2004-12-15 19:51:47.000000000 +0100
1.23 ++++ glibc-2.3.4/Makeconfig 2005-03-13 18:54:58.000000000 +0100
1.24 +@@ -449,7 +449,7 @@
1.25 + # run the linked programs.
1.26 + link-libc = -Wl,-rpath-link=$(rpath-link) \
1.27 + $(common-objpfx)libc.so$(libc.so-version) \
1.28 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
1.29 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
1.30 + # This is how to find at build-time things that will be installed there.
1.31 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
1.32 + endif
1.33 +@@ -667,7 +667,7 @@
1.34 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
1.35 + # to pass different flags for each flavor.
1.36 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
1.37 +-all-object-suffixes := .o .os .op .og .ob .oS
1.38 ++all-object-suffixes := .o .os .op .og .ob .oST
1.39 + object-suffixes :=
1.40 + CPPFLAGS-.o = $(pic-default)
1.41 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
1.42 +@@ -723,14 +723,14 @@
1.43 +
1.44 + ifeq (yes,$(build-shared))
1.45 + # Build special library that contains the static-only routines for libc.
1.46 +-object-suffixes-for-libc += .oS
1.47 ++object-suffixes-for-libc += .oST
1.48 +
1.49 + # Must build the routines as PIC, though, because they can end up in (users')
1.50 + # shared objects. We don't want to use CFLAGS-os because users may, for
1.51 + # example, make that processor-specific.
1.52 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
1.53 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.54 +-libtype.oS = lib%_nonshared.a
1.55 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
1.56 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.57 ++libtype.oST = lib%_nonshared.a
1.58 + endif
1.59 +
1.60 + # The assembler can generate debug information too.
1.61 +diff -urN glibc-2.3.4-orig/Makerules glibc-2.3.4/Makerules
1.62 +--- glibc-2.3.4-orig/Makerules 2004-12-15 19:52:39.000000000 +0100
1.63 ++++ glibc-2.3.4/Makerules 2005-03-13 18:50:09.000000000 +0100
1.64 +@@ -416,7 +416,7 @@
1.65 + # Bounded pointer thunks are only built for *.ob
1.66 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
1.67 +
1.68 +-elide-routines.oS += $(filter-out $(static-only-routines),\
1.69 ++elide-routines.oST += $(filter-out $(static-only-routines),\
1.70 + $(routines) $(aux) $(sysdep_routines)) \
1.71 + $(elide-bp-thunks)
1.72 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
1.73 +@@ -961,7 +961,7 @@
1.74 + install: $(inst_libdir)/libc.so
1.75 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
1.76 + $(common-objpfx)libc.so$(libc.so-version) \
1.77 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
1.78 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
1.79 + $(libprefix)$(libc-name)) \
1.80 + $(+force)
1.81 + (echo '/* GNU ld script';\
1.82 +@@ -969,7 +969,7 @@
1.83 + echo ' the static library, so try that secondarily. */';\
1.84 + cat $<; \
1.85 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
1.86 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
1.87 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
1.88 + ')' \
1.89 + ) > $@.new
1.90 + mv -f $@.new $@
1.91 +diff -urN glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile
1.92 +--- glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
1.93 ++++ glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-03-13 18:50:09.000000000 +0100
1.94 +@@ -10,4 +10,4 @@
1.95 + ASFLAGS-.op += -Wa,-Av9a
1.96 + ASFLAGS-.og += -Wa,-Av9a
1.97 + ASFLAGS-.ob += -Wa,-Av9a
1.98 +-ASFLAGS-.oS += -Wa,-Av9a
1.99 ++ASFLAGS-.oST += -Wa,-Av9a