Fixes elf/librtld.os: In function `process_envvars': : undefined reference to `__access' ... when building glibc-2.1.3 on cygwin Idea from http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch backported to glibc-2.1.3. 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-2.1.3/Makeconfig.old 1999-11-29 11:19:20.000000000 -0800 +++ glibc-2.1.3/Makeconfig 2004-03-14 16:38:43.218750000 -0800 @@ -406,7 +406,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) # Choose the default search path for the dynamic linker based on # where we will install libraries. ifneq ($(libdir),$(slibdir)) @@ -586,7 +586,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)) @@ -636,14 +636,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 -libtype.oS = lib%_nonshared.a +CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag) +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC +libtype.oST = lib%_nonshared.a endif --- glibc-2.1.3/Makerules.old 1999-08-01 15:12:23.000000000 -0700 +++ glibc-2.1.3/Makerules 2004-03-14 16:39:07.906250000 -0800 @@ -386,7 +386,7 @@ static-only-routines = endif -elide-routines.oS += $(filter-out $(static-only-routines),\ +elide-routines.oST += $(filter-out $(static-only-routines),\ $(routines) $(aux) $(sysdep_routines)) elide-routines.os += $(static-only-routines) @@ -694,14 +694,14 @@ # of the files are taken by the linker. install: $(inst_libdir)/libc.so $(inst_libdir)/libc.so: $(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';\ echo ' Use the shared library, but some functions are only in';\ echo ' the static library, so try that secondarily. */';\ echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ ')' \ ) > $@.new mv -f $@.new $@