Make regtest work back again.
2 elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
4 when building glibc-2.3.2 on cygwin
7 http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
8 Basically, make glibc use .oST as suffix for 'object static'
9 instead of .oS, since cygwin has trouble distinguishing .os from .oS
10 (Original patch had .on, but .oST is more mnemonic for 'object static')
12 glibc-linuxthreads-2.3.2 also requires a patch, see
13 ../glibc-linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-cygwin.patch
16 --- glibc-2.3.2/Makeconfig.orig 2003-01-05 21:31:36.000000000 -0800
17 +++ glibc-2.3.2/Makeconfig 2004-03-13 23:42:03.781250000 -0800
19 # run the linked programs.
20 link-libc = -Wl,-rpath-link=$(rpath-link) \
21 $(common-objpfx)libc.so$(libc.so-version) \
22 - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
23 + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
24 # This is how to find at build-time things that will be installed there.
25 rpath-dirs = math elf dlfcn nss nis rt resolv crypt
27 ifneq (,$(filter aix aix%,$(config-os)))
28 link-libc = $(common-objpfx)libc.a \
29 - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
30 + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
31 rpath-dirs = math dlfcn nss nis rt resolv crypt
35 # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
36 # to pass different flags for each flavor.
37 libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
38 -all-object-suffixes := .o .os .op .og .ob .oS
39 +all-object-suffixes := .o .os .op .og .ob .oST
41 CPPFLAGS-.o = $(pic-default)
42 CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
45 ifeq (yes,$(build-shared))
46 # Build special library that contains the static-only routines for libc.
47 -object-suffixes-for-libc += .oS
48 +object-suffixes-for-libc += .oST
50 # Must build the routines as PIC, though, because they can end up in (users')
51 # shared objects. We don't want to use CFLAGS-os because users may, for
52 # example, make that processor-specific.
53 -CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
54 -CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
55 -libtype.oS = lib%_nonshared.a
56 +CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
57 +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
58 +libtype.oST = lib%_nonshared.a
62 --- glibc-2.3.2/Makerules.orig 2003-02-22 15:23:31.000000000 -0800
63 +++ glibc-2.3.2/Makerules 2004-03-13 23:43:40.984375000 -0800
65 # Bounded pointer thunks are only built for *.ob
66 elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
68 -elide-routines.oS += $(filter-out $(static-only-routines),\
69 +elide-routines.oST += $(filter-out $(static-only-routines),\
70 $(routines) $(aux) $(sysdep_routines)) \
72 elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
74 install: $(inst_libdir)/libc.so
75 $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
76 $(common-objpfx)libc.so$(libc.so-version) \
77 - $(inst_libdir)/$(patsubst %,$(libtype.oS),\
78 + $(inst_libdir)/$(patsubst %,$(libtype.oST),\
79 $(libprefix)$(libc-name)) \
81 (echo '/* GNU ld script';\
83 echo ' the static library, so try that secondarily. */';\
85 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
86 - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
87 + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\