source: clfs-sysroot/patches/glibc-2.9-cross_hacks-1.patch@ 74573c8

Last change on this file since 74573c8 was e184d2f, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Updated Glibc Patches. Add IPUtils Patch.

  • Property mode set to 100644
File size: 46.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
            Rediffed against 2.9 by Joe Ciccone on 2009-03-15
    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.9.orig/iconv/Makefile glibc-2.9/iconv/Makefile
    old new  
    5757                  iconvconfig.h
    5858
    5959others          = iconv_prog iconvconfig
     60ifneq ($(cross-compiling),no)
     61  others-native  = iconvconfig-native
     62endif
    6063install-others-programs = $(inst_bindir)/iconv
    6164install-sbin    = iconvconfig
    6265
     
    7982
    8083$(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
    8184$(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
     85$(objpfx)iconvconfig-native: $(iconvconfig-modules:%=$(objpfx)%-native.o)
    8286
    8387ifneq ($(cross-compiling),yes)
    8488xtests: test-iconvconfig
  • iconvdata/Makefile

    diff -Naur glibc-2.9.orig/iconvdata/Makefile glibc-2.9/iconvdata/Makefile
    old new  
    320320
    321321headers: $(addprefix $(objpfx), $(generated-modules:=.h))
    322322
     323ifeq ($(cross-compiling),no)
     324iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
     325  $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
     326  $(common-objpfx)iconv/iconvconfig
     327else
     328iconvconfig-cmd = LC_ALL=C LANGUAGE=C \
     329  $(common-objpfx)iconv/iconvconfig-native
     330endif
     331
    323332$(addprefix $(inst_gconvdir)/, $(modules.so)): \
    324333    $(inst_gconvdir)/%: $(objpfx)% $(+force)
    325334        $(do-install-program)
    326335$(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
    327336        $(do-install)
    328 ifeq (no,$(cross-compiling))
    329337# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
    330338# if this libc has more gconv modules than the previously installed one.
    331339        if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
    332            LC_ALL=C LANGUAGE=C \
    333            $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
    334            $(common-objpfx)iconv/iconvconfig \
    335              $(addprefix --prefix=,$(install_root)); \
     340           $(iconvconfig-cmd) $(addprefix --prefix=,$(install_root)); \
    336341        fi
    337 else
    338         @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
    339 endif
    340342
    341343endif # build-shared = yes
    342344
  • iconvdata/Makefile.orig

    diff -Naur glibc-2.9.orig/iconvdata/Makefile.orig glibc-2.9/iconvdata/Makefile.orig
    old new  
     1# Copyright (C) 1997-2004,2005,2006,2007,2008 Free Software Foundation, Inc.
     2# This file is part of the GNU C Library.
     3
     4# The GNU C Library is free software; you can redistribute it and/or
     5# modify it under the terms of the GNU Lesser General Public
     6# License as published by the Free Software Foundation; either
     7# version 2.1 of the License, or (at your option) any later version.
     8
     9# The GNU C Library is distributed in the hope that it will be useful,
     10# but WITHOUT ANY WARRANTY; without even the implied warranty of
     11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12# Lesser General Public License for more details.
     13
     14# You should have received a copy of the GNU Lesser General Public
     15# License along with the GNU C Library; if not, write to the Free
     16# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     17# 02111-1307 USA.
     18
     19#
     20#       Makefile for iconv data and code.
     21#
     22subdir  := iconvdata
     23
     24# Names of all the shared objects which implement the transformations.
     25modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5             \
     26           ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10            \
     27           ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16        \
     28           T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE     \
     29           EBCDIC-AT-DE-A EBCDIC-CA-FR EUC-KR UHC JOHAB libJIS libKSC    \
     30           BIG5 EUC-JP libGB EUC-CN libCNS EUC-TW ISO646 EBCDIC-DK-NO    \
     31           EBCDIC-DK-NO-A EBCDIC-ES EBCDIC-ES-A EBCDIC-ES-S EBCDIC-FI-SE \
     32           EBCDIC-FI-SE-A EBCDIC-FR EBCDIC-IS-FRISS EBCDIC-IT EBCDIC-PT  \
     33           EBCDIC-UK EBCDIC-US IBM037 IBM038 IBM274 IBM275 IBM423        \
     34           IBM500 IBM870 IBM871 IBM891 IBM903 IBM904 IBM905 IBM1047      \
     35           IBM874 CP737 CP775 ISO-2022-KR HP-TURKISH8 HP-THAI8 HP-GREEK8 \
     36           KOI8-R LATIN-GREEK LATIN-GREEK-1 IBM256 IBM273 IBM277 IBM278  \
     37           IBM280 IBM281 IBM284 IBM285 IBM290 IBM297 IBM420 IBM424       \
     38           IBM437 IBM850 IBM851 IBM852 IBM855 IBM857 IBM860 IBM861       \
     39           IBM862 IBM863 IBM864 IBM865 IBM868 IBM869 IBM875 IBM880       \
     40           IBM866 CP1258 IBM922 IBM1124 IBM1129 IBM932 IBM943            \
     41           IBM856 IBM930 IBM933 IBM935 IBM937 IBM939 IBM1046             \
     42           IBM1132 IBM1133 IBM1160 IBM1161 IBM1162 IBM1163 IBM1164       \
     43           IBM918 IBM1004 IBM1026 CP1125 CP1250 CP1251 CP1252 CP1253     \
     44           CP1254 CP1255 CP1256 CP1257 ISO-2022-JP MACINTOSH IEC_P27-1   \
     45           ASMO_449 ANSI_X3.110 CSN_369103 CWI DEC-MCS ECMA-CYRILLIC     \
     46           GOST_19768-74 GREEK-CCITT GREEK7 GREEK7-OLD INIS INIS-8       \
     47           INIS-CYRILLIC ISO_6937-2 ISO_2033 ISO_5427 ISO_5427-EXT       \
     48           ISO_5428 ISO_10367-BOX MAC-IS MAC-UK NATS-DANO NATS-SEFI      \
     49           SAMI-WS2 ISO-IR-197 TIS-620 KOI8-U GBK ISIRI-3342 GBGBK       \
     50           ISO-2022-CN libISOIR165 UTF-16 UNICODE UTF-32 UTF-7 BIG5HKSCS \
     51           GB18030 ISO-2022-CN-EXT VISCII GBBIG5 CP10007 KOI8-T          \
     52           GEORGIAN-PS GEORGIAN-ACADEMY ISO-IR-209 MAC-SAMI ARMSCII-8    \
     53           TCVN5712-1 libJISX0213 EUC-JISX0213 SHIFT_JISX0213            \
     54           ISO-2022-JP-3 TSCII IBM866NAV CP932 EUC-JP-MS PT154 RK1048    \
     55           IBM1025 IBM1122 IBM1137 IBM1153 IBM1154 IBM1155 IBM1156       \
     56           IBM1157 IBM1158 IBM803 IBM901 IBM902 IBM921 IBM1008           \
     57           IBM1008_420 IBM1097 IBM1112 IBM1123 IBM1130 IBM1140 IBM1141   \
     58           IBM1142 IBM1143 IBM1144 IBM1145 IBM1146 IBM1147 IBM1148       \
     59           IBM1149 IBM1166 IBM1167 IBM4517 IBM4899 IBM4909 IBM4971       \
     60           IBM5347 IBM9030 IBM9066 IBM9448 IBM12712 IBM16804             \
     61           IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 MIK BRF   \
     62           MAC-CENTRALEUROPE KOI8-RU ISO8859-9E
     63
     64modules.so := $(addsuffix .so, $(modules))
     65
     66include ../Makeconfig
     67
     68ifeq (yes,$(build-shared))
     69tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
     70        tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7
     71ifeq ($(have-thread-library),yes)
     72tests += bug-iconv3
     73endif
     74
     75test-srcs := tst-table-from tst-table-to
     76
     77bug-iconv6-ENV = LOCPATH=$(common-objpfx)localedata
     78tst-iconv7-ENV = LOCPATH=$(common-objpfx)localedata
     79endif
     80
     81# No code here is in libc.so.
     82CPPFLAGS += -DNOT_IN_libc
     83
     84libJIS-routines := jis0201 jis0208 jis0212
     85libKSC-routines := ksc5601
     86libGB-routines := gb2312
     87libCNS-routines := cns11643l1 cns11643
     88libISOIR165-routines := iso-ir-165
     89libJISX0213-routines := jisx0213
     90
     91LDFLAGS-EUC-KR.so = $(LDFLAGS-rpath-ORIGIN)
     92$(objpfx)EUC-KR.so: $(objpfx)libKSC.so
     93LDFLAGS-JOHAB.so = $(LDFLAGS-rpath-ORIGIN)
     94$(objpfx)JOHAB.so: $(objpfx)libKSC.so
     95LDFLAGS-UHC.so = $(LDFLAGS-rpath-ORIGIN)
     96$(objpfx)UHC.so: $(objpfx)libKSC.so
     97LDFLAGS-EUC-JP.so = $(LDFLAGS-rpath-ORIGIN)
     98$(objpfx)EUC-JP.so: $(objpfx)libJIS.so
     99LDFLAGS-EUC-JP-MS.so = $(LDFLAGS-rpath-ORIGIN)
     100$(objpfx)EUC-JP-MS.so: $(objpfx)libJIS.so
     101LDFLAGS-EUC-CN.so = $(LDFLAGS-rpath-ORIGIN)
     102$(objpfx)EUC-CN.so: $(objpfx)libGB.so
     103LDFLAGS-EUC-TW.so = $(LDFLAGS-rpath-ORIGIN)
     104$(objpfx)EUC-TW.so: $(objpfx)libCNS.so
     105LDFLAGS-EUC-JISX0213.so = $(LDFLAGS-rpath-ORIGIN)
     106$(objpfx)EUC-JISX0213.so: $(objpfx)libJISX0213.so
     107LDFLAGS-SHIFT_JISX0213.so = $(LDFLAGS-rpath-ORIGIN)
     108$(objpfx)SHIFT_JISX0213.so: $(objpfx)libJISX0213.so
     109
     110LDFLAGS-ISO-2022-JP.so = $(LDFLAGS-rpath-ORIGIN)
     111$(objpfx)ISO-2022-JP.so: $(objpfx)libJIS.so $(objpfx)libGB.so \
     112                         $(objpfx)libCNS.so $(objpfx)libKSC.so
     113LDFLAGS-ISO-2022-JP-3.so = $(LDFLAGS-rpath-ORIGIN)
     114$(objpfx)ISO-2022-JP-3.so: $(objpfx)libJIS.so $(objpfx)libJISX0213.so
     115LDFLAGS-ISO-2022-KR.so = $(LDFLAGS-rpath-ORIGIN)
     116$(objpfx)ISO-2022-KR.so: $(objpfx)libKSC.so
     117LDFLAGS-ISO-2022-CN.so = $(LDFLAGS-rpath-ORIGIN)
     118$(objpfx)ISO-2022-CN.so: $(objpfx)libGB.so $(objpfx)libCNS.so
     119LDFLAGS-ISO-2022-CN-EXT.so = $(LDFLAGS-rpath-ORIGIN)
     120$(objpfx)ISO-2022-CN-EXT.so: $(objpfx)libGB.so $(objpfx)libCNS.so \
     121                             $(objpfx)libISOIR165.so
     122
     123LDFLAGS-libJIS.so = $(LDFLAGS-soname-fname)
     124LDFLAGS-libKSC.so = $(LDFLAGS-soname-fname)
     125LDFLAGS-libGB.so = $(LDFLAGS-soname-fname)
     126LDFLAGS-libCNS.so = $(LDFLAGS-soname-fname)
     127LDFLAGS-libISOIR165.so = $(LDFLAGS-soname-fname)
     128LDFLAGS-libJISX0213.so = $(LDFLAGS-soname-fname)
     129
     130distribute := gconv-modules extra-module.mk gap.awk gaptab.awk gconv.map    \
     131              gen-8bit.sh gen-8bit-gap.sh gen-8bit-gap-1.sh                 \
     132              TESTS $(filter-out testdata/CVS%, $(wildcard testdata/*))     \
     133              TESTS2 run-iconv-test.sh tst-tables.sh tst-table.sh           \
     134              tst-table-charmap.sh tst-table-from.c tst-table-to.c          \
     135              EUC-JP.irreversible ISIRI-3342.irreversible SJIS.irreversible \
     136              EUC-KR.irreversible BIG5HKSCS.irreversible BIG5.irreversible  \
     137              CP1255.irreversible CP1258.irreversible EUC-TW.irreversible   \
     138              IBM856.irreversible IBM922.irreversible IBM1132.irreversible  \
     139              IBM1133.irreversible IBM1160.irreversible IBM1161.irreversible\
     140              IBM1163.irreversible IBM1164.irreversible                     \
     141              ARMSCII-8.irreversible TCVN5712-1.precomposed                 \
     142              JISX0213.TXT EUC-JISX0213.precomposed                         \
     143              SHIFT_JISX0213.precomposed SHIFT_JISX0213.irreversible        \
     144              TSCII.irreversible TSCII.precomposed                          \
     145              8bit-generic.c 8bit-gap.c                                     \
     146              ansi_x3.110.c asmo_449.c big5.c cp737.c cp737.h               \
     147              cp775.c cp775.h ibm874.c cns11643.c cns11643.h                \
     148              cns11643l1.c cns11643l1.h cp1125.c cp1250.c cp1251.c cp1252.c \
     149              cp1253.c cp1254.c cp1255.c cp1256.c cp1257.c cp1258.c         \
     150              csn_369103.c cwi.c dec-mcs.c ebcdic-at-de.c ebcdic-at-de-a.c  \
     151              ebcdic-ca-fr.c ebcdic-dk-no.c ebcdic-dk-no-a.c ebcdic-es.c    \
     152              ebcdic-es-a.c ebcdic-es-s.c ebcdic-fr.c ebcdic-fi-se.c        \
     153              ebcdic-fi-se-a.c ebcdic-is-friss.c ebcdic-it.c ebcdic-pt.c    \
     154              ebcdic-uk.c ebcdic-us.c ecma-cyrillic.c euc-cn.c euc-jp.c     \
     155              euc-kr.c euc-tw.c gb2312.c gb2312.h gbk.c gost_19768-74.c     \
     156              greek-ccitt.c greek7.c greek7-old.c hp-roman8.c ibm037.c      \
     157              ibm038.c ibm256.c ibm273.c ibm274.c ibm275.c ibm277.c         \
     158              ibm278.c ibm280.c ibm281.c ibm284.c ibm285.c ibm290.c         \
     159              ibm297.c ibm420.c ibm423.c ibm424.c ibm437.c ibm500.c         \
     160              ibm850.c ibm851.c ibm852.c ibm855.c ibm857.c ibm860.c         \
     161              ibm861.c ibm862.c ibm863.c ibm864.c ibm865.c ibm866.c         \
     162              ibm868.c ibm869.c ibm870.c ibm871.c ibm875.c ibm880.c         \
     163              ibm891.c ibm903.c ibm904.c ibm905.c ibm918.c ibm1004.c        \
     164              ibm856.c ibm930.c ibm933.c ibm935.c ibm937.c ibm939.c ibm1046.c \
     165              ibm856.h ibm930.h ibm933.h ibm935.h ibm937.h ibm939.h ibm1046.h \
     166              ibm922.c ibm922.h ibm1124.c ibm1124.h ibm1129.c ibm1129.h     \
     167              ibm1132.c ibm1132.h ibm1133.c ibm1133.h ibm1162.c ibm1162.h   \
     168              ibm1026.c ibm1047.c iec_p27-1.c inis.c inis-8.c viscii.c      \
     169              inis-cyrillic.c iso-2022-jp.c iso-2022-kr.c iso646.c          \
     170              iso8859-1.c iso8859-2.c iso8859-3.c iso8859-4.c iso8859-5.c   \
     171              iso8859-6.c iso8859-7.c iso8859-8.c iso8859-9.c iso8859-10.c  \
     172              iso8859-11.c iso8859-13.c iso8859-14.c iso8859-9e.c           \
     173              iso8859-15.c iso_2033.c iso_5427-ext.c iso_5427.c iso_5428.c  \
     174              iso_6937.c iso_6937-2.c iso_10367-box.c jis0201.c jis0201.h   \
     175              jis0208.c jis0208.h jis0212.c jis0212.h johab.c koi-8.c       \
     176              koi8-r.c ksc5601.c ksc5601.h latin-greek.c latin-greek-1.c    \
     177              macintosh.c mac-is.c mac-uk.c nats-dano.c nats-sefi.c sjis.c  \
     178              t.61.c uhc.c sami-ws2.c iso-ir-197.c tis-620.c koi8-u.c       \
     179              isiri-3342.c isiri-3342.h gbgbk.c iso-2022-cn.c cns11643l2.h  \
     180              iso8859-16.c utf-16.c unicode.c utf-32.c utf-7.c big5hkscs.c  \
     181              iso-ir-165.c iso-ir-165.h gb18030.c iso-2022-cn-ext.c         \
     182              ibm932.c ibm932.h ibm943.c ibm943.h gbbig5.c cp10007.c        \
     183              koi8-t.c georgian-ps.c georgian-academy.c iso-ir-209.c        \
     184              mac-sami.c ibm1160.c ibm1160.h ibm1161.c ibm1161.h            \
     185              ibm1163.c ibm1163.h ibm1164.c ibm1164.h jisx0213.c jisx0213.h \
     186              euc-jisx0213.c shift_jisx0213.c iso-2022-jp-3.c               \
     187              tcvn5712-1.c armscii-8.c tscii.c ibm866nav.c pt154.c rk1048.c \
     188              ibm1025.c ibm1025.h ibm1122.c ibm1122.h ibm1137.c ibm1137.h   \
     189              ibm1153.c ibm1153.h ibm1154.c ibm1154.h ibm1155.c ibm1155.h   \
     190              ibm1156.c ibm1156.h ibm1157.c ibm1157.h ibm1158.c ibm1158.h   \
     191              ibm803.c ibm803.h ibm901.c ibm901.h ibm902.c ibm902.h         \
     192              ibm921.c ibm921.h ibm1008.c ibm1008.h ibm1008_420.c           \
     193              ibm1097.c ibm1097.h ibm1112.c ibm1112.h ibm1123.c ibm1123.h   \
     194              ibm1130.c ibm1130.h ibm1140.c ibm1140.h ibm1141.c ibm1141.h   \
     195              ibm1142.c ibm1142.h ibm1143.c ibm1143.h ibm1144.c ibm1144.h   \
     196              ibm1145.c ibm1145.h ibm1146.c ibm1146.h ibm1147.c ibm1147.h   \
     197              ibm1148.c ibm1148.h ibm1149.c ibm1149.h ibm1166.c ibm1166.h   \
     198              ibm1167.c ibm1167.h ibm4517.c ibm4517.h ibm4899.c ibm4899.h   \
     199              ibm4909.c ibm4909.h ibm4971.c ibm4971.h ibm5347.c ibm5347.h   \
     200              ibm9030.c ibm9030.h ibm9066.c ibm9066.h ibm9448.c ibm9448.h   \
     201              ibm12712.c ibm12712.h ibm16804.c ibm16804.h                   \
     202              ibm1364.c ibm1364.h ibm1371.c ibm1371.h ibm1388.c ibm1388.h   \
     203              ibm1390.c ibm1390.h ibm1399.c ibm1399.h iso_11548-1.c mik.c   \
     204              brf.c mac-centraleurope.c hp-roman9.c hp-turkish8.c           \
     205              hp-thai8.c hp-greek8.c
     206
     207# We build the transformation modules only when we build shared libs.
     208ifeq (yes,$(build-shared))
     209
     210# Rule to generate the shared objects.
     211charmaps = ../localedata/charmaps
     212-include $(objpfx)iconv-rules
     213extra-modules-left := $(modules)
     214include extra-module.mk
     215
     216
     217extra-objs      += $(modules.so)
     218install-others  = $(addprefix $(inst_gconvdir)/, $(modules.so)) \
     219                  $(inst_gconvdir)/gconv-modules
     220
     221# We can build the conversion tables for numerous charsets automatically.
     222
     223gen-8bit-modules := iso8859-2 iso8859-3 iso8859-4 iso8859-6 iso8859-9 koi-8 \
     224                    ebcdic-at-de ebcdic-at-de-a ebcdic-ca-fr ebcdic-dk-no   \
     225                    ebcdic-dk-no-a ebcdic-es-s ebcdic-fi-se ebcdic-fi-se-a  \
     226                    ebcdic-fr ebcdic-it ebcdic-pt ebcdic-us \
     227                    ibm037 ibm038 ibm274 ibm275 ibm423 ibm500 ibm870 ibm871 \
     228                    ibm891 ibm903 ibm904 ibm905 ibm1047   \
     229
     230gen-8bit-gap-modules := koi8-r latin-greek latin-greek-1 ibm256 ibm273     \
     231                        ibm277 ibm278 ibm280 ibm281 ibm284 ibm285 ibm290   \
     232                        ibm297 ibm420 ibm424 ibm437 ibm850 ibm851 ibm852   \
     233                        ibm855 ibm857 ibm860 ibm861 ibm862 ibm863 ibm864   \
     234                        ibm865 ibm868 ibm869 ibm875 ibm880 ibm918 ibm1004  \
     235                        ibm1026 cp1125 cp1250 cp1251 cp1252 cp1253 cp1254  \
     236                        cp1256 cp1257 ibm866 iso8859-5 iso8859-7 iso8859-8 \
     237                        iso8859-10 macintosh iec_p27-1 asmo_449            \
     238                        csn_369103 cwi dec-mcs ecma-cyrillic gost_19768-74 \
     239                        greek-ccitt greek7 greek7-old inis inis-8          \
     240                        inis-cyrillic iso_2033 iso_5427 iso_5427-ext       \
     241                        iso_5428 iso_10367-box mac-is nats-dano nats-sefi  \
     242                        iso8859-13 iso8859-14 iso8859-15 mac-uk sami-ws2   \
     243                        iso-ir-197 tis-620 koi8-u ibm874 cp10007 koi8-t    \
     244                        georgian-ps georgian-academy iso-ir-209 mac-sami   \
     245                        iso8859-11 ibm866nav pt154 rk1048 mik brf          \
     246                        mac-centraleurope koi8-ru hp-roman8 hp-roman9      \
     247                        ebcdic-es ebcdic-es-a ebcdic-is-friss ebcdic-uk    \
     248                        iso8859-16 viscii iso8859-9e hp-turkish8           \
     249                        hp-thai8 hp-greek8
     250
     251gen-special-modules := iso8859-7jp
     252
     253generated-modules := $(gen-8bit-modules) $(gen-8bit-gap-modules) \
     254                     $(gen-special-modules)
     255
     256generated = $(generated-modules:=.h) $(generated-modules:=.stmp) \
     257            iconv-test.out iconv-rules tst-loading.mtrace        \
     258            mtrace-tst-loading tst-tables.out iconv-test.xxx
     259ifdef objpfx
     260generated += gconv-modules
     261endif
     262
     263# Rules to generate the headers.
     264export AWK
     265
     266define generate-8bit-table
     267$(make-target-directory)
     268LC_ALL=C $(SHELL) ./gen-8bit.sh $< > $(@:stmp=T)
     269$(move-if-change) $(@:stmp=T) $(@:stmp=h)
     270touch $@
     271endef
     272
     273define generate-8bit-gap-table
     274$(make-target-directory)
     275LC_ALL=C $(SHELL) ./gen-8bit-gap.sh $< > $(@:stmp=T)
     276$(move-if-change) $(@:stmp=T) $(@:stmp=h)
     277touch $@
     278endef
     279
     280# The headers must be generated before the compilation.
     281before-compile = $(addprefix $(objpfx),$(generated-modules:=.h))
     282
     283ifndef avoid-generated
     284$(objpfx)iconv-rules: Makefile
     285        $(make-target-directory)
     286        { echo $(filter-out lib%, $(modules)); \
     287          echo 8bit $(gen-8bit-modules); \
     288          echo 8bit-gap $(gen-8bit-gap-modules); } | \
     289        $(AWK) 'NR == 1 { \
     290                  for (i = 1; i <= NF; i++) { \
     291                    printf "%s-routines := %s\n", $$i, tolower($$i); \
     292                    printf "%s-map := gconv.map\n", $$i; \
     293                  } \
     294                }; \
     295                NR > 1 { \
     296                  for (i = 2; i <= NF; i++) { \
     297                    printf "$$(objpfx)%s.stmp: ", $$i; \
     298                    map = toupper($$i); \
     299                    sub(/^ISO8859/, "ISO-8859", map); \
     300                    if (map == "ISO_2033") map = map "-1983"; \
     301                    printf "$$(charmaps)/%s ", map; \
     302                    printf "gen-%s.sh\n", $$1; \
     303                    printf "\t$$(generate-%s-table)\n", $$1; \
     304                  } \
     305                }' > $@.new
     306        mv -f $@.new $@
     307endif
     308
     309$(generated-modules:%=$(objpfx)%.h): $(objpfx)%.h: $(objpfx)%.stmp
     310        @:
     311
     312$(gen-8bit-modules:%=$(objpfx)%.stmp): $(objpfx)%.stmp: $(objpfx)iconv-rules
     313$(gen-8bit-gap-modules:%=$(objpfx)%.stmp): $(objpfx)%.stmp: $(objpfx)iconv-rules
     314
     315$(objpfx)iso8859-7jp.stmp: $(charmaps)/ISO-8859-7 gen-8bit-gap-1.sh
     316        $(make-target-directory)
     317        LC_ALL=C $(SHELL) ./gen-8bit-gap-1.sh $< > $(@:stmp=T)
     318        $(move-if-change) $(@:stmp=T) $(@:stmp=h)
     319        touch $@
     320
     321headers: $(addprefix $(objpfx), $(generated-modules:=.h))
     322
     323$(addprefix $(inst_gconvdir)/, $(modules.so)): \
     324    $(inst_gconvdir)/%: $(objpfx)% $(+force)
     325        $(do-install-program)
     326$(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
     327        $(do-install)
     328ifeq (no,$(cross-compiling))
     329# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
     330# if this libc has more gconv modules than the previously installed one.
     331        if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
     332           LC_ALL=C LANGUAGE=C \
     333           $(common-objpfx)elf/ld.so --library-path $(rpath-link) \
     334           $(common-objpfx)iconv/iconvconfig \
     335             $(addprefix --prefix=,$(install_root)); \
     336        fi
     337else
     338        @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
     339endif
     340
     341endif # build-shared = yes
     342
     343include ../Rules
     344
     345ifeq (no,$(cross-compiling))
     346ifeq (yes,$(build-shared))
     347tests: $(objpfx)iconv-test.out $(objpfx)tst-tables.out
     348ifneq (no,$(PERL))
     349tests: $(objpfx)mtrace-tst-loading
     350endif
     351endif
     352endif
     353
     354tst-loading-ENV = MALLOC_TRACE=$(objpfx)tst-loading.mtrace
     355$(objpfx)mtrace-tst-loading: $(objpfx)tst-loading.out
     356        $(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@
     357
     358$(objpfx)bug-iconv1.out: $(objpfx)gconv-modules \
     359                         $(addprefix $(objpfx),$(modules.so))
     360$(objpfx)bug-iconv2.out: $(objpfx)gconv-modules \
     361                         $(addprefix $(objpfx),$(modules.so))
     362$(objpfx)bug-iconv3: $(libdl)
     363$(objpfx)bug-iconv3.out: $(objpfx)gconv-modules \
     364                         $(addprefix $(objpfx),$(modules.so))
     365$(objpfx)bug-iconv5.out: $(objpfx)gconv-modules \
     366                         $(addprefix $(objpfx),$(modules.so))
     367$(objpfx)tst-loading.out: $(objpfx)gconv-modules \
     368                          $(addprefix $(objpfx),$(modules.so))
     369$(objpfx)tst-iconv4.out: $(objpfx)gconv-modules \
     370                         $(addprefix $(objpfx),$(modules.so))
     371$(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \
     372                         $(addprefix $(objpfx),$(modules.so))
     373
     374$(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
     375                         $(addprefix $(objpfx),$(modules.so)) \
     376                         $(common-objdir)/iconv/iconv_prog TESTS
     377        $(SHELL) -e $< $(common-objdir) > $@
     378
     379$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
     380                         $(addprefix $(objpfx),$(modules.so)) \
     381                         $(objpfx)tst-table-from $(objpfx)tst-table-to
     382        $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ > $@
     383
     384do-tests-clean common-mostlyclean: tst-tables-clean
     385
     386.PHONY: tst-tables-clean
     387tst-tables-clean:
     388        -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible
     389
     390ifdef objpfx
     391$(objpfx)gconv-modules: gconv-modules
     392        cp $^ $@
     393endif
  • include-native/bits/libc-tsd.h

    diff -Naur glibc-2.9.orig/include-native/bits/libc-tsd.h glibc-2.9/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.9.orig/include-native/config.h glibc-2.9/include-native/config.h
    old new  
     1/* Empty */
  • include-native/gnu/stubs.h

    diff -Naur glibc-2.9.orig/include-native/gnu/stubs.h glibc-2.9/include-native/gnu/stubs.h
    old new  
     1/* Empty */
  • include-native/intl/loadinfo.h

    diff -Naur glibc-2.9.orig/include-native/intl/loadinfo.h glibc-2.9/include-native/intl/loadinfo.h
    old new  
     1#ifndef LOADINFO_H
     2#define LOADINFO_H
     3struct loaded_l10nfile;
     4#endif
  • include-native/libintl.h

    diff -Naur glibc-2.9.orig/include-native/libintl.h glibc-2.9/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.9.orig/include-native/symbol-hacks.h glibc-2.9/include-native/symbol-hacks.h
    old new  
     1/* Empty */
  • include-native/tls.h

    diff -Naur glibc-2.9.orig/include-native/tls.h glibc-2.9/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.9.orig/locale/Makefile glibc-2.9/locale/Makefile
    old new  
    4444aux             = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
    4545                  xlocale localename global-locale coll-lookup
    4646others          = localedef locale
     47ifneq ($(cross-compiling),no)
     48others-native   = localedef-native
     49endif
    4750#others-static  = localedef locale
    4851install-bin     = localedef locale
    4952extra-objs      = $(localedef-modules:=.o) $(localedef-aux:=.o) \
     
    8184$(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
    8285$(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
    8386
     87ifneq ($(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)
     91endif
     92
    8493C-translit.h: C-translit.h.in gen-translit.pl
    8594        $(PERL) gen-translit.pl < $< > $@.tmp
    8695        mv -f $@.tmp $@
  • localedata/Makefile

    diff -Naur glibc-2.9.orig/localedata/Makefile glibc-2.9/localedata/Makefile
    old new  
    208208INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
    209209
    210210# Sometimes the whole collection of locale files should be installed.
     211ifeq ($(cross-compiling),no)
    211212LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
    212213$(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
     214else
     215LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
     216$(common-objpfx)locale/localedef-native
     217endif
    213218install-locales: $(INSTALL-SUPPORTED-LOCALES)
    214219
    215220install-locales-dir:
  • localedata/Makefile.orig

    diff -Naur glibc-2.9.orig/localedata/Makefile.orig glibc-2.9/localedata/Makefile.orig
    old new  
     1# Copyright (C) 1996-2003, 2005, 2007, 2008 Free Software Foundation, Inc.
     2# This file is part of the GNU C Library.
     3
     4# The GNU C Library is free software; you can redistribute it and/or
     5# modify it under the terms of the GNU Lesser General Public
     6# License as published by the Free Software Foundation; either
     7# version 2.1 of the License, or (at your option) any later version.
     8
     9# The GNU C Library is distributed in the hope that it will be useful,
     10# but WITHOUT ANY WARRANTY; without even the implied warranty of
     11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12# Lesser General Public License for more details.
     13
     14# You should have received a copy of the GNU Lesser General Public
     15# License along with the GNU C Library; if not, write to the Free
     16# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     17# 02111-1307 USA.
     18
     19# Makefile for installing locale data source files.
     20
     21subdir := localedata
     22
     23all: # Make this the default target; it will be defined in Rules.
     24
     25# List with all available character set descriptions.
     26charmaps := $(filter-out $(addprefix charmaps/, CVS RCS SCCS %~), \
     27                                     $(wildcard charmaps/[A-I]*) \
     28                                     $(wildcard charmaps/[J-Z]*))
     29
     30# List with all available character set descriptions.
     31locales := $(filter-out $(addprefix locales/, CVS RCS SCCS %~), \
     32                                    $(wildcard locales/*))
     33
     34
     35subdir-dirs = tests-mbwc
     36vpath %.c tests-mbwc
     37vpath %.h tests-mbwc
     38
     39
     40test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
     41             tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
     42             tst-ctype tst-wctype tst-langinfo tst-numeric
     43test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
     44              hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
     45              si_LK.UTF-8
     46test-input-data = $(addsuffix .in, $(basename $(test-input)))
     47test-output := $(foreach s, .out .xout, \
     48                         $(addsuffix $s, $(basename $(test-input))))
     49ld-test-names := test1 test2 test3 test4 test5 test6 test7
     50ld-test-srcs := $(addprefix tests/,$(addsuffix .cm,$(ld-test-names)) \
     51                                   $(addsuffix .def,$(ld-test-names)) \
     52                                   $(addsuffix .ds,test5 test6) \
     53                                   test6.c trans.def)
     54
     55fmon-tests = n01y12 n02n40 n10y31 n11y41 n12y11 n20n32 n30y20 n41n00 \
     56             y01y10 y02n22 y22n42 y30y21 y32n31 y40y00 y42n21
     57
     58generated := $(test-input) $(test-output) sort-test.out tst-locale.out \
     59             tst-mbswcs.out tst-leaks.mtrace mtrace-tst-leaks
     60generated-dirs := $(ld-test-names) tt_TT de_DE.437                      \
     61                  $(addprefix tstfmon_,$(fmon-tests))                   \
     62
     63distribute := CHECKSUMS README SUPPORTED ChangeLog                      \
     64              $(charmaps) $(locales)                                    \
     65              tst-rpmatch.sh tst-locale.sh tst-fmon.sh sort-test.sh     \
     66              tst-fmon.data $(test-input-data) $(ld-test-srcs)          \
     67              th_TH.in cs_CZ.in tst-mbswcs.sh tst-trans.sh tst-ctype.sh \
     68              tst-ctype-de_DE.ISO-8859-1.in                             \
     69              tst-numeric.sh tst-numeric.data                           \
     70              $(wildcard tests-mbwc/*.[ch])                             \
     71              $(addprefix tst-fmon-locales/tstfmon_,$(fmon-tests))      \
     72              gen-locale.sh show-ucs-data.c tst-langinfo.sh             \
     73              tst-wctype.sh tst-wctype.input gen-unicode-ctype.c        \
     74              dump-ctype.c
     75
     76# Get $(inst_i18ndir) defined.
     77include ../Makeconfig
     78
     79ifeq (no,$(cross-compiling))
     80locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl            \
     81                     tst_iswctype tst_iswdigit tst_iswgraph            \
     82                     tst_iswlower tst_iswprint tst_iswpunct            \
     83                     tst_iswspace tst_iswupper tst_iswxdigit tst_mblen \
     84                     tst_mbrlen tst_mbrtowc tst_mbsrtowcs tst_mbstowcs \
     85                     tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm    \
     86                     tst_swscanf tst_towctrans tst_towlower            \
     87                     tst_towupper tst_wcrtomb tst_wcscat tst_wcschr    \
     88                     tst_wcscmp tst_wcscoll tst_wcscpy tst_wcscspn     \
     89                     tst_wcslen tst_wcsncat tst_wcsncmp tst_wcsncpy    \
     90                     tst_wcspbrk tst_wcsrtombs tst_wcsspn tst_wcsstr   \
     91                     tst_wcstod tst_wcstok tst_wcstombs tst_wcswidth   \
     92                     tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans      \
     93                     tst_wctype tst_wcwidth
     94
     95tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
     96        tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
     97        tst-strfmon1 tst-sscanf tst-strptime
     98ifeq (yes,$(build-shared))
     99ifneq (no,$(PERL))
     100tests: $(objpfx)mtrace-tst-leaks
     101endif
     102endif
     103endif
     104
     105# Files to install.
     106install-others := $(addprefix $(inst_i18ndir)/, \
     107                              $(addsuffix .gz, $(charmaps)) \
     108                              $(locales))
     109
     110include ../Rules
     111
     112# Install the charmap files in gzipped format.
     113$(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
     114        $(make-target-directory)
     115        rm -f $(@:.gz=) $@
     116        $(INSTALL_DATA) $< $(@:.gz=)
     117        gzip -9 $(@:.gz=)
     118
     119# Install the locale source files in the appropriate directory.
     120$(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
     121
     122# gcc does not know all the format specifiers we are using here.
     123CFLAGS-tst-mbswcs1.c = -Wno-format
     124CFLAGS-tst-mbswcs2.c = -Wno-format
     125CFLAGS-tst-mbswcs3.c = -Wno-format
     126CFLAGS-tst-mbswcs4.c = -Wno-format
     127CFLAGS-tst-mbswcs5.c = -Wno-format
     128CFLAGS-tst-trans.c = -Wno-format
     129
     130
     131ifeq (no,$(cross-compiling))
     132# We have to generate locales
     133LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
     134           en_US.ISO-8859-1 ja_JP.EUC-JP da_DK.ISO-8859-1 \
     135           hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 ja_JP.SJIS fr_FR.ISO-8859-1 \
     136           vi_VN.TCVN5712-1 nb_NO.ISO-8859-1 nn_NO.ISO-8859-1 \
     137           tr_TR.UTF-8 cs_CZ.UTF-8 zh_TW.EUC-TW fa_IR.UTF-8 fr_FR.UTF-8 \
     138           ja_JP.UTF-8 si_LK.UTF-8
     139LOCALE_SRCS := $(shell echo "$(LOCALES)"|sed 's/\([^ .]*\)[^ ]*/\1/g')
     140CHARMAPS := $(shell echo "$(LOCALES)" | \
     141                    sed -e 's/[^ .]*[.]\([^ ]*\)/\1/g' -e s/SJIS/SHIFT_JIS/g)
     142CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES))
     143
     144generated-dirs += $(LOCALES)
     145
     146# Dependency for the locale files.  We actually make it depend only on
     147# one of the files.
     148$(addprefix $(objpfx),$(CTYPE_FILES)): %: \
     149  gen-locale.sh $(common-objpfx)locale/localedef Makefile \
     150  $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
     151        @$(SHELL) -e gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
     152
     153$(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
     154  $(addprefix $(objpfx),$(CTYPE_FILES))
     155
     156tests: $(objpfx)sort-test.out $(objpfx)tst-fmon.out $(objpfx)tst-locale.out \
     157       $(objpfx)tst-rpmatch.out $(objpfx)tst-trans.out \
     158       $(objpfx)tst-mbswcs.out $(objpfx)tst-ctype.out $(objpfx)tst-wctype.out \
     159       $(objpfx)tst-langinfo.out $(objpfx)tst-numeric.out
     160
     161$(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
     162                       $(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
     163        $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(test-input) \
     164          > $@
     165$(objpfx)tst-fmon.out: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data \
     166                       $(objpfx)sort-test.out \
     167                       $(addprefix $(objpfx),$(CTYPE_FILES))
     168        $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
     169          > $@
     170$(objpfx)tst-numeric.out: tst-numeric.sh $(objpfx)tst-numeric tst-numeric.data \
     171                       $(objpfx)sort-test.out \
     172                       $(addprefix $(objpfx),$(CTYPE_FILES))
     173        $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-numeric.data \
     174          > $@
     175$(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
     176                         $(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
     177        $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
     178$(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
     179                          $(objpfx)tst-fmon.out \
     180                          $(addprefix $(objpfx),$(CTYPE_FILES))
     181        $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
     182$(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \
     183                        $(addprefix $(objpfx),$(CTYPE_FILES))
     184        $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
     185$(objpfx)tst-mbswcs.out: tst-mbswcs.sh $(objpfx)tst-mbswcs1 \
     186                         $(objpfx)tst-mbswcs2 $(objpfx)tst-mbswcs3 \
     187                         $(objpfx)tst-mbswcs4 $(objpfx)tst-mbswcs5 \
     188                         $(addprefix $(objpfx),$(CTYPE_FILES))
     189        $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
     190$(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \
     191                        $(objpfx)sort-test.out \
     192                        $(addprefix $(objpfx),$(CTYPE_FILES))
     193        $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
     194$(objpfx)tst-wctype.out: tst-wctype.sh $(objpfx)tst-wctype \
     195                        $(objpfx)sort-test.out tst-wctype.input \
     196                        $(addprefix $(objpfx),$(CTYPE_FILES))
     197        $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
     198$(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
     199                        $(objpfx)sort-test.out \
     200                        $(addprefix $(objpfx),$(CTYPE_FILES))
     201        $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
     202$(objpfx)tst-digits.out: $(objpfx)tst-locale.out
     203$(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
     204endif
     205
     206include SUPPORTED
     207
     208INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
     209
     210# Sometimes the whole collection of locale files should be installed.
     211LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
     212$(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
     213install-locales: $(INSTALL-SUPPORTED-LOCALES)
     214
     215install-locales-dir:
     216        $(..)./scripts/mkinstalldirs $(inst_localedir)
     217
     218$(INSTALL-SUPPORTED-LOCALES): install-locales-dir
     219        @locale=`echo $@ | sed -e 's/^install-//'`; \
     220        charset=`echo $$locale | sed -e 's,.*/,,'`; \
     221        locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \
     222        echo -n `echo $$locale | sed 's/\([^.\@]*\).*/\1/'`; \
     223        echo -n ".$$charset"; \
     224        echo -n `echo $$locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
     225        echo -n '...'; \
     226        input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
     227        $(LOCALEDEF) --alias-file=../intl/locale.alias \
     228                     -i locales/$$input -c -f charmaps/$$charset \
     229                     $(addprefix --prefix=,$(install_root)) $$locale; \
     230        echo ' done'; \
     231
     232# The mbwc-tests need some environment setup to find the locale data files
     233TEST_MBWC_ENV:= LOCPATH=$(common-objpfx)localedata
     234tst_iswalnum-ENV = $(TEST_MBWC_ENV)
     235tst_iswalpha-ENV = $(TEST_MBWC_ENV)
     236tst_iswcntrl-ENV = $(TEST_MBWC_ENV)
     237tst_iswctype-ENV = $(TEST_MBWC_ENV)
     238tst_iswdigit-ENV = $(TEST_MBWC_ENV)
     239tst_iswgraph-ENV = $(TEST_MBWC_ENV)
     240tst_iswlower-ENV = $(TEST_MBWC_ENV)
     241tst_iswprint-ENV = $(TEST_MBWC_ENV)
     242tst_iswpunct-ENV = $(TEST_MBWC_ENV)
     243tst_iswspace-ENV = $(TEST_MBWC_ENV)
     244tst_iswupper-ENV = $(TEST_MBWC_ENV)
     245tst_iswxdigit-ENV = $(TEST_MBWC_ENV)
     246tst_mblen-ENV = $(TEST_MBWC_ENV)
     247tst_mbrlen-ENV = $(TEST_MBWC_ENV)
     248tst_mbrtowc-ENV = $(TEST_MBWC_ENV)
     249tst_mbsrtowcs-ENV = $(TEST_MBWC_ENV)
     250tst_mbstowcs-ENV = $(TEST_MBWC_ENV)
     251tst_mbtowc-ENV = $(TEST_MBWC_ENV)
     252tst_strcoll-ENV = $(TEST_MBWC_ENV)
     253tst_strfmon-ENV = $(TEST_MBWC_ENV)
     254tst_strxfrm-ENV = $(TEST_MBWC_ENV)
     255tst_swscanf-ENV = $(TEST_MBWC_ENV)
     256tst_towctrans-ENV = $(TEST_MBWC_ENV)
     257tst_towlower-ENV = $(TEST_MBWC_ENV)
     258tst_towupper-ENV = $(TEST_MBWC_ENV)
     259tst_wcrtomb-ENV = $(TEST_MBWC_ENV)
     260tst_wcscat-ENV = $(TEST_MBWC_ENV)
     261tst_wcschr-ENV = $(TEST_MBWC_ENV)
     262tst_wcscmp-ENV = $(TEST_MBWC_ENV)
     263tst_wcscoll-ENV = $(TEST_MBWC_ENV)
     264tst_wcscpy-ENV = $(TEST_MBWC_ENV)
     265tst_wcscspn-ENV = $(TEST_MBWC_ENV)
     266tst_wcslen-ENV = $(TEST_MBWC_ENV)
     267tst_wcsncat-ENV = $(TEST_MBWC_ENV)
     268tst_wcsncmp-ENV = $(TEST_MBWC_ENV)
     269tst_wcsncpy-ENV = $(TEST_MBWC_ENV)
     270tst_wcspbrk-ENV = $(TEST_MBWC_ENV)
     271tst_wcsrtombs-ENV = $(TEST_MBWC_ENV)
     272tst_wcsspn-ENV = $(TEST_MBWC_ENV)
     273tst_wcsstr-ENV = $(TEST_MBWC_ENV)
     274tst_wcstod-ENV = $(TEST_MBWC_ENV)
     275tst_wcstok-ENV = $(TEST_MBWC_ENV)
     276tst_wcstombs-ENV = $(TEST_MBWC_ENV)
     277tst_wcswidth-ENV = $(TEST_MBWC_ENV)
     278tst_wcsxfrm-ENV = $(TEST_MBWC_ENV)
     279tst_wctob-ENV = $(TEST_MBWC_ENV)
     280tst_wctomb-ENV = $(TEST_MBWC_ENV)
     281tst_wctrans-ENV = $(TEST_MBWC_ENV)
     282tst_wctype-ENV = $(TEST_MBWC_ENV)
     283tst_wcwidth-ENV = $(TEST_MBWC_ENV)
     284tst-digits-ENV = $(TEST_MBWC_ENV)
     285tst-mbswcs6-ENV = $(TEST_MBWC_ENV)
     286tst-xlocale1-ENV = $(TEST_MBWC_ENV)
     287tst-xlocale2-ENV = $(TEST_MBWC_ENV)
     288tst-strfmon1-ENV = $(TEST_MBWC_ENV)
     289tst-strptime-ENV = $(TEST_MBWC_ENV)
     290
     291tst-setlocale-ENV = LOCPATH=$(common-objpfx)localedata LC_ALL=ja_JP.EUC-JP
     292
     293bug-iconv-trans-ENV = LOCPATH=$(common-objpfx)localedata
     294
     295tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
     296
     297tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace \
     298                LOCPATH=$(common-objpfx)localedata
     299$(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
     300        $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
  • Makeconfig

    diff -Naur glibc-2.9.orig/Makeconfig glibc-2.9/Makeconfig
    old new  
    446446                           $(common-objpfx)libc% $(+postinit),$^) \
    447447              $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit)
    448448endif
     449# Command for linking programs against the host system.
     450ifndef +link-native
     451+link-native = $(BUILD_CC) -static -g -o $@ $^ \
     452              $(LDFLAGS) $(LDFLAGS-$(@F)) \
     453              $(combreloc-LDFLAGS) $(relro-LDFLAGS) \
     454              $(link-extra-libs)
     455endif
    449456# Command for statically linking bounded-pointer programs with the C library.
    450457ifndef +link-bounded
    451458+link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
     
    659666            $(+sysdep-includes) $(includes) \
    660667            $(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
    661668
     669+includes-native = -I$(..)include-native -I$(objpfx) -I.
     670
    662671# Since libio has several internal header files, we use a -I instead
    663672# of many little headers in the include directory.
    664673libio-include = -I$(..)libio
     
    673682           $(foreach lib,$(libof-$(basename $(@F))) \
    674683                         $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
    675684           $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
     685CPPFLAGS-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)))
    676688override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
    677689                  $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
    678690                  $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
    679691                  $(CFLAGS-$(@F))
     692override CFLAGS-native = -std=gnu99 $(gnu89-inline-CFLAGS) $(default_cflags) $(+gccwarn-c) \
     693                         $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
    680694override CXXFLAGS = $(c++-sysincludes) \
    681695                    $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
    682696                    $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
  • Makerules

    diff -Naur glibc-2.9.orig/Makerules glibc-2.9/Makerules
    old new  
    278278object-suffixes-left := $(all-object-suffixes)
    279279include $(o-iterator)
    280280
     281$(objpfx)%-native.o: %.c $(before-compile)
     282        $(native-compile-command.c)
     283
    281284# Omit the objpfx rules when building in the source tree, because
    282285# objpfx is empty and so these rules just override the ones above.
    283286ifdef objpfx
     
    354357compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION) $(compile-mkdep-flags)
    355358compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
    356359compile-command.cc = $(compile.cc) $(OUTPUT_OPTION) $(compile-mkdep-flags)
     360# Native commands
     361native-compile-command.c = $(native-compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
    357362
    358363# GCC can grok options after the file name, and it looks nicer that way.
    359364compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
     
    363368COMPILE.S = $(CC) -c $(CPPFLAGS) $(S-CPPFLAGS) \
    364369                  $(ASFLAGS) $(ASFLAGS-$(suffix $@))
    365370COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
     371# Native commands
     372native-compile.c = $(BUILD_CC) -g $< -c $(CFLAGS-native) $(CPPFLAGS-native)
    366373
    367374# We need this for the output to go in the right place.  It will default to
    368375# empty if make was configured to work with a cc that can't grok -c and -o
     
    11561163$(make-target-directory)
    11571164$(patsubst %/,cd % &&,$(objpfx)) \
    11581165$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
    1159             $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
     1166            $(addprefix $(shell pwd)/, $^) -o $(@F)
    11601167endef
    11611168
    11621169# Command to compile $< in $(common-objdir) using the native libraries.
  • malloc/Makefile

    diff -Naur glibc-2.9.orig/malloc/Makefile glibc-2.9/malloc/Makefile
    old new  
    7373endif
    7474endif
    7575
    76 # Unless we get a test for the availability of libgd which also works
    77 # for cross-compiling we disable the memusagestat generation in this
    78 # situation.
    79 ifneq ($(cross-compiling),yes)
    8076# If the gd library is available we build the `memusagestat' program.
    8177ifneq ($(LIBGD),no)
    8278others: $(objpfx)memusage
     
    9187# is to presume that the standard system headers will be ok for this file.
    9288$(objpfx)memusagestat.o: sysincludes = # nothing
    9389endif
    94 endif
    9590
    9691# Another goal which can be used to override the configure decision.
    9792.PHONY: do-memusagestat
  • glibc-2.9

    diff -Naur glibc-2.9.orig/Rules glibc-2.9/Rules
    old new  
    8787
    8888.PHONY: others tests
    8989ifeq ($(build-programs),yes)
    90 others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
     90others: $(addprefix $(objpfx),$(others) $(others-native) $(sysdep-others) $(extra-objs))
    9191else
    9292others: $(addprefix $(objpfx),$(extra-objs))
    9393endif
     
    106106ifeq ($(build-programs),yes)
    107107binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
    108108binaries-static = $(others-static) $(tests-static) $(xtests-static)
     109binaries-native = $(others-native)
    109110else
    110111binaries-all = $(tests) $(xtests) $(test-srcs)
    111112binaries-static =
     113binaries-native =
    112114endif
    113115
    114116binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
     
    127129        $(+link-static)
    128130endif
    129131
     132ifneq "$(strip $(binaries-native))" ""
     133$(addprefix $(objpfx),$(binaries-native)): %: %.o
     134        $(+link-native)
     135endif
     136
    130137ifeq ($(build-bounded),yes)
    131138binaries-bounded = $(addsuffix -bp,$(tests) $(xtests) $(test-srcs))
    132139$(addprefix $(objpfx),$(binaries-bounded)): %-bp: %.ob \
  • sunrpc/Makefile

    diff -Naur glibc-2.9.orig/sunrpc/Makefile glibc-2.9/sunrpc/Makefile
    old new  
    7070            clnt_unix svc_unix create_xid xdr_intXX_t
    7171
    7272others := rpcinfo
     73ifneq ($(cross-compiling),no)
     74others-native := rpcgen-native
     75endif
    7376install-bin := rpcgen
    7477install-sbin := rpcinfo
    7578rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
     
    98101             $(resolvobjdir)/libresolv.a
    99102endif
    100103
    101 ifeq (no,$(cross-compiling))
    102 # We can only build this library if we can run the rpcgen we build.
    103104headers += $(rpcsvc:%.x=rpcsvc/%.h)
    104105extra-libs := librpcsvc
    105106extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
    106107librpcsvc-routines = $(rpcsvc:%.x=x%)
    107108librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
    108109omit-deps = $(librpcsvc-routines)
    109 endif
    110110
    111111CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag)
    112112CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag)
     
    136136  $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
    137137        $(+link)
    138138
     139ifneq ($(cross-compiling),no)
     140rpcgen.c:
     141        touch rpcgen.c
     142
     143$(objpfx)rpcgen-native: $(addprefix $(objpfx),$(rpcgen-objs:%.o=%-native.o))
     144endif
     145
    139146# This makes sure -DNOT_IN_libc is passed for all these modules.
    140147cpp-srcs-left := $(rpcgen-objs:.o=.c)
    141148lib := nonlib
    142149include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
    143150
    144151# Tell rpcgen where to find the C preprocessor.
     152ifeq ($(cross-compiling),no)
    145153rpcgen-cmd = CPP='$(CC) -E -x c-header' $(built-program-cmd) -Y ../scripts
     154rpcgen = $(objpfx)rpcgen
     155else
     156rpcgen-cmd = CPP='$(CC) -E -x c-header' $(objpfx)rpcgen-native -Y ../scripts
     157rpcgen = $(objpfx)rpcgen-native
     158endif
    146159
    147160# Install the rpc data base file.
    148161$(inst_sysconfdir)/rpc: etc.rpc $(+force)
     
    153166# relinked.
    154167$(rpcsvc:%.x=$(objpfx)rpcsvc/%.h): $(objpfx)rpcsvc/%.h: $(objpfx)rpcsvc/%.stmp
    155168        @:
    156 $(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(objpfx)rpcgen
     169$(objpfx)rpcsvc/%.stmp: rpcsvc/%.x $(rpcgen)
    157170        $(make-target-directory)
    158171        -@rm -f ${@:stmp=T} $@
    159172        $(rpcgen-cmd) -h $< -o ${@:stmp=T}
     
    163176# Generate the rpcsvc XDR functions with rpcgen.
    164177$(rpcsvc:%.x=$(objpfx)x%.c): $(objpfx)x%.c: $(objpfx)x%.stmp
    165178        @:
    166 $(objpfx)x%.stmp: rpcsvc/%.x $(objpfx)rpcgen
     179$(objpfx)x%.stmp: rpcsvc/%.x $(rpcgen)
    167180        -@rm -f ${@:stmp=T} $@
    168181        $(rpcgen-cmd) -c $< -o ${@:stmp=T}
    169182        $(move-if-change) $(@:stmp=T) $(@:stmp=c)
  • timezone/Makefile

    diff -Naur glibc-2.9.orig/timezone/Makefile glibc-2.9/timezone/Makefile
    old new  
    2828extra-objs := scheck.o ialloc.o
    2929
    3030others  := zdump zic
     31ifneq ($(cross-compiling),no)
     32others-native := zic-native
     33endif
    3134tests   := test-tz tst-timezone
    3235
    3336tzbases := africa antarctica asia australasia europe northamerica \
     
    6972                                         $(addprefix $(inst_zonedir)/, \
    7073                                                     $(posixrules-file)))
    7174
    72 ifeq ($(cross-compiling),no)
    73 # Don't try to install the zoneinfo files since we can't run zic.
    7475install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
    7576                                              $(zonenames:%=posix/%) \
    7677                                              $(zonenames:%=right/%)) \
    7778                 $(installed-localtime-file) $(installed-posixrules-file)
    78 endif
    7979
    8080ifeq ($(have-ksh),yes)
    8181install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
     
    128128# We have to use `-d $(inst_zonedir)' to explictly tell zic where to
    129129# place the output files although $(zonedir) is compiled in.  But the
    130130# user might have set $(install_root) on the command line of `make install'.
     131ifeq ($(cross-compiling),no)
    131132zic-cmd = $(built-program-cmd) -d $(inst_zonedir)
     133else
     134zic-cmd = $(common-objpfx)/timezone/zic-native -d $(inst_zonedir)
     135endif
    132136tzcompile = $(zic-cmd)$(target-zone-flavor) -L $(word 3,$^) \
    133137            -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $<
    134138
     
    158162        $(zic-cmd) -p $(posixrules)
    159163endif
    160164
    161 
    162165$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
     166ifneq ($(cross-compiling),no)
     167$(objpfx)zic-native:  $(objpfx)scheck-native.o $(objpfx)ialloc-native.o
     168endif
    163169
    164170tz-cflags = -DTZDIR='"$(zonedir)"' \
    165171            -DTZDEFAULT='"$(localtime-file)"' \
Note: See TracBrowser for help on using the repository browser.