Changeset ffd1587 in clfs-sysroot
- Timestamp:
- Nov 26, 2006, 5:15:13 PM (18 years ago)
- Branches:
- master
- Children:
- ecc7b8e
- Parents:
- 67c7aed
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/glibc-2.5-cross_hacks-2.patch
r67c7aed rffd1587 1 1 Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org> 2 Date: 2006-11-2 32 Date: 2006-11-26 3 3 Initial Package Version: 2.5 4 4 Origin: Joe Ciccone 5 Upstream Status: Will not be accepted. 6 See, http://sourceware.org/bugzilla/show_bug.cgi?id=2838 5 Upstream Status: Unknown 7 6 Description: Adds native compile support to the build system then uses that 8 7 support to build zic-native, for installing timezone info, … … 10 9 for creating the locale-archive. 11 10 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 124 14 diff -Naur glibc-2.5.orig/iconv/Makefile glibc-2.5/iconv/Makefile 125 --- glibc-2.5.orig/iconv/Makefile 200 6-11-23 23:07:51.000000000 -0500126 +++ glibc-2.5/iconv/Makefile 2006-11-2 3 23:08:09.000000000 -050015 --- 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 127 17 @@ -56,6 +56,9 @@ 128 18 iconvconfig.h … … 144 34 xtests: test-iconvconfig 145 35 diff -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 -0500147 +++ glibc-2.5/iconvdata/Makefile 2006-11-2 3 23:08:09.000000000 -050036 --- 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 148 38 @@ -311,23 +311,25 @@ 149 39 … … 182 72 diff -Naur glibc-2.5.orig/include-native/bits/libc-tsd.h glibc-2.5/include-native/bits/libc-tsd.h 183 73 --- 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-2 3 23:08:09.000000000 -050074 +++ glibc-2.5/include-native/bits/libc-tsd.h 2006-11-26 17:26:05.000000000 -0500 185 75 @@ -0,0 +1,3 @@ 186 76 +#ifndef __libc_tsd_define … … 189 79 diff -Naur glibc-2.5.orig/include-native/config.h glibc-2.5/include-native/config.h 190 80 --- 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-2 3 23:08:09.000000000 -050081 +++ glibc-2.5/include-native/config.h 2006-11-26 17:26:05.000000000 -0500 192 82 @@ -0,0 +1 @@ 193 83 +/* Empty */ 194 84 diff -Naur glibc-2.5.orig/include-native/gnu/stubs.h glibc-2.5/include-native/gnu/stubs.h 195 85 --- 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-2 3 23:08:09.000000000 -050086 +++ glibc-2.5/include-native/gnu/stubs.h 2006-11-26 17:26:05.000000000 -0500 197 87 @@ -0,0 +1 @@ 198 88 +/* Empty */ 199 89 diff -Naur glibc-2.5.orig/include-native/intl/loadinfo.h glibc-2.5/include-native/intl/loadinfo.h 200 90 --- 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-2 3 23:08:09.000000000 -050091 +++ glibc-2.5/include-native/intl/loadinfo.h 2006-11-26 17:26:05.000000000 -0500 202 92 @@ -0,0 +1,4 @@ 203 93 +#ifndef LOADINFO_H … … 207 97 diff -Naur glibc-2.5.orig/include-native/libintl.h glibc-2.5/include-native/libintl.h 208 98 --- 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-2 3 23:08:09.000000000 -050099 +++ glibc-2.5/include-native/libintl.h 2006-11-26 17:26:05.000000000 -0500 210 100 @@ -0,0 +1,13 @@ 211 101 +#include_next <libintl.h> … … 224 114 diff -Naur glibc-2.5.orig/include-native/symbol-hacks.h glibc-2.5/include-native/symbol-hacks.h 225 115 --- 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-2 3 23:08:09.000000000 -0500116 +++ glibc-2.5/include-native/symbol-hacks.h 2006-11-26 17:26:05.000000000 -0500 227 117 @@ -0,0 +1 @@ 228 118 +/* Empty */ 229 119 diff -Naur glibc-2.5.orig/include-native/tls.h glibc-2.5/include-native/tls.h 230 120 --- 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-2 3 23:08:09.000000000 -0500121 +++ glibc-2.5/include-native/tls.h 2006-11-26 17:26:05.000000000 -0500 232 122 @@ -0,0 +1,11 @@ 233 123 +#ifndef _include_tls_h … … 243 133 +#endif 244 134 diff -Naur glibc-2.5.orig/locale/Makefile glibc-2.5/locale/Makefile 245 --- glibc-2.5.orig/locale/Makefile 200 6-11-23 23:07:53.000000000 -0500246 +++ glibc-2.5/locale/Makefile 2006-11-2 3 23:08:09.000000000 -0500135 --- 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 247 137 @@ -44,6 +44,9 @@ 248 138 aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \ … … 269 159 mv -f $@.tmp $@ 270 160 diff -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 -0500272 +++ glibc-2.5/localedata/Makefile 2006-11-2 3 23:08:09.000000000 -0500161 --- 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 273 163 @@ -206,8 +206,13 @@ 274 164 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) … … 285 175 286 176 install-locales-dir: 177 diff -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)) 219 diff -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. 287 259 diff -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 -0500289 +++ glibc-2.5/malloc/Makefile 2006-11-2 3 23:08:09.000000000 -0500260 --- 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 290 262 @@ -73,10 +73,6 @@ 291 263 endif … … 307 279 # Another goal which can be used to override the configure decision. 308 280 .PHONY: do-memusagestat 281 diff -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 \ 309 317 diff -Naur glibc-2.5.orig/sunrpc/Makefile glibc-2.5/sunrpc/Makefile 310 --- glibc-2.5.orig/sunrpc/Makefile 200 6-11-23 23:07:52.000000000 -0500311 +++ glibc-2.5/sunrpc/Makefile 2006-11-2 3 23:08:09.000000000 -0500318 --- 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 312 320 @@ -70,6 +70,9 @@ 313 321 clnt_unix svc_unix create_xid xdr_intXX_t … … 382 390 $(move-if-change) $(@:stmp=T) $(@:stmp=c) 383 391 diff -Naur glibc-2.5.orig/timezone/Makefile glibc-2.5/timezone/Makefile 384 --- glibc-2.5.orig/timezone/Makefile 200 6-11-23 23:07:53.000000000 -0500385 +++ glibc-2.5/timezone/Makefile 2006-11-2 3 23:08:09.000000000 -0500392 --- 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 386 394 @@ -28,6 +28,9 @@ 387 395 extra-objs := scheck.o ialloc.o
Note:
See TracChangeset
for help on using the changeset viewer.