1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/20040827/glibc-2.3.3-cygwin.patch Wed May 23 21:08:24 2007 +0000
1.3 @@ -0,0 +1,103 @@
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 -aur glibc-2.3.3/Makeconfig glibc-2.3.3-cygwin/Makeconfig
1.22 +--- glibc-2.3.3/Makeconfig 2003-09-17 01:36:10.000000000 -0700
1.23 ++++ glibc-2.3.3-cygwin/Makeconfig 2004-08-27 20:34:43.000000000 -0700
1.24 +@@ -439,13 +439,13 @@
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 + else
1.33 + ifneq (,$(filter aix aix%,$(config-os)))
1.34 + link-libc = $(common-objpfx)libc.a \
1.35 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
1.36 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
1.37 + rpath-dirs = math dlfcn nss nis rt resolv crypt
1.38 + endif
1.39 + endif
1.40 +@@ -658,7 +658,7 @@
1.41 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
1.42 + # to pass different flags for each flavor.
1.43 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
1.44 +-all-object-suffixes := .o .os .op .og .ob .oS
1.45 ++all-object-suffixes := .o .os .op .og .ob .oST
1.46 + object-suffixes :=
1.47 + CPPFLAGS-.o = $(pic-default)
1.48 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
1.49 +@@ -714,14 +714,14 @@
1.50 +
1.51 + ifeq (yes,$(build-shared))
1.52 + # Build special library that contains the static-only routines for libc.
1.53 +-object-suffixes-for-libc += .oS
1.54 ++object-suffixes-for-libc += .oST
1.55 +
1.56 + # Must build the routines as PIC, though, because they can end up in (users')
1.57 + # shared objects. We don't want to use CFLAGS-os because users may, for
1.58 + # example, make that processor-specific.
1.59 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
1.60 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.61 +-libtype.oS = lib%_nonshared.a
1.62 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
1.63 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.64 ++libtype.oST = lib%_nonshared.a
1.65 + endif
1.66 +
1.67 + # The assembler can generate debug information too.
1.68 +diff -aur glibc-2.3.3/Makerules glibc-2.3.3-cygwin/Makerules
1.69 +--- glibc-2.3.3/Makerules 2003-10-31 16:35:57.000000000 -0800
1.70 ++++ glibc-2.3.3-cygwin/Makerules 2004-08-27 20:33:47.000000000 -0700
1.71 +@@ -414,7 +414,7 @@
1.72 + # Bounded pointer thunks are only built for *.ob
1.73 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
1.74 +
1.75 +-elide-routines.oS += $(filter-out $(static-only-routines),\
1.76 ++elide-routines.oST += $(filter-out $(static-only-routines),\
1.77 + $(routines) $(aux) $(sysdep_routines)) \
1.78 + $(elide-bp-thunks)
1.79 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
1.80 +@@ -934,7 +934,7 @@
1.81 + install: $(inst_libdir)/libc.so
1.82 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
1.83 + $(common-objpfx)libc.so$(libc.so-version) \
1.84 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
1.85 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
1.86 + $(libprefix)$(libc-name)) \
1.87 + $(+force)
1.88 + (echo '/* GNU ld script';\
1.89 +@@ -942,7 +942,7 @@
1.90 + echo ' the static library, so try that secondarily. */';\
1.91 + cat $<; \
1.92 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
1.93 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
1.94 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
1.95 + ')' \
1.96 + ) > $@.new
1.97 + mv -f $@.new $@
1.98 +diff -aur glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
1.99 +--- glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile 2002-08-29 03:41:15.000000000 -0700
1.100 ++++ glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-27 20:35:43.000000000 -0700
1.101 +@@ -10,4 +10,4 @@
1.102 + ASFLAGS-.op += -Wa,-Av9a
1.103 + ASFLAGS-.og += -Wa,-Av9a
1.104 + ASFLAGS-.ob += -Wa,-Av9a
1.105 +-ASFLAGS-.oS += -Wa,-Av9a
1.106 ++ASFLAGS-.oST += -Wa,-Av9a