yann@1: Fixes yann@1: elf/librtld.os: In function `process_envvars': : undefined reference to `__access' yann@1: ... yann@1: when building glibc-2.3.3 on cygwin yann@1: yann@1: Idea from yann@1: http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch yann@1: Basically, make glibc use .oST as suffix for 'object static' yann@1: instead of .oS, since cygwin has trouble distinguishing .os from .oS yann@1: (Original patch had .on, but .oST is more mnemonic for 'object static') yann@1: yann@1: glibc-linuxthreads-2.3.3 also requires a patch, see yann@1: ../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch yann@1: yann@1: [ Rediffed against glibc-2.3.3 ] yann@1: yann@1: yann@1: diff -aur glibc-2.3.3/Makeconfig glibc-2.3.3-cygwin/Makeconfig yann@1: --- glibc-2.3.3/Makeconfig 2003-09-17 01:36:10.000000000 -0700 yann@1: +++ glibc-2.3.3-cygwin/Makeconfig 2004-08-27 20:34:43.000000000 -0700 yann@1: @@ -439,13 +439,13 @@ yann@1: # run the linked programs. yann@1: link-libc = -Wl,-rpath-link=$(rpath-link) \ yann@1: $(common-objpfx)libc.so$(libc.so-version) \ yann@1: - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) yann@1: + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) yann@1: # This is how to find at build-time things that will be installed there. yann@1: rpath-dirs = math elf dlfcn nss nis rt resolv crypt yann@1: else yann@1: ifneq (,$(filter aix aix%,$(config-os))) yann@1: link-libc = $(common-objpfx)libc.a \ yann@1: - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) yann@1: + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) yann@1: rpath-dirs = math dlfcn nss nis rt resolv crypt yann@1: endif yann@1: endif yann@1: @@ -658,7 +658,7 @@ yann@1: # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) yann@1: # to pass different flags for each flavor. yann@1: libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) yann@1: -all-object-suffixes := .o .os .op .og .ob .oS yann@1: +all-object-suffixes := .o .os .op .og .ob .oST yann@1: object-suffixes := yann@1: CPPFLAGS-.o = $(pic-default) yann@1: CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) yann@1: @@ -714,14 +714,14 @@ yann@1: yann@1: ifeq (yes,$(build-shared)) yann@1: # Build special library that contains the static-only routines for libc. yann@1: -object-suffixes-for-libc += .oS yann@1: +object-suffixes-for-libc += .oST yann@1: yann@1: # Must build the routines as PIC, though, because they can end up in (users') yann@1: # shared objects. We don't want to use CFLAGS-os because users may, for yann@1: # example, make that processor-specific. yann@1: -CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) yann@1: -CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 yann@1: -libtype.oS = lib%_nonshared.a yann@1: +CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag) yann@1: +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 yann@1: +libtype.oST = lib%_nonshared.a yann@1: endif yann@1: yann@1: # The assembler can generate debug information too. yann@1: diff -aur glibc-2.3.3/Makerules glibc-2.3.3-cygwin/Makerules yann@1: --- glibc-2.3.3/Makerules 2003-10-31 16:35:57.000000000 -0800 yann@1: +++ glibc-2.3.3-cygwin/Makerules 2004-08-27 20:33:47.000000000 -0700 yann@1: @@ -414,7 +414,7 @@ yann@1: # Bounded pointer thunks are only built for *.ob yann@1: elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) yann@1: yann@1: -elide-routines.oS += $(filter-out $(static-only-routines),\ yann@1: +elide-routines.oST += $(filter-out $(static-only-routines),\ yann@1: $(routines) $(aux) $(sysdep_routines)) \ yann@1: $(elide-bp-thunks) yann@1: elide-routines.os += $(static-only-routines) $(elide-bp-thunks) yann@1: @@ -934,7 +934,7 @@ yann@1: install: $(inst_libdir)/libc.so yann@1: $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ yann@1: $(common-objpfx)libc.so$(libc.so-version) \ yann@1: - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ yann@1: + $(inst_libdir)/$(patsubst %,$(libtype.oST),\ yann@1: $(libprefix)$(libc-name)) \ yann@1: $(+force) yann@1: (echo '/* GNU ld script';\ yann@1: @@ -942,7 +942,7 @@ yann@1: echo ' the static library, so try that secondarily. */';\ yann@1: cat $<; \ yann@1: echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ yann@1: - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ yann@1: + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ yann@1: ')' \ yann@1: ) > $@.new yann@1: mv -f $@.new $@ yann@1: diff -aur glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile yann@1: --- glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile 2002-08-29 03:41:15.000000000 -0700 yann@1: +++ glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-27 20:35:43.000000000 -0700 yann@1: @@ -10,4 +10,4 @@ yann@1: ASFLAGS-.op += -Wa,-Av9a yann@1: ASFLAGS-.og += -Wa,-Av9a yann@1: ASFLAGS-.ob += -Wa,-Av9a yann@1: -ASFLAGS-.oS += -Wa,-Av9a yann@1: +ASFLAGS-.oST += -Wa,-Av9a