1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-cygwin.patch Tue May 22 20:41:50 2007 +0000
1.3 @@ -0,0 +1,89 @@
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.2 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 +forward ported to glibc-2.3.2.
1.12 +Basically, make glibc use .oST as suffix for 'object static'
1.13 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
1.14 +(Original patch had .on, but .oST is more mnemonic for 'object static')
1.15 +
1.16 +
1.17 +diff -Naur from-cvs/Makeconfig patched/Makeconfig
1.18 +--- from-cvs/Makeconfig Fri Jan 11 14:40:35 2002
1.19 ++++ patched/Makeconfig Fri Jan 11 15:07:30 2002
1.20 +@@ -439,13 +439,13 @@
1.21 + # run the linked programs.
1.22 + link-libc = -Wl,-rpath-link=$(rpath-link) \
1.23 + $(common-objpfx)libc.so$(libc.so-version) \
1.24 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
1.25 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
1.26 + # This is how to find at build-time things that will be installed there.
1.27 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
1.28 + else
1.29 + ifneq (,$(findstring aix,$(config-os)))
1.30 + link-libc = $(common-objpfx)libc.a \
1.31 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
1.32 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
1.33 + rpath-dirs = math dlfcn nss nis rt resolv crypt
1.34 + endif
1.35 + endif
1.36 +@@ -649,7 +649,7 @@
1.37 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
1.38 + # to pass different flags for each flavor.
1.39 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
1.40 +-all-object-suffixes := .o .os .op .og .ob .oS
1.41 ++all-object-suffixes := .o .os .op .og .ob .oST
1.42 + object-suffixes :=
1.43 + CPPFLAGS-.o = $(pic-default)
1.44 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
1.45 +@@ -703,14 +703,14 @@
1.46 +
1.47 + ifeq (yes,$(build-shared))
1.48 + # Build special library that contains the static-only routines for libc.
1.49 +-object-suffixes-for-libc += .oS
1.50 ++object-suffixes-for-libc += .oST
1.51 +
1.52 + # Must build the routines as PIC, though, because they can end up in (users')
1.53 + # shared objects. We don't want to use CFLAGS-os because users may, for
1.54 + # example, make that processor-specific.
1.55 +-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
1.56 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC
1.57 +-libtype.oS = lib%_nonshared.a
1.58 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
1.59 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC
1.60 ++libtype.oST = lib%_nonshared.a
1.61 + endif
1.62 +
1.63 +
1.64 +diff -Naur from-cvs/Makerules patched/Makerules
1.65 +--- from-cvs/Makerules Fri Jan 11 14:40:42 2002
1.66 ++++ patched/Makerules Fri Jan 11 15:06:00 2002
1.67 +@@ -361,7 +361,7 @@
1.68 + # Bounded pointer thunks are only built for *.ob
1.69 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
1.70 +
1.71 +-elide-routines.oS += $(filter-out $(static-only-routines),\
1.72 ++elide-routines.oST += $(filter-out $(static-only-routines),\
1.73 + $(routines) $(aux) $(sysdep_routines)) \
1.74 + $(elide-bp-thunks)
1.75 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
1.76 +@@ -842,14 +842,14 @@
1.77 + # of the files are taken by the linker.
1.78 + install: $(inst_libdir)/libc.so
1.79 + $(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
1.80 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
1.81 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
1.82 + $(libprefix)$(libc-name)) \
1.83 + $(+force)
1.84 + (echo '/* GNU ld script';\
1.85 + echo ' Use the shared library, but some functions are only in';\
1.86 + echo ' the static library, so try that secondarily. */';\
1.87 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
1.88 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
1.89 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
1.90 + ')' \
1.91 + ) > $@.new
1.92 + mv -f $@.new $@