Changeset ffd1587 in clfs-sysroot


Ignore:
Timestamp:
Nov 26, 2006, 5:15:13 PM (16 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
master
Children:
ecc7b8e
Parents:
67c7aed
Message:

Patch update.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/glibc-2.5-cross_hacks-2.patch

    r67c7aed rffd1587  
    11Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org>
    2 Date: 2006-11-23
     2Date: 2006-11-26
    33Initial Package Version: 2.5
    44Origin: Joe Ciccone
    5 Upstream Status: Will not be accepted.
    6                  See, http://sourceware.org/bugzilla/show_bug.cgi?id=2838
     5Upstream Status: Unknown
    76Description: Adds native compile support to the build system then uses that
    87             support to build zic-native, for installing timezone info,
     
    109             for creating the locale-archive.
    1110
    12 diff -Naur glibc-2.5.orig/Makeconfig glibc-2.5/Makeconfig
    13 --- glibc-2.5.orig/Makeconfig   2006-11-23 23:07:52.000000000 -0500
    14 +++ glibc-2.5/Makeconfig        2006-11-23 23:08:09.000000000 -0500
    15 @@ -447,6 +447,13 @@
    16                            $(common-objpfx)libc% $(+postinit),$^) \
    17               $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
    18  endif
    19 +# Command for linking programs against the host system.
    20 +ifndef +link-native
    21 ++link-native = $(BUILD_CC) -static -g -o $@ $^ \
    22 +              $(LDFLAGS) $(LDFLAGS-$(@F)) \
    23 +              $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
    24 +              $(link-extra-libs)
    25 +endif
    26  # Command for statically linking bounded-pointer programs with the C library.
    27  ifndef +link-bounded
    28  +link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
    29 @@ -668,6 +675,8 @@
    30             $(+sysdep-includes) $(includes) \
    31             $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
    32  
    33 ++includes-native = -I$(..)include-native -I$(objpfx) -I.
    34 +
    35  # Since libio has several internal header files, we use a -I instead
    36  # of many little headers in the include directory.
    37  libio-include = -I$(..)libio
    38 @@ -682,6 +691,9 @@
    39            $(foreach lib,$(libof-$(basename $(@F))) \
    40                          $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
    41            $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
    42 +CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \
    43 +           $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \
    44 +           $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
    45  override CFLAGS        = -std=gnu99 \
    46                   $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
    47                   $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
    48 diff -Naur glibc-2.5.orig/Makerules glibc-2.5/Makerules
    49 --- glibc-2.5.orig/Makerules    2006-11-23 23:07:53.000000000 -0500
    50 +++ glibc-2.5/Makerules 2006-11-23 23:08:09.000000000 -0500
    51 @@ -292,6 +292,9 @@
    52  object-suffixes-left := $(all-object-suffixes)
    53  include $(o-iterator)
    54  
    55 +$(objpfx)%-native.o: %.c $(before-compile)
    56 +       $(native-compile-command.c)
    57 +
    58  # Omit the objpfx rules when building in the source tree, because
    59  # objpfx is empty and so these rules just override the ones above.
    60  ifdef objpfx
    61 @@ -368,6 +371,8 @@
    62  compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
    63  compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
    64  compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
    65 +# Native commands
    66 +native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
    67  
    68  # GCC can grok options after the file name, and it looks nicer that way.
    69  compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
    70 @@ -377,6 +382,8 @@
    71  COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
    72                   $(ASFLAGS) $(ASFLAGS-$(suffix $@))
    73  COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
    74 +# Native commands
    75 +native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS) $(CPPFLAGS-native)
    76  
    77  # We need this for the output to go in the right place.  It will default to
    78  # empty if make was configured to work with a cc that can't grok -c and -o
    79 @@ -1168,7 +1175,7 @@
    80  $(make-target-directory)
    81  $(patsubst %/,cd % &&,$(objpfx)) \
    82  $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
    83 -           $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
    84 +           $(addprefix $(shell pwd)/, $^) -o $(@F)
    85  endef
    86  
    87  # Command to compile $< in $(common-objdir) using the native libraries.
    88 diff -Naur glibc-2.5.orig/Rules glibc-2.5/Rules
    89 --- glibc-2.5.orig/Rules        2006-11-23 23:07:52.000000000 -0500
    90 +++ glibc-2.5/Rules     2006-11-23 23:08:09.000000000 -0500
    91 @@ -87,7 +87,7 @@
    92  
    93  .PHONY: others tests
    94  ifeq ($(build-programs),yes)
    95 -others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
    96 +others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs))
    97  else
    98  others: $(addprefix $(objpfx),$(extra-objs))
    99  endif
    100 @@ -106,9 +106,11 @@
    101  ifeq ($(build-programs),yes)
    102  binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
    103  binaries-static = $(others-static) $(tests-static) $(xtests-static)
    104 +binaries-native = $(others-native)
    105  else
    106  binaries-all = $(tests) $(xtests) $(test-srcs)
    107  binaries-static =
    108 +binaries-native =
    109  endif
    110  
    111  binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
    112 @@ -127,6 +129,11 @@
    113         $(+link-static)
    114  endif
    115  
    116 +ifneq "$(strip $(binaries-native))" ""
    117 +$(addprefix $(objpfx),$(binaries-native)): %: %.o
    118 +       $(+link-native)
    119 +endif
    120 +
    121  ifeq ($(build-bounded),yes)
    122  binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
    123  $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
     11             -2 takes into account the possibility of CFLAGS being set for
     12             the target.
     13
    12414diff -Naur glibc-2.5.orig/iconv/Makefile glibc-2.5/iconv/Makefile
    125 --- glibc-2.5.orig/iconv/Makefile       2006-11-23 23:07:51.000000000 -0500
    126 +++ glibc-2.5/iconv/Makefile    2006-11-23 23:08:09.000000000 -0500
     15--- glibc-2.5.orig/iconv/Makefile       2004-12-19 18:43:41.000000000 -0500
     16+++ glibc-2.5/iconv/Makefile    2006-11-26 17:26:05.000000000 -0500
    12717@@ -56,6 +56,9 @@
    12818                  iconvconfig.h
     
    14434 xtests: test-iconvconfig
    14535diff -Naur glibc-2.5.orig/iconvdata/Makefile glibc-2.5/iconvdata/Makefile
    146 --- glibc-2.5.orig/iconvdata/Makefile   2006-11-23 23:07:51.000000000 -0500
    147 +++ glibc-2.5/iconvdata/Makefile        2006-11-23 23:08:09.000000000 -0500
     36--- glibc-2.5.orig/iconvdata/Makefile   2006-05-01 10:18:49.000000000 -0400
     37+++ glibc-2.5/iconvdata/Makefile        2006-11-26 17:26:05.000000000 -0500
    14838@@ -311,23 +311,25 @@
    14939 
     
    18272diff -Naur glibc-2.5.orig/include-native/bits/libc-tsd.h glibc-2.5/include-native/bits/libc-tsd.h
    18373--- glibc-2.5.orig/include-native/bits/libc-tsd.h       1969-12-31 19:00:00.000000000 -0500
    184 +++ glibc-2.5/include-native/bits/libc-tsd.h    2006-11-23 23:08:09.000000000 -0500
     74+++ glibc-2.5/include-native/bits/libc-tsd.h    2006-11-26 17:26:05.000000000 -0500
    18575@@ -0,0 +1,3 @@
    18676+#ifndef __libc_tsd_define
     
    18979diff -Naur glibc-2.5.orig/include-native/config.h glibc-2.5/include-native/config.h
    19080--- glibc-2.5.orig/include-native/config.h      1969-12-31 19:00:00.000000000 -0500
    191 +++ glibc-2.5/include-native/config.h   2006-11-23 23:08:09.000000000 -0500
     81+++ glibc-2.5/include-native/config.h   2006-11-26 17:26:05.000000000 -0500
    19282@@ -0,0 +1 @@
    19383+/* Empty */
    19484diff -Naur glibc-2.5.orig/include-native/gnu/stubs.h glibc-2.5/include-native/gnu/stubs.h
    19585--- glibc-2.5.orig/include-native/gnu/stubs.h   1969-12-31 19:00:00.000000000 -0500
    196 +++ glibc-2.5/include-native/gnu/stubs.h        2006-11-23 23:08:09.000000000 -0500
     86+++ glibc-2.5/include-native/gnu/stubs.h        2006-11-26 17:26:05.000000000 -0500
    19787@@ -0,0 +1 @@
    19888+/* Empty */
    19989diff -Naur glibc-2.5.orig/include-native/intl/loadinfo.h glibc-2.5/include-native/intl/loadinfo.h
    20090--- glibc-2.5.orig/include-native/intl/loadinfo.h       1969-12-31 19:00:00.000000000 -0500
    201 +++ glibc-2.5/include-native/intl/loadinfo.h    2006-11-23 23:08:09.000000000 -0500
     91+++ glibc-2.5/include-native/intl/loadinfo.h    2006-11-26 17:26:05.000000000 -0500
    20292@@ -0,0 +1,4 @@
    20393+#ifndef LOADINFO_H
     
    20797diff -Naur glibc-2.5.orig/include-native/libintl.h glibc-2.5/include-native/libintl.h
    20898--- glibc-2.5.orig/include-native/libintl.h     1969-12-31 19:00:00.000000000 -0500
    209 +++ glibc-2.5/include-native/libintl.h  2006-11-23 23:08:09.000000000 -0500
     99+++ glibc-2.5/include-native/libintl.h  2006-11-26 17:26:05.000000000 -0500
    210100@@ -0,0 +1,13 @@
    211101+#include_next <libintl.h>
     
    224114diff -Naur glibc-2.5.orig/include-native/symbol-hacks.h glibc-2.5/include-native/symbol-hacks.h
    225115--- glibc-2.5.orig/include-native/symbol-hacks.h        1969-12-31 19:00:00.000000000 -0500
    226 +++ glibc-2.5/include-native/symbol-hacks.h     2006-11-23 23:08:09.000000000 -0500
     116+++ glibc-2.5/include-native/symbol-hacks.h     2006-11-26 17:26:05.000000000 -0500
    227117@@ -0,0 +1 @@
    228118+/* Empty */
    229119diff -Naur glibc-2.5.orig/include-native/tls.h glibc-2.5/include-native/tls.h
    230120--- glibc-2.5.orig/include-native/tls.h 1969-12-31 19:00:00.000000000 -0500
    231 +++ glibc-2.5/include-native/tls.h      2006-11-23 23:08:09.000000000 -0500
     121+++ glibc-2.5/include-native/tls.h      2006-11-26 17:26:05.000000000 -0500
    232122@@ -0,0 +1,11 @@
    233123+#ifndef _include_tls_h
     
    243133+#endif
    244134diff -Naur glibc-2.5.orig/locale/Makefile glibc-2.5/locale/Makefile
    245 --- glibc-2.5.orig/locale/Makefile      2006-11-23 23:07:53.000000000 -0500
    246 +++ glibc-2.5/locale/Makefile   2006-11-23 23:08:09.000000000 -0500
     135--- glibc-2.5.orig/locale/Makefile      2005-12-20 01:58:41.000000000 -0500
     136+++ glibc-2.5/locale/Makefile   2006-11-26 17:26:05.000000000 -0500
    247137@@ -44,6 +44,9 @@
    248138 aux            = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
     
    269159        mv -f $@.tmp $@
    270160diff -Naur glibc-2.5.orig/localedata/Makefile glibc-2.5/localedata/Makefile
    271 --- glibc-2.5.orig/localedata/Makefile  2006-11-23 23:07:52.000000000 -0500
    272 +++ glibc-2.5/localedata/Makefile       2006-11-23 23:08:09.000000000 -0500
     161--- glibc-2.5.orig/localedata/Makefile  2006-04-26 01:14:03.000000000 -0400
     162+++ glibc-2.5/localedata/Makefile       2006-11-26 17:26:05.000000000 -0500
    273163@@ -206,8 +206,13 @@
    274164 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
     
    285175 
    286176 install-locales-dir:
     177diff -Naur glibc-2.5.orig/Makeconfig glibc-2.5/Makeconfig
     178--- glibc-2.5.orig/Makeconfig   2006-07-10 17:42:27.000000000 -0400
     179+++ glibc-2.5/Makeconfig        2006-11-26 18:24:54.000000000 -0500
     180@@ -447,6 +447,13 @@
     181                           $(common-objpfx)libc% $(+postinit),$^) \
     182              $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
     183 endif
     184+# Command for linking programs against the host system.
     185+ifndef +link-native
     186++link-native = $(BUILD_CC) -static -g -o $@ $^ \
     187+              $(LDFLAGS) $(LDFLAGS-$(@F)) \
     188+              $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
     189+              $(link-extra-libs)
     190+endif
     191 # Command for statically linking bounded-pointer programs with the C library.
     192 ifndef +link-bounded
     193 +link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
     194@@ -660,6 +667,8 @@
     195            $(+sysdep-includes) $(includes) \
     196            $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
     197 
     198++includes-native = -I$(..)include-native -I$(objpfx) -I.
     199+
     200 # Since libio has several internal header files, we use a -I instead
     201 # of many little headers in the include directory.
     202 libio-include = -I$(..)libio
     203@@ -674,10 +683,15 @@
     204           $(foreach lib,$(libof-$(basename $(@F))) \
     205                         $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
     206           $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
     207+CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \
     208+           $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \
     209+           $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
     210 override CFLAGS        = -std=gnu99 \
     211                  $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
     212                  $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
     213                  $(CFLAGS-$(@F))
     214+override CFLAGS-native = -std=gnu99 $(default_cflags) $(+gccwarn-c) \
     215+                  $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
     216 override CXXFLAGS = $(c++-sysincludes) \
     217                    $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
     218                    $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
     219diff -Naur glibc-2.5.orig/Makerules glibc-2.5/Makerules
     220--- glibc-2.5.orig/Makerules    2006-09-04 22:02:13.000000000 -0400
     221+++ glibc-2.5/Makerules 2006-11-26 18:15:25.000000000 -0500
     222@@ -292,6 +292,9 @@
     223 object-suffixes-left := $(all-object-suffixes)
     224 include $(o-iterator)
     225 
     226+$(objpfx)%-native.o: %.c $(before-compile)
     227+       $(native-compile-command.c)
     228+
     229 # Omit the objpfx rules when building in the source tree, because
     230 # objpfx is empty and so these rules just override the ones above.
     231 ifdef objpfx
     232@@ -368,6 +371,8 @@
     233 compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
     234 compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
     235 compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
     236+# Native commands
     237+native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
     238 
     239 # GCC can grok options after the file name, and it looks nicer that way.
     240 compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
     241@@ -377,6 +382,8 @@
     242 COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
     243                  $(ASFLAGS) $(ASFLAGS-$(suffix $@))
     244 COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
     245+# Native commands
     246+native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native)
     247 
     248 # We need this for the output to go in the right place.  It will default to
     249 # empty if make was configured to work with a cc that can't grok -c and -o
     250@@ -1168,7 +1175,7 @@
     251 $(make-target-directory)
     252 $(patsubst %/,cd % &&,$(objpfx)) \
     253 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
     254-           $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
     255+           $(addprefix $(shell pwd)/, $^) -o $(@F)
     256 endef
     257 
     258 # Command to compile $< in $(common-objdir) using the native libraries.
    287259diff -Naur glibc-2.5.orig/malloc/Makefile glibc-2.5/malloc/Makefile
    288 --- glibc-2.5.orig/malloc/Makefile      2006-11-23 23:07:52.000000000 -0500
    289 +++ glibc-2.5/malloc/Makefile   2006-11-23 23:08:09.000000000 -0500
     260--- glibc-2.5.orig/malloc/Makefile      2006-05-19 12:42:00.000000000 -0400
     261+++ glibc-2.5/malloc/Makefile   2006-11-26 17:26:05.000000000 -0500
    290262@@ -73,10 +73,6 @@
    291263 endif
     
    307279 # Another goal which can be used to override the configure decision.
    308280 .PHONY: do-memusagestat
     281diff -Naur glibc-2.5.orig/Rules glibc-2.5/Rules
     282--- glibc-2.5.orig/Rules        2006-02-28 02:05:48.000000000 -0500
     283+++ glibc-2.5/Rules     2006-11-26 17:26:05.000000000 -0500
     284@@ -87,7 +87,7 @@
     285 
     286 .PHONY: others tests
     287 ifeq ($(build-programs),yes)
     288-others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
     289+others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs))
     290 else
     291 others: $(addprefix $(objpfx),$(extra-objs))
     292 endif
     293@@ -106,9 +106,11 @@
     294 ifeq ($(build-programs),yes)
     295 binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
     296 binaries-static = $(others-static) $(tests-static) $(xtests-static)
     297+binaries-native = $(others-native)
     298 else
     299 binaries-all = $(tests) $(xtests) $(test-srcs)
     300 binaries-static =
     301+binaries-native =
     302 endif
     303 
     304 binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
     305@@ -127,6 +129,11 @@
     306        $(+link-static)
     307 endif
     308 
     309+ifneq "$(strip $(binaries-native))" ""
     310+$(addprefix $(objpfx),$(binaries-native)): %: %.o
     311+       $(+link-native)
     312+endif
     313+
     314 ifeq ($(build-bounded),yes)
     315 binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
     316 $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
    309317diff -Naur glibc-2.5.orig/sunrpc/Makefile glibc-2.5/sunrpc/Makefile
    310 --- glibc-2.5.orig/sunrpc/Makefile      2006-11-23 23:07:52.000000000 -0500
    311 +++ glibc-2.5/sunrpc/Makefile   2006-11-23 23:08:09.000000000 -0500
     318--- glibc-2.5.orig/sunrpc/Makefile      2005-06-26 14:24:19.000000000 -0400
     319+++ glibc-2.5/sunrpc/Makefile   2006-11-26 17:26:05.000000000 -0500
    312320@@ -70,6 +70,9 @@
    313321            clnt_unix svc_unix create_xid xdr_intXX_t
     
    382390        $(move-if-change) $(@:stmp=T) $(@:stmp=c)
    383391diff -Naur glibc-2.5.orig/timezone/Makefile glibc-2.5/timezone/Makefile
    384 --- glibc-2.5.orig/timezone/Makefile    2006-11-23 23:07:53.000000000 -0500
    385 +++ glibc-2.5/timezone/Makefile 2006-11-23 23:08:09.000000000 -0500
     392--- glibc-2.5.orig/timezone/Makefile    2005-04-15 16:09:08.000000000 -0400
     393+++ glibc-2.5/timezone/Makefile 2006-11-26 17:26:05.000000000 -0500
    386394@@ -28,6 +28,9 @@
    387395 extra-objs := scheck.o ialloc.o
Note: See TracChangeset for help on using the changeset viewer.