source:
clfs-sysroot/patches/glibc-2.5-cross_hacks-2.patch@
89d5d0b
Last change on this file since 89d5d0b was ffd1587, checked in by , 18 years ago | |
---|---|
|
|
File size: 16.5 KB |
-
iconv/Makefile
Submitted By: Joe Ciccone <jciccone@linuxfromscratch.org> Date: 2006-11-26 Initial Package Version: 2.5 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. -2 takes into account the possibility of CFLAGS being set for the target. diff -Naur glibc-2.5.orig/iconv/Makefile glibc-2.5/iconv/Makefile
old new 56 56 iconvconfig.h 57 57 58 58 others = iconv_prog iconvconfig 59 ifneq ($(cross-compiling),no) 60 others-native = iconvconfig-native 61 endif 59 62 install-others = $(inst_bindir)/iconv 60 63 install-sbin = iconvconfig 61 64 … … 78 81 79 82 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o) 80 83 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o) 84 $(objpfx)iconvconfig-native: $(iconvconfig-modules:%=$(objpfx)%-native.o) 81 85 82 86 ifneq ($(cross-compiling),yes) 83 87 xtests: test-iconvconfig -
iconvdata/Makefile
diff -Naur glibc-2.5.orig/iconvdata/Makefile glibc-2.5/iconvdata/Makefile
old new 311 311 312 312 headers: $(addprefix $(objpfx), $(generated-modules:=.h)) 313 313 314 ifeq ($(cross-compiling),no) 315 iconvconfig-cmd = LC_ALL=C LANGUAGE=C \ 316 $(common-objpfx)elf/ld.so --library-path $(rpath-link) \ 317 $(common-objpfx)iconv/iconvconfig 318 else 319 iconvconfig-cmd = LC_ALL=C LANGUAGE=C \ 320 $(common-objpfx)iconv/iconvconfig-native 321 endif 322 314 323 $(addprefix $(inst_gconvdir)/, $(modules.so)): \ 315 324 $(inst_gconvdir)/%: $(objpfx)% $(+force) 316 325 $(do-install-program) 317 326 $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) 318 327 $(do-install) 319 ifeq (no,$(cross-compiling))320 328 # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary 321 329 # if this libc has more gconv modules than the previously installed one. 322 330 if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ 323 LC_ALL=C LANGUAGE=C \ 324 $(common-objpfx)elf/ld.so --library-path $(rpath-link) \ 325 $(common-objpfx)iconv/iconvconfig \ 326 $(addprefix --prefix=,$(install_root)); \ 331 $(iconvconfig-cmd) $(addprefix --prefix=,$(install_root)); \ 327 332 fi 328 else329 @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'330 endif331 333 332 334 endif # build-shared = yes 333 335 -
include-native/bits/libc-tsd.h
diff -Naur glibc-2.5.orig/include-native/bits/libc-tsd.h glibc-2.5/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.5.orig/include-native/config.h glibc-2.5/include-native/config.h
old new 1 /* Empty */ -
include-native/gnu/stubs.h
diff -Naur glibc-2.5.orig/include-native/gnu/stubs.h glibc-2.5/include-native/gnu/stubs.h
old new 1 /* Empty */ -
include-native/intl/loadinfo.h
diff -Naur glibc-2.5.orig/include-native/intl/loadinfo.h glibc-2.5/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.5.orig/include-native/libintl.h glibc-2.5/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.5.orig/include-native/symbol-hacks.h glibc-2.5/include-native/symbol-hacks.h
old new 1 /* Empty */ -
include-native/tls.h
diff -Naur glibc-2.5.orig/include-native/tls.h glibc-2.5/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.5.orig/locale/Makefile glibc-2.5/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.5.orig/localedata/Makefile glibc-2.5/localedata/Makefile
old new 206 206 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) 207 207 208 208 # Sometimes the whole collection of locale files should be installed. 209 ifeq ($(cross-compiling),no) 209 210 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ 210 211 $(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef 212 else 213 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ 214 $(common-objpfx)locale/localedef-native 215 endif 211 216 install-locales: $(INSTALL-SUPPORTED-LOCALES) 212 217 213 218 install-locales-dir: -
Makeconfig
diff -Naur glibc-2.5.orig/Makeconfig glibc-2.5/Makeconfig
old new 447 447 $(common-objpfx)libc% $(+postinit),$^) \ 448 448 $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) 449 449 endif 450 # Command for linking programs against the host system. 451 ifndef +link-native 452 +link-native = $(BUILD_CC) -static -g -o $@ $^ \ 453 $(LDFLAGS) $(LDFLAGS-$(@F)) \ 454 $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ 455 $(link-extra-libs) 456 endif 450 457 # Command for statically linking bounded-pointer programs with the C library. 451 458 ifndef +link-bounded 452 459 +link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \ … … 660 667 $(+sysdep-includes) $(includes) \ 661 668 $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes) 662 669 670 +includes-native = -I$(..)include-native -I$(objpfx) -I. 671 663 672 # Since libio has several internal header files, we use a -I instead 664 673 # of many little headers in the include directory. 665 674 libio-include = -I$(..)libio … … 674 683 $(foreach lib,$(libof-$(basename $(@F))) \ 675 684 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \ 676 685 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) 686 CPPFLAGS-native = -D_GNU_SOURCE $($(subdir)-CPPFLAGS) $(+includes-native) $(defines) \ 687 $(CPPFLAGS-$(suffix $@)) -include $(..)include/libc-symbols.h \ 688 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) 677 689 override CFLAGS = -std=gnu99 \ 678 690 $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \ 679 691 $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \ 680 692 $(CFLAGS-$(@F)) 693 override CFLAGS-native = -std=gnu99 $(default_cflags) $(+gccwarn-c) \ 694 $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F)) 681 695 override CXXFLAGS = $(c++-sysincludes) \ 682 696 $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \ 683 697 $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F)) -
Makerules
diff -Naur glibc-2.5.orig/Makerules glibc-2.5/Makerules
old new 292 292 object-suffixes-left := $(all-object-suffixes) 293 293 include $(o-iterator) 294 294 295 $(objpfx)%-native.o: %.c $(before-compile) 296 $(native-compile-command.c) 297 295 298 # Omit the objpfx rules when building in the source tree, because 296 299 # objpfx is empty and so these rules just override the ones above. 297 300 ifdef objpfx … … 368 371 compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags) 369 372 compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) 370 373 compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags) 374 # Native commands 375 native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) 371 376 372 377 # GCC can grok options after the file name, and it looks nicer that way. 373 378 compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) … … 377 382 COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \ 378 383 $(ASFLAGS) $(ASFLAGS-$(suffix $@)) 379 384 COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS) 385 # Native commands 386 native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native) 380 387 381 388 # We need this for the output to go in the right place. It will default to 382 389 # empty if make was configured to work with a cc that can't grok -c and -o … … 1168 1175 $(make-target-directory) 1169 1176 $(patsubst %/,cd % &&,$(objpfx)) \ 1170 1177 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \ 1171 $( firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)1178 $(addprefix $(shell pwd)/, $^) -o $(@F) 1172 1179 endef 1173 1180 1174 1181 # Command to compile $< in $(common-objdir) using the native libraries. -
malloc/Makefile
diff -Naur glibc-2.5.orig/malloc/Makefile glibc-2.5/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.5
diff -Naur glibc-2.5.orig/Rules glibc-2.5/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.5.orig/sunrpc/Makefile glibc-2.5/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.5.orig/timezone/Makefile glibc-2.5/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.