1.1 --- a/patches/glibc/2.7/120-cygwin.patch Mon Jul 28 21:08:01 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,185 +0,0 @@
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.x 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 -Basically, make glibc use .oST as suffix for 'object static'
1.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
1.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
1.14 -
1.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
1.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
1.17 -
1.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
1.19 -
1.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
1.21 -Date: Thu, 12 May 2005 08:50:34 +0200
1.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
1.23 -To: Dan Kegel <dank@kegel.com>
1.24 -CC: crossgcc@sources.redhat.com
1.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
1.26 -
1.27 -Hi Dan,
1.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
1.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
1.30 -
1.31 ---
1.32 - Petr Cvachoucek
1.33 - Unicontrols a.s.
1.34 - http://www.unicontrols.cz
1.35 -]
1.36 -
1.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
1.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
1.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
1.40 -@@ -470,7 +470,7 @@
1.41 - # run the linked programs.
1.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
1.43 - $(common-objpfx)libc.so$(libc.so-version) \
1.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
1.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
1.46 - # This is how to find at build-time things that will be installed there.
1.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
1.48 - endif
1.49 -@@ -691,7 +691,7 @@
1.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
1.51 - # to pass different flags for each flavor.
1.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
1.53 --all-object-suffixes := .o .os .op .og .ob .oS
1.54 -+all-object-suffixes := .o .os .op .og .ob .oST
1.55 - object-suffixes :=
1.56 - CPPFLAGS-.o = $(pic-default)
1.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
1.58 -@@ -747,14 +747,14 @@
1.59 -
1.60 - ifeq (yes,$(build-shared))
1.61 - # Build special library that contains the static-only routines for libc.
1.62 --object-suffixes-for-libc += .oS
1.63 -+object-suffixes-for-libc += .oST
1.64 -
1.65 - # Must build the routines as PIC, though, because they can end up in (users')
1.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
1.67 - # example, make that processor-specific.
1.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
1.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.70 --libtype.oS = lib%_nonshared.a
1.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
1.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
1.73 -+libtype.oST = lib%_nonshared.a
1.74 - endif
1.75 -
1.76 - # The assembler can generate debug information too.
1.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
1.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
1.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
1.80 -@@ -417,7 +417,7 @@
1.81 - # Bounded pointer thunks are only built for *.ob
1.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
1.83 -
1.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
1.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
1.86 - $(routines) $(aux) $(sysdep_routines)) \
1.87 - $(elide-bp-thunks)
1.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
1.89 -@@ -984,7 +984,7 @@
1.90 - install: $(inst_libdir)/libc.so
1.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
1.92 - $(common-objpfx)libc.so$(libc.so-version) \
1.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
1.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
1.95 - $(libprefix)$(libc-name)) \
1.96 - $(+force)
1.97 - (echo '/* GNU ld script';\
1.98 -@@ -992,7 +992,7 @@
1.99 - echo ' the static library, so try that secondarily. */';\
1.100 - cat $<; \
1.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
1.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
1.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
1.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
1.105 - ) > $@.new
1.106 - mv -f $@.new $@
1.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
1.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
1.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
1.110 -@@ -13,7 +13,7 @@
1.111 -
1.112 - ifneq (,$($(lib)-static-only-routines))
1.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
1.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
1.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
1.116 - endif
1.117 - endif
1.118 -
1.119 -@@ -29,7 +29,7 @@
1.120 -
1.121 - # Add each flavor of library to the lists of things to build and install.
1.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
1.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
1.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
1.125 - $(patsubst %,%$o,$(filter-out \
1.126 - $($(lib)-shared-only-routines),\
1.127 - $(all-$(lib)-routines))))
1.128 -@@ -57,7 +57,7 @@
1.129 -
1.130 -
1.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
1.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
1.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
1.134 - define o-iterator-doit
1.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
1.136 - $(patsubst %,$(objpfx)%$o,\
1.137 -@@ -65,7 +65,7 @@
1.138 - $(all-$(lib)-routines))); \
1.139 - $$(build-extra-lib)
1.140 - endef
1.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
1.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
1.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
1.144 - endif
1.145 -
1.146 -@@ -77,9 +77,9 @@
1.147 - $(build-extra-lib)
1.148 - endif
1.149 -
1.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
1.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
1.152 -- $(patsubst %,$(objpfx)%.oS,\
1.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
1.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
1.155 -+ $(patsubst %,$(objpfx)%.oST,\
1.156 - $(filter $($(lib)-static-only-routines),\
1.157 - $(all-$(lib)-routines)))
1.158 - $(build-extra-lib)
1.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
1.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
1.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
1.162 -@@ -375,7 +375,7 @@
1.163 -
1.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
1.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
1.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
1.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
1.168 - $(libprefix)pthread) \
1.169 - $(+force)
1.170 - (echo '/* GNU ld script';\
1.171 -@@ -383,7 +383,7 @@
1.172 - echo ' the static library, so try that secondarily. */';\
1.173 - cat $<; \
1.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
1.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
1.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
1.177 - ')' \
1.178 - ) > $@.new
1.179 - mv -f $@.new $@
1.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
1.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
1.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
1.183 -@@ -10,4 +10,4 @@
1.184 - ASFLAGS-.op += -Wa,-Av9a
1.185 - ASFLAGS-.og += -Wa,-Av9a
1.186 - ASFLAGS-.ob += -Wa,-Av9a
1.187 --ASFLAGS-.oS += -Wa,-Av9a
1.188 -+ASFLAGS-.oST += -Wa,-Av9a