summaryrefslogtreecommitdiff
path: root/patches/glibc/20040827/glibc-2.3.3-cygwin.patch
blob: 0ad9a717286be0aa5c55f2c2949262fe70a0bdc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Fixes
elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
...
when building glibc-2.3.3 on cygwin

Idea from
http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
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-linuxthreads-2.3.3 also requires a patch, see 
../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch

[ Rediffed against glibc-2.3.3 ]


diff -aur glibc-2.3.3/Makeconfig glibc-2.3.3-cygwin/Makeconfig
--- glibc-2.3.3/Makeconfig	2003-09-17 01:36:10.000000000 -0700
+++ glibc-2.3.3-cygwin/Makeconfig	2004-08-27 20:34:43.000000000 -0700
@@ -439,13 +439,13 @@
 # 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)
 # This is how to find at build-time things that will be installed there.
 rpath-dirs = math elf dlfcn nss nis rt resolv crypt
 else
 ifneq (,$(filter aix aix%,$(config-os)))
 link-libc = $(common-objpfx)libc.a \
-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
+	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
 rpath-dirs = math dlfcn nss nis rt resolv crypt
 endif
 endif
@@ -658,7 +658,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))
@@ -714,14 +714,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 -DLIBC_NONSHARED=1
-libtype.oS = lib%_nonshared.a
+CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
+libtype.oST = lib%_nonshared.a
 endif
 
 # The assembler can generate debug information too.
diff -aur glibc-2.3.3/Makerules glibc-2.3.3-cygwin/Makerules
--- glibc-2.3.3/Makerules	2003-10-31 16:35:57.000000000 -0800
+++ glibc-2.3.3-cygwin/Makerules	2004-08-27 20:33:47.000000000 -0700
@@ -414,7 +414,7 @@
 # Bounded pointer thunks are only built for *.ob
 elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
 
-elide-routines.oS += $(filter-out $(static-only-routines),\
+elide-routines.oST += $(filter-out $(static-only-routines),\
 				  $(routines) $(aux) $(sysdep_routines)) \
 		     $(elide-bp-thunks)
 elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
@@ -934,7 +934,7 @@
 install: $(inst_libdir)/libc.so
 $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
 			$(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';\
@@ -942,7 +942,7 @@
 	 echo '   the static library, so try that secondarily.  */';\
 	 cat $<; \
 	 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 $@
diff -aur glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
--- glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile	2002-08-29 03:41:15.000000000 -0700
+++ glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-27 20:35:43.000000000 -0700
@@ -10,4 +10,4 @@
 ASFLAGS-.op += -Wa,-Av9a
 ASFLAGS-.og += -Wa,-Av9a
 ASFLAGS-.ob += -Wa,-Av9a
-ASFLAGS-.oS += -Wa,-Av9a
+ASFLAGS-.oST += -Wa,-Av9a