source:
clfs-sysroot/patches/glibc-2.8-cross_hacks-1.patch@
af447da
Last change on this file since af447da was cf77be8, checked in by , 16 years ago | |
---|---|
|
|
File size: 16.5 KB |
-
iconv/Makefile
Submitted By: Joe Ciccone <jciccone@gmail.com> Date: 2006-11-26 Initial Package Version: 2.5 Rediffed against 2.6 by Joe Ciccone Rediffed against 2.8 by Joe Ciccone on 2009-01-03 Origin: Joe Ciccone Upstream Status: Unknown Description: Adds native compile support to the build system then uses that support to build zic-native, for installing timezone info, rpcgen-native, for building librpcsvc.a, and localedef-native, for creating the locale-archive. diff -Naur glibc-2.8.orig/iconv/Makefile glibc-2.8/iconv/Makefile
old new 57 57 iconvconfig.h 58 58 59 59 others = iconv_prog iconvconfig 60 ifneq ($(cross-compiling),no) 61 others-native = iconvconfig-native 62 endif 60 63 install-others-programs = $(inst_bindir)/iconv 61 64 install-sbin = iconvconfig 62 65 … … 79 82 80 83 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o) 81 84 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o) 85 $(objpfx)iconvconfig-native: $(iconvconfig-modules:%=$(objpfx)%-native.o) 82 86 83 87 ifneq ($(cross-compiling),yes) 84 88 xtests: test-iconvconfig -
iconvdata/Makefile
diff -Naur glibc-2.8.orig/iconvdata/Makefile glibc-2.8/iconvdata/Makefile
old new 317 317 318 318 headers: $(addprefix $(objpfx), $(generated-modules:=.h)) 319 319 320 ifeq ($(cross-compiling),no) 321 iconvconfig-cmd = LC_ALL=C LANGUAGE=C \ 322 $(common-objpfx)elf/ld.so --library-path $(rpath-link) \ 323 $(common-objpfx)iconv/iconvconfig 324 else 325 iconvconfig-cmd = LC_ALL=C LANGUAGE=C \ 326 $(common-objpfx)iconv/iconvconfig-native 327 endif 328 320 329 $(addprefix $(inst_gconvdir)/, $(modules.so)): \ 321 330 $(inst_gconvdir)/%: $(objpfx)% $(+force) 322 331 $(do-install-program) 323 332 $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) 324 333 $(do-install) 325 ifeq (no,$(cross-compiling))326 334 # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary 327 335 # if this libc has more gconv modules than the previously installed one. 328 336 if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ 329 LC_ALL=C LANGUAGE=C \ 330 $(common-objpfx)elf/ld.so --library-path $(rpath-link) \ 331 $(common-objpfx)iconv/iconvconfig \ 332 $(addprefix --prefix=,$(install_root)); \ 337 $(iconvconfig-cmd) $(addprefix --prefix=,$(install_root)); \ 333 338 fi 334 else335 @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'336 endif337 339 338 340 endif # build-shared = yes 339 341 -
include-native/bits/libc-tsd.h
diff -Naur glibc-2.8.orig/include-native/bits/libc-tsd.h glibc-2.8/include-native/bits/libc-tsd.h
old new 1 #ifndef __libc_tsd_define 2 #define __libc_tsd_define(A,B) 3 #endif -
include-native/config.h
diff -Naur glibc-2.8.orig/include-native/config.h glibc-2.8/include-native/config.h
old new 1 /* Empty */ -
include-native/gnu/stubs.h
diff -Naur glibc-2.8.orig/include-native/gnu/stubs.h glibc-2.8/include-native/gnu/stubs.h
old new 1 /* Empty */ -
include-native/intl/loadinfo.h
diff -Naur glibc-2.8.orig/include-native/intl/loadinfo.h glibc-2.8/include-native/intl/loadinfo.h
old new 1 #ifndef LOADINFO_H 2 #define LOADINFO_H 3 struct loaded_l10nfile; 4 #endif -
include-native/libintl.h
diff -Naur glibc-2.8.orig/include-native/libintl.h glibc-2.8/include-native/libintl.h
old new 1 #include_next <libintl.h> 2 3 #ifndef _ 4 #define _(X) (X) 5 #endif 6 7 #ifndef N_ 8 #define N_(X) (X) 9 #endif 10 11 #ifndef _libc_intl_domainname 12 #define _libc_intl_domainname "libc" 13 #endif -
include-native/symbol-hacks.h
diff -Naur glibc-2.8.orig/include-native/symbol-hacks.h glibc-2.8/include-native/symbol-hacks.h
old new 1 /* Empty */ -
include-native/tls.h
diff -Naur glibc-2.8.orig/include-native/tls.h glibc-2.8/include-native/tls.h
old new 1 #ifndef _include_tls_h 2 #define _include_tls_h 1 3 4 #if USE_TLS && HAVE___THREAD \ 5 && (!defined NOT_IN_libc || defined IS_IN_libpthread) 6 # define USE___THREAD 1 7 #else 8 # define USE___THREAD 0 9 #endif 10 11 #endif -
locale/Makefile
diff -Naur glibc-2.8.orig/locale/Makefile glibc-2.8/locale/Makefile
old new 44 44 aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \ 45 45 xlocale localename global-locale coll-lookup 46 46 others = localedef locale 47 ifneq ($(cross-compiling),no) 48 others-native = localedef-native 49 endif 47 50 #others-static = localedef locale 48 51 install-bin = localedef locale 49 52 extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \ … … 81 84 $(objpfx)locale: $(locale-modules:%=$(objpfx)%.o) 82 85 $(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o) 83 86 87 ifneq ($(cross-compiling),no) 88 $(objpfx)localedef-native: $(localedef-modules:%=$(objpfx)%-native.o) 89 $(objpfx)localedef-native: $(localedef-aux:%=$(objpfx)%-native.o) 90 $(objpfx)localedef-native: $(lib-modules:%=$(objpfx)%-native.o) 91 endif 92 84 93 C-translit.h: C-translit.h.in gen-translit.pl 85 94 $(PERL) gen-translit.pl < $< > $@.tmp 86 95 mv -f $@.tmp $@ -
localedata/Makefile
diff -Naur glibc-2.8.orig/localedata/Makefile glibc-2.8/localedata/Makefile
old new 207 207 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) 208 208 209 209 # Sometimes the whole collection of locale files should be installed. 210 ifeq ($(cross-compiling),no) 210 211 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ 211 212 $(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef 213 else 214 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ 215 $(common-objpfx)locale/localedef-native 216 endif 212 217 install-locales: $(INSTALL-SUPPORTED-LOCALES) 213 218 214 219 install-locales-dir: -
Makeconfig
diff -Naur glibc-2.8.orig/Makeconfig glibc-2.8/Makeconfig
old new 446 446 $(common-objpfx)libc% $(+postinit),$^) \ 447 447 $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) 448 448 endif 449 # Command for linking programs against the host system. 450 ifndef +link-native 451 +link-native = $(BUILD_CC) -static -g -o $@ $^ \ 452 $(LDFLAGS) $(LDFLAGS-$(@F)) \ 453 $(combreloc-LDFLAGS) $(relro-LDFLAGS) \ 454 $(link-extra-libs) 455 endif 449 456 # Command for statically linking bounded-pointer programs with the C library. 450 457 ifndef +link-bounded 451 458 +link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \ … … 659 666 $(+sysdep-includes) $(includes) \ 660 667 $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) 661 668 669 +includes-native = -I$(..)include-native -I$(objpfx) -I. 670 662 671 # Since libio has several internal header files, we use a -I instead 663 672 # of many little headers in the include directory. 664 673 libio-include = -I$(..)libio … … 673 682 $(foreach lib,$(libof-$(basename $(@F))) \ 674 683 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \ 675 684 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) 685 CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \ 686 $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \ 687 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) 676 688 override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \ 677 689 $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \ 678 690 $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \ 679 691 $(CFLAGS-$(@F)) 692 override CFLAGS-native = -std=gnu99 $(gnu89-inline-CFLAGS) $(default_cflags) $(+gccwarn-c) \ 693 $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F)) 680 694 override CXXFLAGS = $(c++-sysincludes) \ 681 695 $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \ 682 696 $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F)) -
Makerules
diff -Naur glibc-2.8.orig/Makerules glibc-2.8/Makerules
old new 278 278 object-suffixes-left := $(all-object-suffixes) 279 279 include $(o-iterator) 280 280 281 $(objpfx)%-native.o: %.c $(before-compile) 282 $(native-compile-command.c) 283 281 284 # Omit the objpfx rules when building in the source tree, because 282 285 # objpfx is empty and so these rules just override the ones above. 283 286 ifdef objpfx … … 354 357 compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags) 355 358 compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) 356 359 compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags) 360 # Native commands 361 native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) 357 362 358 363 # GCC can grok options after the file name, and it looks nicer that way. 359 364 compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) … … 363 368 COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \ 364 369 $(ASFLAGS) $(ASFLAGS-$(suffix $@)) 365 370 COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS) 371 # Native commands 372 native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native) 366 373 367 374 # We need this for the output to go in the right place. It will default to 368 375 # empty if make was configured to work with a cc that can't grok -c and -o … … 1156 1163 $(make-target-directory) 1157 1164 $(patsubst %/,cd % &&,$(objpfx)) \ 1158 1165 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \ 1159 $( firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)1166 $(addprefix $(shell pwd)/, $^) -o $(@F) 1160 1167 endef 1161 1168 1162 1169 # Command to compile $< in $(common-objdir) using the native libraries. -
malloc/Makefile
diff -Naur glibc-2.8.orig/malloc/Makefile glibc-2.8/malloc/Makefile
old new 73 73 endif 74 74 endif 75 75 76 # Unless we get a test for the availability of libgd which also works77 # for cross-compiling we disable the memusagestat generation in this78 # situation.79 ifneq ($(cross-compiling),yes)80 76 # If the gd library is available we build the `memusagestat' program. 81 77 ifneq ($(LIBGD),no) 82 78 others: $(objpfx)memusage … … 91 87 # is to presume that the standard system headers will be ok for this file. 92 88 $(objpfx)memusagestat.o: sysincludes = # nothing 93 89 endif 94 endif95 90 96 91 # Another goal which can be used to override the configure decision. 97 92 .PHONY: do-memusagestat -
glibc-2.8
diff -Naur glibc-2.8.orig/Rules glibc-2.8/Rules
old new 87 87 88 88 .PHONY: others tests 89 89 ifeq ($(build-programs),yes) 90 others: $(addprefix $(objpfx),$(others) $( sysdep-others) $(extra-objs))90 others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs)) 91 91 else 92 92 others: $(addprefix $(objpfx),$(extra-objs)) 93 93 endif … … 106 106 ifeq ($(build-programs),yes) 107 107 binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs) 108 108 binaries-static = $(others-static) $(tests-static) $(xtests-static) 109 binaries-native = $(others-native) 109 110 else 110 111 binaries-all = $(tests) $(xtests) $(test-srcs) 111 112 binaries-static = 113 binaries-native = 112 114 endif 113 115 114 116 binaries-shared = $(filter-out $(binaries-static), $(binaries-all)) … … 127 129 $(+link-static) 128 130 endif 129 131 132 ifneq "$(strip $(binaries-native))" "" 133 $(addprefix $(objpfx),$(binaries-native)): %: %.o 134 $(+link-native) 135 endif 136 130 137 ifeq ($(build-bounded),yes) 131 138 binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs)) 132 139 $(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \ -
sunrpc/Makefile
diff -Naur glibc-2.8.orig/sunrpc/Makefile glibc-2.8/sunrpc/Makefile
old new 70 70 clnt_unix svc_unix create_xid xdr_intXX_t 71 71 72 72 others := rpcinfo 73 ifneq ($(cross-compiling),no) 74 others-native := rpcgen-native 75 endif 73 76 install-bin := rpcgen 74 77 install-sbin := rpcinfo 75 78 rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \ … … 98 101 $(resolvobjdir)/libresolv.a 99 102 endif 100 103 101 ifeq (no,$(cross-compiling))102 # We can only build this library if we can run the rpcgen we build.103 104 headers += $(rpcsvc:%.x=rpcsvc/%.h) 104 105 extra-libs := librpcsvc 105 106 extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass. 106 107 librpcsvc-routines = $(rpcsvc:%.x=x%) 107 108 librpcsvc-inhibit-o = .os # Build no shared rpcsvc library. 108 109 omit-deps = $(librpcsvc-routines) 109 endif110 110 111 111 CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag) 112 112 CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag) … … 136 136 $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) 137 137 $(+link) 138 138 139 ifneq ($(cross-compiling),no) 140 rpcgen.c: 141 touch rpcgen.c 142 143 $(objpfx)rpcgen-native: $(addprefix $(objpfx),$(rpcgen-objs:%.o=%-native.o)) 144 endif 145 139 146 # This makes sure -DNOT_IN_libc is passed for all these modules. 140 147 cpp-srcs-left := $(rpcgen-objs:.o=.c) 141 148 lib := nonlib 142 149 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) 143 150 144 151 # Tell rpcgen where to find the C preprocessor. 152 ifeq ($(cross-compiling),no) 145 153 rpcgen-cmd = CPP='$(CC) -E -x c-header' $(built-program-cmd) -Y ../scripts 154 rpcgen = $(objpfx)rpcgen 155 else 156 rpcgen-cmd = CPP='$(CC) -E -x c-header' $(objpfx)rpcgen-native -Y ../scripts 157 rpcgen = $(objpfx)rpcgen-native 158 endif 146 159 147 160 # Install the rpc data base file. 148 161 $(inst_sysconfdir)/rpc: etc.rpc $(+force) … … 153 166 # relinked. 154 167 $(rpcsvc:%.x=$(objpfx)rpcsvc/%.h): $(objpfx)rpcsvc/%.h: $(objpfx)rpcsvc/%.stmp 155 168 @: 156 $(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $( objpfx)rpcgen169 $(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(rpcgen) 157 170 $(make-target-directory) 158 171 -@rm -f ${@:stmp=T} $@ 159 172 $(rpcgen-cmd) -h $< -o ${@:stmp=T} … … 163 176 # Generate the rpcsvc XDR functions with rpcgen. 164 177 $(rpcsvc:%.x=$(objpfx)x%.c): $(objpfx)x%.c: $(objpfx)x%.stmp 165 178 @: 166 $(objpfx)x%.stmp: rpcsvc/%.x $( objpfx)rpcgen179 $(objpfx)x%.stmp: rpcsvc/%.x $(rpcgen) 167 180 -@rm -f ${@:stmp=T} $@ 168 181 $(rpcgen-cmd) -c $< -o ${@:stmp=T} 169 182 $(move-if-change) $(@:stmp=T) $(@:stmp=c) -
timezone/Makefile
diff -Naur glibc-2.8.orig/timezone/Makefile glibc-2.8/timezone/Makefile
old new 28 28 extra-objs := scheck.o ialloc.o 29 29 30 30 others := zdump zic 31 ifneq ($(cross-compiling),no) 32 others-native := zic-native 33 endif 31 34 tests := test-tz tst-timezone 32 35 33 36 tzbases := africa antarctica asia australasia europe northamerica \ … … 69 72 $(addprefix $(inst_zonedir)/, \ 70 73 $(posixrules-file))) 71 74 72 ifeq ($(cross-compiling),no)73 # Don't try to install the zoneinfo files since we can't run zic.74 75 install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \ 75 76 $(zonenames:%=posix/%) \ 76 77 $(zonenames:%=right/%)) \ 77 78 $(installed-localtime-file) $(installed-posixrules-file) 78 endif79 79 80 80 ifeq ($(have-ksh),yes) 81 81 install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab … … 128 128 # We have to use `-d $(inst_zonedir)' to explictly tell zic where to 129 129 # place the output files although $(zonedir) is compiled in. But the 130 130 # user might have set $(install_root) on the command line of `make install'. 131 ifeq ($(cross-compiling),no) 131 132 zic-cmd = $(built-program-cmd) -d $(inst_zonedir) 133 else 134 zic-cmd = $(common-objpfx)/timezone/zic-native -d $(inst_zonedir) 135 endif 132 136 tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \ 133 137 -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $< 134 138 … … 158 162 $(zic-cmd) -p $(posixrules) 159 163 endif 160 164 161 162 165 $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o 166 ifneq ($(cross-compiling),no) 167 $(objpfx)zic-native: $(objpfx)scheck-native.o $(objpfx)ialloc-native.o 168 endif 163 169 164 170 tz-cflags = -DTZDIR='"$(zonedir)"' \ 165 171 -DTZDEFAULT='"$(localtime-file)"' \
Note:
See TracBrowser
for help on using the repository browser.