yann@98: Fixes yann@98: elf/librtld.os: In function `process_envvars': : undefined reference to `__access' yann@98: ... yann@98: when building glibc-2.3.x on cygwin yann@98: yann@98: Idea from yann@98: http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch yann@98: Basically, make glibc use .oST as suffix for 'object static' yann@98: instead of .oS, since cygwin has trouble distinguishing .os from .oS yann@98: (Original patch had .on, but .oST is more mnemonic for 'object static') yann@98: yann@98: glibc-linuxthreads-2.3.5 also requires a patch, see yann@98: ../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch yann@98: yann@98: [ forward ported to glibc-2.3.5 by Petr Cvachoucek: yann@98: yann@98: Message-ID: <4282FCBA.3040000@unicontrols.cz> yann@98: Date: Thu, 12 May 2005 08:50:34 +0200 yann@98: From: Petr Cvachoucek yann@98: To: Dan Kegel yann@98: CC: crossgcc@sources.redhat.com yann@98: Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin yann@98: yann@98: Hi Dan, yann@98: following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain yann@98: on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. yann@98: yann@98: -- yann@98: Petr Cvachoucek yann@98: Unicontrols a.s. yann@98: http://www.unicontrols.cz yann@98: ] yann@98: yann@98: diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig yann@98: --- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 yann@98: +++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 yann@98: @@ -472,7 +472,7 @@ yann@98: # run the linked programs. yann@98: link-libc = -Wl,-rpath-link=$(rpath-link) \ yann@98: $(common-objpfx)libc.so$(libc.so-version) \ yann@98: - $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) yann@98: + $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) yann@98: # This is how to find at build-time things that will be installed there. yann@98: rpath-dirs = math elf dlfcn nss nis rt resolv crypt yann@98: endif yann@98: @@ -693,7 +693,7 @@ yann@98: # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) yann@98: # to pass different flags for each flavor. yann@98: libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) yann@98: -all-object-suffixes := .o .os .op .og .ob .oS yann@98: +all-object-suffixes := .o .os .op .og .ob .oST yann@98: object-suffixes := yann@98: CPPFLAGS-.o = $(pic-default) yann@98: CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) yann@98: @@ -749,14 +749,14 @@ yann@98: yann@98: ifeq (yes,$(build-shared)) yann@98: # Build special library that contains the static-only routines for libc. yann@98: -object-suffixes-for-libc += .oS yann@98: +object-suffixes-for-libc += .oST yann@98: yann@98: # Must build the routines as PIC, though, because they can end up in (users') yann@98: # shared objects. We don't want to use CFLAGS-os because users may, for yann@98: # example, make that processor-specific. yann@98: -CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) yann@98: -CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 yann@98: -libtype.oS = lib%_nonshared.a yann@98: +CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) yann@98: +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 yann@98: +libtype.oST = lib%_nonshared.a yann@98: endif yann@98: yann@98: # The assembler can generate debug information too. yann@98: diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules yann@98: --- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 yann@98: +++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 yann@98: @@ -417,7 +417,7 @@ yann@98: # Bounded pointer thunks are only built for *.ob yann@98: elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) yann@98: yann@98: -elide-routines.oS += $(filter-out $(static-only-routines),\ yann@98: +elide-routines.oST += $(filter-out $(static-only-routines),\ yann@98: $(routines) $(aux) $(sysdep_routines)) \ yann@98: $(elide-bp-thunks) yann@98: elide-routines.os += $(static-only-routines) $(elide-bp-thunks) yann@98: @@ -981,7 +981,7 @@ yann@98: install: $(inst_libdir)/libc.so yann@98: $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ yann@98: $(common-objpfx)libc.so$(libc.so-version) \ yann@98: - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ yann@98: + $(inst_libdir)/$(patsubst %,$(libtype.oST),\ yann@98: $(libprefix)$(libc-name)) \ yann@98: $(+force) yann@98: (echo '/* GNU ld script';\ yann@98: @@ -989,7 +989,7 @@ yann@98: echo ' the static library, so try that secondarily. */';\ yann@98: cat $<; \ yann@98: echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ yann@98: - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ yann@98: + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ yann@98: ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ yann@98: ) > $@.new yann@98: mv -f $@.new $@ yann@98: diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk yann@98: --- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 yann@98: +++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 yann@98: @@ -13,7 +13,7 @@ yann@98: yann@98: ifneq (,$($(lib)-static-only-routines)) yann@98: ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) yann@98: -object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) yann@98: +object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) yann@98: endif yann@98: endif yann@98: yann@98: @@ -29,7 +29,7 @@ yann@98: yann@98: # Add each flavor of library to the lists of things to build and install. yann@98: install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) yann@98: -extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ yann@98: +extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ yann@98: $(patsubst %,%$o,$(filter-out \ yann@98: $($(lib)-shared-only-routines),\ yann@98: $(all-$(lib)-routines)))) yann@98: @@ -57,7 +57,7 @@ yann@98: yann@98: yann@98: # Use o-iterator.mk to generate a rule for each flavor of library. yann@98: -ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) yann@98: +ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) yann@98: define o-iterator-doit yann@98: $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ yann@98: $(patsubst %,$(objpfx)%$o,\ yann@98: @@ -65,7 +65,7 @@ yann@98: $(all-$(lib)-routines))); \ yann@98: $$(build-extra-lib) yann@98: endef yann@98: -object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) yann@98: +object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) yann@98: include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) yann@98: endif yann@98: yann@98: @@ -77,9 +77,9 @@ yann@98: $(build-extra-lib) yann@98: endif yann@98: yann@98: -ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) yann@98: -$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ yann@98: - $(patsubst %,$(objpfx)%.oS,\ yann@98: +ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) yann@98: +$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ yann@98: + $(patsubst %,$(objpfx)%.oST,\ yann@98: $(filter $($(lib)-static-only-routines),\ yann@98: $(all-$(lib)-routines))) yann@98: $(build-extra-lib) yann@98: diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile yann@98: --- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 yann@98: +++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 yann@98: @@ -375,7 +375,7 @@ yann@98: yann@98: $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ yann@98: $(objpfx)libpthread.so$(libpthread.so-version) \ yann@98: - $(inst_libdir)/$(patsubst %,$(libtype.oS),\ yann@98: + $(inst_libdir)/$(patsubst %,$(libtype.oST),\ yann@98: $(libprefix)pthread) \ yann@98: $(+force) yann@98: (echo '/* GNU ld script';\ yann@98: @@ -383,7 +383,7 @@ yann@98: echo ' the static library, so try that secondarily. */';\ yann@98: cat $<; \ yann@98: echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ yann@98: - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ yann@98: + '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ yann@98: ')' \ yann@98: ) > $@.new yann@98: mv -f $@.new $@ yann@98: diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile yann@98: --- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 yann@98: +++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 yann@98: @@ -10,4 +10,4 @@ yann@98: ASFLAGS-.op += -Wa,-Av9a yann@98: ASFLAGS-.og += -Wa,-Av9a yann@98: ASFLAGS-.ob += -Wa,-Av9a yann@98: -ASFLAGS-.oS += -Wa,-Av9a yann@98: +ASFLAGS-.oST += -Wa,-Av9a yann@98: yann@98: Signed-off-by: Robert P. J. Day