patches/glibc/2.3.4/bad/glibc-2.3.4-cygwin.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes
     2 elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
     3 ...
     4 when building glibc-2.3.3 on cygwin
     5 
     6 Idea from
     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')
    11 
    12 glibc-linuxthreads-2.3.3 also requires a patch, see 
    13 ../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
    14 
    15 [ Rediffed against glibc-2.3.3 ]
    16 
    17 
    18 diff -urN glibc-2.3.4-orig/Makeconfig glibc-2.3.4/Makeconfig
    19 --- glibc-2.3.4-orig/Makeconfig	2004-12-15 19:51:47.000000000 +0100
    20 +++ glibc-2.3.4/Makeconfig	2005-03-13 18:54:58.000000000 +0100
    21 @@ -449,7 +449,7 @@
    22  # run the linked programs.
    23  link-libc = -Wl,-rpath-link=$(rpath-link) \
    24  	    $(common-objpfx)libc.so$(libc.so-version) \
    25 -	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
    26 +            $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
    27  # This is how to find at build-time things that will be installed there.
    28  rpath-dirs = math elf dlfcn nss nis rt resolv crypt
    29  endif
    30 @@ -667,7 +667,7 @@
    31  # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
    32  # to pass different flags for each flavor.
    33  libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
    34 -all-object-suffixes := .o .os .op .og .ob .oS
    35 +all-object-suffixes := .o .os .op .og .ob .oST
    36  object-suffixes :=
    37  CPPFLAGS-.o = $(pic-default)
    38  CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
    39 @@ -723,14 +723,14 @@
    40  
    41  ifeq (yes,$(build-shared))
    42  # Build special library that contains the static-only routines for libc.
    43 -object-suffixes-for-libc += .oS
    44 +object-suffixes-for-libc += .oST
    45  
    46  # Must build the routines as PIC, though, because they can end up in (users')
    47  # shared objects.  We don't want to use CFLAGS-os because users may, for
    48  # example, make that processor-specific.
    49 -CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
    50 -CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
    51 -libtype.oS = lib%_nonshared.a
    52 +CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
    53 +CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
    54 +libtype.oST = lib%_nonshared.a
    55  endif
    56  
    57  # The assembler can generate debug information too.
    58 diff -urN glibc-2.3.4-orig/Makerules glibc-2.3.4/Makerules
    59 --- glibc-2.3.4-orig/Makerules	2004-12-15 19:52:39.000000000 +0100
    60 +++ glibc-2.3.4/Makerules	2005-03-13 18:50:09.000000000 +0100
    61 @@ -416,7 +416,7 @@
    62  # Bounded pointer thunks are only built for *.ob
    63  elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
    64  
    65 -elide-routines.oS += $(filter-out $(static-only-routines),\
    66 +elide-routines.oST += $(filter-out $(static-only-routines),\
    67  				  $(routines) $(aux) $(sysdep_routines)) \
    68  		     $(elide-bp-thunks)
    69  elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
    70 @@ -961,7 +961,7 @@
    71  install: $(inst_libdir)/libc.so
    72  $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
    73  			$(common-objpfx)libc.so$(libc.so-version) \
    74 -			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
    75 +			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
    76  						  $(libprefix)$(libc-name)) \
    77  			$(+force)
    78  	(echo '/* GNU ld script';\
    79 @@ -969,7 +969,7 @@
    80  	 echo '   the static library, so try that secondarily.  */';\
    81  	 cat $<; \
    82  	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
    83 -	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
    84 +	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
    85  	      ')' \
    86  	) > $@.new
    87  	mv -f $@.new $@
    88 diff -urN glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile
    89 --- glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
    90 +++ glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-03-13 18:50:09.000000000 +0100
    91 @@ -10,4 +10,4 @@
    92  ASFLAGS-.op += -Wa,-Av9a
    93  ASFLAGS-.og += -Wa,-Av9a
    94  ASFLAGS-.ob += -Wa,-Av9a
    95 -ASFLAGS-.oS += -Wa,-Av9a
    96 +ASFLAGS-.oST += -Wa,-Av9a