100-uclibc-conf.patch 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635
  1. diff -urN gcc-3.3.3-dist/boehm-gc/config.sub gcc-3.3.3/boehm-gc/config.sub
  2. --- gcc-3.3.3-dist/boehm-gc/config.sub 2002-02-11 22:37:53.000000000 -0600
  3. +++ gcc-3.3.3/boehm-gc/config.sub 2004-08-12 04:47:51.000000000 -0500
  4. @@ -118,7 +118,7 @@
  5. # Here we must recognize all the valid KERNEL-OS combinations.
  6. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  7. case $maybe_os in
  8. - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
  9. + nto-qnx* | linux-gnu* | linux-uclibc* | storm-chaos* | os2-emx* | windows32-*)
  10. os=-$maybe_os
  11. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  12. ;;
  13. @@ -1089,7 +1089,8 @@
  14. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  15. | -chorusos* | -chorusrdb* \
  16. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  17. - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  18. + | -mingw32* | -linux-gnu* | -linux-uclibc* \
  19. + | -uxpv* | -beos* | -mpeix* | -udk* \
  20. | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  21. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  22. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  23. diff -urN gcc-3.3.3-dist/boehm-gc/configure gcc-3.3.3/boehm-gc/configure
  24. --- gcc-3.3.3-dist/boehm-gc/configure 2004-02-14 14:34:20.000000000 -0600
  25. +++ gcc-3.3.3/boehm-gc/configure 2004-08-12 04:47:51.000000000 -0500
  26. @@ -1940,6 +1940,11 @@
  27. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  28. ;;
  29. +linux-uclibc*)
  30. + lt_cv_deplibs_check_method=pass_all
  31. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  32. + ;;
  33. +
  34. netbsd*)
  35. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  36. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  37. diff -urN gcc-3.3.3-dist/config.sub gcc-3.3.3/config.sub
  38. --- gcc-3.3.3-dist/config.sub 2003-01-30 17:25:36.000000000 -0600
  39. +++ gcc-3.3.3/config.sub 2004-08-12 04:47:51.000000000 -0500
  40. @@ -118,7 +118,7 @@
  41. # Here we must recognize all the valid KERNEL-OS combinations.
  42. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  43. case $maybe_os in
  44. - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
  45. + nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
  46. os=-$maybe_os
  47. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  48. ;;
  49. @@ -1112,7 +1112,8 @@
  50. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  51. | -chorusos* | -chorusrdb* \
  52. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  53. - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  54. + | -mingw32* | -linux-gnu* | -linux-uclibc* \
  55. + | -uxpv* | -beos* | -mpeix* | -udk* \
  56. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  57. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  58. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  59. diff -urN gcc-3.3.3-dist/gcc/config/arm/linux-elf.h gcc-3.3.3/gcc/config/arm/linux-elf.h
  60. --- gcc-3.3.3-dist/gcc/config/arm/linux-elf.h 2003-09-16 10:39:23.000000000 -0500
  61. +++ gcc-3.3.3/gcc/config/arm/linux-elf.h 2004-08-12 04:47:51.000000000 -0500
  62. @@ -78,6 +78,18 @@
  63. "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  64. #undef LINK_SPEC
  65. +#ifdef USE_UCLIBC
  66. +#define LINK_SPEC "%{h*} %{version:-v} \
  67. + %{b} %{Wl,*:%*} \
  68. + %{static:-Bstatic} \
  69. + %{shared:-shared} \
  70. + %{symbolic:-Bsymbolic} \
  71. + %{rdynamic:-export-dynamic} \
  72. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
  73. + -X \
  74. + %{mbig-endian:-EB}" \
  75. + SUBTARGET_EXTRA_LINK_SPEC
  76. +#else
  77. #define LINK_SPEC "%{h*} %{version:-v} \
  78. %{b} %{Wl,*:%*} \
  79. %{static:-Bstatic} \
  80. @@ -88,6 +100,7 @@
  81. -X \
  82. %{mbig-endian:-EB}" \
  83. SUBTARGET_EXTRA_LINK_SPEC
  84. +#endif
  85. #define TARGET_OS_CPP_BUILTINS() \
  86. do { \
  87. diff -urN gcc-3.3.3-dist/gcc/config/cris/linux.h gcc-3.3.3/gcc/config/cris/linux.h
  88. --- gcc-3.3.3-dist/gcc/config/cris/linux.h 2003-03-10 21:01:35.000000000 -0600
  89. +++ gcc-3.3.3/gcc/config/cris/linux.h 2004-08-12 04:47:51.000000000 -0500
  90. @@ -81,6 +81,25 @@
  91. #undef CRIS_DEFAULT_CPU_VERSION
  92. #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  93. +#ifdef USE_UCLIBC
  94. +
  95. +#undef CRIS_SUBTARGET_VERSION
  96. +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  97. +
  98. +#undef CRIS_LINK_SUBTARGET_SPEC
  99. +#define CRIS_LINK_SUBTARGET_SPEC \
  100. + "-mcrislinux\
  101. + -rpath-link include/asm/../..%s\
  102. + %{shared} %{static}\
  103. + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  104. + %{!shared: \
  105. + %{!static: \
  106. + %{rdynamic:-export-dynamic} \
  107. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  108. + %{!r:%{O2|O3: --gc-sections}}"
  109. +
  110. +#else /* USE_UCLIBC */
  111. +
  112. #undef CRIS_SUBTARGET_VERSION
  113. #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  114. @@ -95,6 +114,8 @@
  115. %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
  116. %{!r:%{O2|O3: --gc-sections}}"
  117. +#endif /* USE_UCLIBC */
  118. +
  119. /* Node: Run-time Target */
  120. diff -urN gcc-3.3.3-dist/gcc/config/cris/t-linux-uclibc gcc-3.3.3/gcc/config/cris/t-linux-uclibc
  121. --- gcc-3.3.3-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  122. +++ gcc-3.3.3/gcc/config/cris/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
  123. @@ -0,0 +1,3 @@
  124. +T_CFLAGS = -DUSE_UCLIBC
  125. +TARGET_LIBGCC2_CFLAGS += -fPIC
  126. +CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
  127. diff -urN gcc-3.3.3-dist/gcc/config/i386/linux.h gcc-3.3.3/gcc/config/i386/linux.h
  128. --- gcc-3.3.3-dist/gcc/config/i386/linux.h 2003-11-14 00:46:12.000000000 -0600
  129. +++ gcc-3.3.3/gcc/config/i386/linux.h 2004-08-12 04:47:51.000000000 -0500
  130. @@ -136,6 +136,15 @@
  131. %{static:-static}}}"
  132. #endif
  133. #else
  134. +#if defined USE_UCLIBC
  135. +#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  136. + %{!shared: \
  137. + %{!ibcs: \
  138. + %{!static: \
  139. + %{rdynamic:-export-dynamic} \
  140. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  141. + %{static:-static}}}"
  142. +#else
  143. #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  144. %{!shared: \
  145. %{!ibcs: \
  146. @@ -144,6 +153,7 @@
  147. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  148. %{static:-static}}}"
  149. #endif
  150. +#endif
  151. /* A C statement (sans semicolon) to output to the stdio stream
  152. FILE the assembler definition of uninitialized global DECL named
  153. diff -urN gcc-3.3.3-dist/gcc/config/mips/linux.h gcc-3.3.3/gcc/config/mips/linux.h
  154. --- gcc-3.3.3-dist/gcc/config/mips/linux.h 2003-12-23 02:58:00.000000000 -0600
  155. +++ gcc-3.3.3/gcc/config/mips/linux.h 2004-08-12 04:47:51.000000000 -0500
  156. @@ -175,6 +175,17 @@
  157. /* Borrowed from sparc/linux.h */
  158. #undef LINK_SPEC
  159. +#ifdef USE_UCLIBC
  160. +#define LINK_SPEC \
  161. + "%(endian_spec) \
  162. + %{shared:-shared} \
  163. + %{!shared: \
  164. + %{!ibcs: \
  165. + %{!static: \
  166. + %{rdynamic:-export-dynamic} \
  167. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  168. + %{static:-static}}}"
  169. +#else
  170. #define LINK_SPEC \
  171. "%(endian_spec) \
  172. %{shared:-shared} \
  173. @@ -184,6 +195,7 @@
  174. %{rdynamic:-export-dynamic} \
  175. %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
  176. %{static:-static}}}"
  177. +#endif
  178. #undef SUBTARGET_ASM_SPEC
  179. #define SUBTARGET_ASM_SPEC "\
  180. diff -urN gcc-3.3.3-dist/gcc/config/sh/linux.h gcc-3.3.3/gcc/config/sh/linux.h
  181. --- gcc-3.3.3-dist/gcc/config/sh/linux.h 2003-11-06 17:13:33.000000000 -0600
  182. +++ gcc-3.3.3/gcc/config/sh/linux.h 2004-08-12 04:47:51.000000000 -0500
  183. @@ -44,12 +44,21 @@
  184. #undef SUBTARGET_LINK_EMUL_SUFFIX
  185. #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
  186. #undef SUBTARGET_LINK_SPEC
  187. +#ifdef USE_UCLIBC
  188. +#define SUBTARGET_LINK_SPEC \
  189. + "%{shared:-shared} \
  190. + %{!static: \
  191. + %{rdynamic:-export-dynamic} \
  192. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  193. + %{static:-static}"
  194. +#else
  195. #define SUBTARGET_LINK_SPEC \
  196. "%{shared:-shared} \
  197. %{!static: \
  198. %{rdynamic:-export-dynamic} \
  199. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  200. %{static:-static}"
  201. +#endif
  202. /* The GNU C++ standard library requires that these macros be defined. */
  203. #undef CPLUSPLUS_CPP_SPEC
  204. diff -urN gcc-3.3.3-dist/gcc/config/sh/t-linux-uclibc gcc-3.3.3/gcc/config/sh/t-linux-uclibc
  205. --- gcc-3.3.3-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  206. +++ gcc-3.3.3/gcc/config/sh/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
  207. @@ -0,0 +1,16 @@
  208. +T_CFLAGS = -DUSE_UCLIBC
  209. +
  210. +# Don't run fixproto
  211. +STMP_FIXPROTO =
  212. +
  213. +TARGET_LIBGCC2_CFLAGS = -fpic
  214. +LIB1ASMFUNCS_CACHE = _ic_invalidate
  215. +
  216. +LIB2FUNCS_EXTRA=
  217. +
  218. +MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
  219. +MULTILIB_DIRNAMES=
  220. +MULTILIB_MATCHES =
  221. +MULTILIB_EXCEPTIONS=
  222. +
  223. +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
  224. diff -urN gcc-3.3.3-dist/gcc/config/sh/t-sh64-uclibc gcc-3.3.3/gcc/config/sh/t-sh64-uclibc
  225. --- gcc-3.3.3-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
  226. +++ gcc-3.3.3/gcc/config/sh/t-sh64-uclibc 2004-08-12 04:47:51.000000000 -0500
  227. @@ -0,0 +1,13 @@
  228. +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o
  229. +
  230. +LIB1ASMFUNCS = \
  231. + _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
  232. + _shcompact_call_trampoline _shcompact_return_trampoline \
  233. + _shcompact_incoming_args _ic_invalidate _nested_trampoline \
  234. + _push_pop_shmedia_regs \
  235. + _udivdi3 _divdi3 _umoddi3 _moddi3
  236. +
  237. +MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
  238. +MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
  239. +MULTILIB_MATCHES=
  240. +MULTILIB_EXCEPTIONS=
  241. diff -urN gcc-3.3.3-dist/gcc/config/t-linux-uclibc gcc-3.3.3/gcc/config/t-linux-uclibc
  242. --- gcc-3.3.3-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  243. +++ gcc-3.3.3/gcc/config/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
  244. @@ -0,0 +1,23 @@
  245. +T_CFLAGS = -DUSE_UCLIBC
  246. +
  247. +# Don't run fixproto
  248. +STMP_FIXPROTO =
  249. +
  250. +# Compile crtbeginS.o and crtendS.o with pic.
  251. +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
  252. +# Compile libgcc2.a with pic.
  253. +TARGET_LIBGCC2_CFLAGS = -fPIC
  254. +
  255. +# Override t-slibgcc-elf-ver to export some libgcc symbols with
  256. +# the symbol versions that glibc used.
  257. +SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
  258. +
  259. +# Use unwind-dw2-fde-glibc
  260. +#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
  261. +# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
  262. +#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
  263. +
  264. +# Use unwind-dw2-fde
  265. +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
  266. + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
  267. +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
  268. diff -urN gcc-3.3.3-dist/gcc/config.gcc gcc-3.3.3/gcc/config.gcc
  269. --- gcc-3.3.3-dist/gcc/config.gcc 2004-01-21 00:06:00.000000000 -0600
  270. +++ gcc-3.3.3/gcc/config.gcc 2004-08-12 04:47:51.000000000 -0500
  271. @@ -697,6 +697,17 @@
  272. extra_parts=""
  273. use_collect2=yes
  274. ;;
  275. +arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
  276. + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  277. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
  278. + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  279. + gnu_ld=yes
  280. + case x${enable_threads} in
  281. + x | xyes | xpthreads | xposix)
  282. + thread_file='posix'
  283. + ;;
  284. + esac
  285. + ;;
  286. arm*-*-linux*) # ARM GNU/Linux with ELF
  287. tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  288. tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  289. @@ -772,6 +783,10 @@
  290. tmake_file="cris/t-cris cris/t-elfmulti"
  291. gas=yes
  292. ;;
  293. +cris-*-linux-uclibc*)
  294. + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  295. + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
  296. + ;;
  297. cris-*-linux*)
  298. tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  299. tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
  300. @@ -1173,6 +1188,11 @@
  301. thread_file='single'
  302. fi
  303. ;;
  304. +i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
  305. + # with ELF format using uClibc
  306. + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
  307. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
  308. + ;;
  309. i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
  310. # with ELF format using glibc 2
  311. # aka GNU/Linux C library 6
  312. @@ -1883,6 +1903,16 @@
  313. tm_file="elfos.h ${tm_file} mips/netbsd.h"
  314. tmake_file="${tmake_file} mips/t-netbsd"
  315. ;;
  316. +mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
  317. + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  318. + case $machine in
  319. + mipsisa32*-*)
  320. + target_cpu_default="MASK_SOFT_FLOAT"
  321. + tm_defines="MIPS_ISA_DEFAULT=32"
  322. + ;;
  323. + esac
  324. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux"
  325. + ;;
  326. mips*-*-linux*) # Linux MIPS, either endian.
  327. tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  328. case $machine in
  329. @@ -2129,6 +2159,11 @@
  330. out_file=rs6000/rs6000.c
  331. tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
  332. ;;
  333. +powerpc-*-linux-uclibc*)
  334. + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  335. + out_file=rs6000/rs6000.c
  336. + tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
  337. + ;;
  338. powerpc-*-linux*)
  339. tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  340. out_file=rs6000/rs6000.c
  341. @@ -2313,10 +2348,18 @@
  342. tmake_file="${tmake_file} sh/t-le"
  343. ;;
  344. esac
  345. - tmake_file="${tmake_file} sh/t-linux"
  346. + case $machine in
  347. + *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
  348. + *) tmake_file="${tmake_file} sh/t-linux" ;;
  349. + esac
  350. tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
  351. gas=yes gnu_ld=yes
  352. case $machine in
  353. + sh64*-*-linux-uclibc*)
  354. + tmake_file="${tmake_file} sh/t-sh64-uclibc"
  355. + tm_file="${tm_file} sh/sh64.h"
  356. + extra_headers="shmedia.h ushmedia.h sshmedia.h"
  357. + ;;
  358. sh64*)
  359. tmake_file="${tmake_file} sh/t-sh64"
  360. tm_file="${tm_file} sh/sh64.h"
  361. diff -urN gcc-3.3.3-dist/libstdc++-v3/aclocal.m4 gcc-3.3.3/libstdc++-v3/aclocal.m4
  362. --- gcc-3.3.3-dist/libstdc++-v3/aclocal.m4 2004-01-12 10:18:44.000000000 -0600
  363. +++ gcc-3.3.3/libstdc++-v3/aclocal.m4 2004-08-12 04:47:51.000000000 -0500
  364. @@ -1216,6 +1216,9 @@
  365. dnl Default to "generic"
  366. if test x$enable_clocale_flag = xno; then
  367. case x${target_os} in
  368. + xlinux-uclibc*)
  369. + enable_clocale_flag=uclibc
  370. + ;;
  371. xlinux* | xgnu*)
  372. AC_EGREP_CPP([_GLIBCPP_ok], [
  373. #include <features.h>
  374. @@ -1339,6 +1342,41 @@
  375. CTIME_CC=config/locale/generic/time_members.cc
  376. CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  377. ;;
  378. + xuclibc)
  379. + AC_MSG_RESULT(uclibc)
  380. +
  381. + # Declare intention to use gettext, and add support for specific
  382. + # languages.
  383. + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  384. + ALL_LINGUAS="de fr"
  385. +
  386. + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  387. + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  388. + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  389. + USE_NLS=yes
  390. + fi
  391. + # Export the build objects.
  392. + for ling in $ALL_LINGUAS; do \
  393. + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
  394. + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
  395. + done
  396. + AC_SUBST(glibcpp_MOFILES)
  397. + AC_SUBST(glibcpp_POFILES)
  398. +
  399. + CLOCALE_H=config/locale/uclibc/c_locale.h
  400. + CLOCALE_CC=config/locale/uclibc/c_locale.cc
  401. + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
  402. + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  403. + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  404. + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  405. + CMESSAGES_H=config/locale/uclibc/messages_members.h
  406. + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  407. + CMONEY_CC=config/locale/uclibc/monetary_members.cc
  408. + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  409. + CTIME_H=config/locale/uclibc/time_members.h
  410. + CTIME_CC=config/locale/uclibc/time_members.cc
  411. + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  412. + ;;
  413. *)
  414. echo "$enable_clocale is an unknown locale package" 1>&2
  415. exit 1
  416. diff -urN gcc-3.3.3-dist/libstdc++-v3/configure gcc-3.3.3/libstdc++-v3/configure
  417. --- gcc-3.3.3-dist/libstdc++-v3/configure 2004-01-12 10:18:45.000000000 -0600
  418. +++ gcc-3.3.3/libstdc++-v3/configure 2004-08-12 04:49:13.000000000 -0500
  419. @@ -2010,6 +2010,11 @@
  420. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  421. ;;
  422. +linux-uclibc*)
  423. + lt_cv_deplibs_check_method=pass_all
  424. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  425. + ;;
  426. +
  427. netbsd*)
  428. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  429. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  430. @@ -2996,6 +3001,9 @@
  431. if test x$enable_clocale_flag = xno; then
  432. case x${target_os} in
  433. + xlinux-uclibc*)
  434. + enable_clocale_flag=uclibc
  435. + ;;
  436. xlinux* | xgnu*)
  437. cat > conftest.$ac_ext <<EOF
  438. #line 3002 "configure"
  439. @@ -3182,6 +3190,70 @@
  440. CTIME_CC=config/locale/generic/time_members.cc
  441. CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  442. ;;
  443. + xuclibc)
  444. + echo "$ac_t""uclibc" 1>&6
  445. +
  446. + # Declare intention to use gettext, and add support for specific
  447. + # languages.
  448. + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  449. + ALL_LINGUAS="de fr"
  450. +
  451. + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  452. + # Extract the first word of "msgfmt", so it can be a program name with args.
  453. +set dummy msgfmt; ac_word=$2
  454. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  455. +echo "configure:3117: checking for $ac_word" >&5
  456. +if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
  457. + echo $ac_n "(cached) $ac_c" 1>&6
  458. +else
  459. + if test -n "$check_msgfmt"; then
  460. + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
  461. +else
  462. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  463. + ac_dummy="$PATH"
  464. + for ac_dir in $ac_dummy; do
  465. + test -z "$ac_dir" && ac_dir=.
  466. + if test -f $ac_dir/$ac_word; then
  467. + ac_cv_prog_check_msgfmt="yes"
  468. + break
  469. + fi
  470. + done
  471. + IFS="$ac_save_ifs"
  472. + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
  473. +fi
  474. +fi
  475. +check_msgfmt="$ac_cv_prog_check_msgfmt"
  476. +if test -n "$check_msgfmt"; then
  477. + echo "$ac_t""$check_msgfmt" 1>&6
  478. +else
  479. + echo "$ac_t""no" 1>&6
  480. +fi
  481. +
  482. + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  483. + USE_NLS=yes
  484. + fi
  485. + # Export the build objects.
  486. + for ling in $ALL_LINGUAS; do \
  487. + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
  488. + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
  489. + done
  490. +
  491. +
  492. +
  493. + CLOCALE_H=config/locale/uclibc/c_locale.h
  494. + CLOCALE_CC=config/locale/uclibc/c_locale.cc
  495. + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
  496. + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  497. + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  498. + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  499. + CMESSAGES_H=config/locale/uclibc/messages_members.h
  500. + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  501. + CMONEY_CC=config/locale/uclibc/monetary_members.cc
  502. + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  503. + CTIME_H=config/locale/uclibc/time_members.h
  504. + CTIME_CC=config/locale/uclibc/time_members.cc
  505. + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  506. + ;;
  507. *)
  508. echo "$enable_clocale is an unknown locale package" 1>&2
  509. exit 1
  510. @@ -4212,6 +4284,968 @@
  511. # GLIBCPP_CHECK_MATH_SUPPORT
  512. case "$target" in
  513. + *-uclibc*)
  514. + os_include_dir="os/uclibc"
  515. + for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
  516. + machine/endian.h machine/param.h sys/machine.h sys/types.h \
  517. + fp.h locale.h float.h inttypes.h
  518. +do
  519. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  520. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  521. +echo "configure:4224: checking for $ac_hdr" >&5
  522. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  523. + echo $ac_n "(cached) $ac_c" 1>&6
  524. +else
  525. + cat > conftest.$ac_ext <<EOF
  526. +#line 4229 "configure"
  527. +#include "confdefs.h"
  528. +#include <$ac_hdr>
  529. +EOF
  530. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  531. +{ (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  532. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  533. +if test -z "$ac_err"; then
  534. + rm -rf conftest*
  535. + eval "ac_cv_header_$ac_safe=yes"
  536. +else
  537. + echo "$ac_err" >&5
  538. + echo "configure: failed program was:" >&5
  539. + cat conftest.$ac_ext >&5
  540. + rm -rf conftest*
  541. + eval "ac_cv_header_$ac_safe=no"
  542. +fi
  543. +rm -f conftest*
  544. +fi
  545. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  546. + echo "$ac_t""yes" 1>&6
  547. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  548. + cat >> confdefs.h <<EOF
  549. +#define $ac_tr_hdr 1
  550. +EOF
  551. +
  552. +else
  553. + echo "$ac_t""no" 1>&6
  554. +fi
  555. +done
  556. +
  557. + SECTION_FLAGS='-ffunction-sections -fdata-sections'
  558. +
  559. +
  560. + # If we're not using GNU ld, then there's no point in even trying these
  561. + # tests. Check for that first. We should have already tested for gld
  562. + # by now (in libtool), but require it now just to be safe...
  563. + test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
  564. + test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
  565. +
  566. +
  567. + # The name set by libtool depends on the version of libtool. Shame on us
  568. + # for depending on an impl detail, but c'est la vie. Older versions used
  569. + # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
  570. + # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
  571. + # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
  572. + # set (hence we're using an older libtool), then set it.
  573. + if test x${with_gnu_ld+set} != xset; then
  574. + if test x${ac_cv_prog_gnu_ld+set} != xset; then
  575. + # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
  576. + with_gnu_ld=no
  577. + else
  578. + with_gnu_ld=$ac_cv_prog_gnu_ld
  579. + fi
  580. + fi
  581. +
  582. + # Start by getting the version number. I think the libtool test already
  583. + # does some of this, but throws away the result.
  584. +
  585. + ldver=`$LD --version 2>/dev/null | head -1 | \
  586. + sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  587. +
  588. + glibcpp_gnu_ld_version=`echo $ldver | \
  589. + $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
  590. +
  591. + # Set --gc-sections.
  592. + if test "$with_gnu_ld" = "notbroken"; then
  593. + # GNU ld it is! Joy and bunny rabbits!
  594. +
  595. + # All these tests are for C++; save the language and the compiler flags.
  596. + # Need to do this so that g++ won't try to link in libstdc++
  597. + ac_test_CFLAGS="${CFLAGS+set}"
  598. + ac_save_CFLAGS="$CFLAGS"
  599. + CFLAGS='-x c++ -Wl,--gc-sections'
  600. +
  601. + # Check for -Wl,--gc-sections
  602. + # XXX This test is broken at the moment, as symbols required for
  603. + # linking are now in libsupc++ (not built yet.....). In addition,
  604. + # this test has cored on solaris in the past. In addition,
  605. + # --gc-sections doesn't really work at the moment (keeps on discarding
  606. + # used sections, first .eh_frame and now some of the glibc sections for
  607. + # iconv). Bzzzzt. Thanks for playing, maybe next time.
  608. + echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
  609. +echo "configure:4312: checking for ld that supports -Wl,--gc-sections" >&5
  610. + if test "$cross_compiling" = yes; then
  611. + ac_sectionLDflags=yes
  612. +else
  613. + cat > conftest.$ac_ext <<EOF
  614. +#line 4317 "configure"
  615. +#include "confdefs.h"
  616. +
  617. + int main(void)
  618. + {
  619. + try { throw 1; }
  620. + catch (...) { };
  621. + return 0;
  622. + }
  623. +
  624. +EOF
  625. +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  626. +then
  627. + ac_sectionLDflags=yes
  628. +else
  629. + echo "configure: failed program was:" >&5
  630. + cat conftest.$ac_ext >&5
  631. + rm -fr conftest*
  632. + ac_sectionLDflags=no
  633. +fi
  634. +rm -fr conftest*
  635. +fi
  636. +
  637. + if test "$ac_test_CFLAGS" = set; then
  638. + CFLAGS="$ac_save_CFLAGS"
  639. + else
  640. + # this is the suspicious part
  641. + CFLAGS=''
  642. + fi
  643. + if test "$ac_sectionLDflags" = "yes"; then
  644. + SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
  645. + fi
  646. + echo "$ac_t""$ac_sectionLDflags" 1>&6
  647. + fi
  648. +
  649. + # Set linker optimization flags.
  650. + if test x"$with_gnu_ld" = x"yes"; then
  651. + OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
  652. + fi
  653. +
  654. +
  655. +
  656. +
  657. +
  658. + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
  659. +echo "configure:4362: checking for main in -lm" >&5
  660. +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  661. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  662. + echo $ac_n "(cached) $ac_c" 1>&6
  663. +else
  664. + ac_save_LIBS="$LIBS"
  665. +LIBS="-lm $LIBS"
  666. +cat > conftest.$ac_ext <<EOF
  667. +#line 4370 "configure"
  668. +#include "confdefs.h"
  669. +
  670. +int main() {
  671. +main()
  672. +; return 0; }
  673. +EOF
  674. +if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  675. + rm -rf conftest*
  676. + eval "ac_cv_lib_$ac_lib_var=yes"
  677. +else
  678. + echo "configure: failed program was:" >&5
  679. + cat conftest.$ac_ext >&5
  680. + rm -rf conftest*
  681. + eval "ac_cv_lib_$ac_lib_var=no"
  682. +fi
  683. +rm -f conftest*
  684. +LIBS="$ac_save_LIBS"
  685. +
  686. +fi
  687. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  688. + echo "$ac_t""yes" 1>&6
  689. + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  690. + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  691. + cat >> confdefs.h <<EOF
  692. +#define $ac_tr_lib 1
  693. +EOF
  694. +
  695. + LIBS="-lm $LIBS"
  696. +
  697. +else
  698. + echo "$ac_t""no" 1>&6
  699. +fi
  700. +
  701. + for ac_func in nan copysignf
  702. +do
  703. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  704. +echo "configure:4407: checking for $ac_func" >&5
  705. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  706. + echo $ac_n "(cached) $ac_c" 1>&6
  707. +else
  708. + cat > conftest.$ac_ext <<EOF
  709. +#line 4412 "configure"
  710. +#include "confdefs.h"
  711. +/* System header to define __stub macros and hopefully few prototypes,
  712. + which can conflict with char $ac_func(); below. */
  713. +#include <assert.h>
  714. +/* Override any gcc2 internal prototype to avoid an error. */
  715. +/* We use char because int might match the return type of a gcc2
  716. + builtin and then its argument prototype would still apply. */
  717. +char $ac_func();
  718. +
  719. +int main() {
  720. +
  721. +/* The GNU C library defines this for functions which it implements
  722. + to always fail with ENOSYS. Some functions are actually named
  723. + something starting with __ and the normal name is an alias. */
  724. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  725. +choke me
  726. +#else
  727. +$ac_func();
  728. +#endif
  729. +
  730. +; return 0; }
  731. +EOF
  732. +if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  733. + rm -rf conftest*
  734. + eval "ac_cv_func_$ac_func=yes"
  735. +else
  736. + echo "configure: failed program was:" >&5
  737. + cat conftest.$ac_ext >&5
  738. + rm -rf conftest*
  739. + eval "ac_cv_func_$ac_func=no"
  740. +fi
  741. +rm -f conftest*
  742. +fi
  743. +
  744. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  745. + echo "$ac_t""yes" 1>&6
  746. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  747. + cat >> confdefs.h <<EOF
  748. +#define $ac_tr_func 1
  749. +EOF
  750. +
  751. +else
  752. + echo "$ac_t""no" 1>&6
  753. +LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
  754. +fi
  755. +done
  756. +
  757. +
  758. + for ac_func in __signbit
  759. +do
  760. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  761. +echo "configure:4464: checking for $ac_func" >&5
  762. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  763. + echo $ac_n "(cached) $ac_c" 1>&6
  764. +else
  765. + cat > conftest.$ac_ext <<EOF
  766. +#line 4469 "configure"
  767. +#include "confdefs.h"
  768. +/* System header to define __stub macros and hopefully few prototypes,
  769. + which can conflict with char $ac_func(); below. */
  770. +#include <assert.h>
  771. +/* Override any gcc2 internal prototype to avoid an error. */
  772. +/* We use char because int might match the return type of a gcc2
  773. + builtin and then its argument prototype would still apply. */
  774. +char $ac_func();
  775. +
  776. +int main() {
  777. +
  778. +/* The GNU C library defines this for functions which it implements
  779. + to always fail with ENOSYS. Some functions are actually named
  780. + something starting with __ and the normal name is an alias. */
  781. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  782. +choke me
  783. +#else
  784. +$ac_func();
  785. +#endif
  786. +
  787. +; return 0; }
  788. +EOF
  789. +if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  790. + rm -rf conftest*
  791. + eval "ac_cv_func_$ac_func=yes"
  792. +else
  793. + echo "configure: failed program was:" >&5
  794. + cat conftest.$ac_ext >&5
  795. + rm -rf conftest*
  796. + eval "ac_cv_func_$ac_func=no"
  797. +fi
  798. +rm -f conftest*
  799. +fi
  800. +
  801. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  802. + echo "$ac_t""yes" 1>&6
  803. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  804. + cat >> confdefs.h <<EOF
  805. +#define $ac_tr_func 1
  806. +EOF
  807. +
  808. +else
  809. + echo "$ac_t""no" 1>&6
  810. +LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
  811. +fi
  812. +done
  813. +
  814. + for ac_func in __signbitf
  815. +do
  816. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  817. +echo "configure:4520: checking for $ac_func" >&5
  818. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  819. + echo $ac_n "(cached) $ac_c" 1>&6
  820. +else
  821. + cat > conftest.$ac_ext <<EOF
  822. +#line 4525 "configure"
  823. +#include "confdefs.h"
  824. +/* System header to define __stub macros and hopefully few prototypes,
  825. + which can conflict with char $ac_func(); below. */
  826. +#include <assert.h>
  827. +/* Override any gcc2 internal prototype to avoid an error. */
  828. +/* We use char because int might match the return type of a gcc2
  829. + builtin and then its argument prototype would still apply. */
  830. +char $ac_func();
  831. +
  832. +int main() {
  833. +
  834. +/* The GNU C library defines this for functions which it implements
  835. + to always fail with ENOSYS. Some functions are actually named
  836. + something starting with __ and the normal name is an alias. */
  837. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  838. +choke me
  839. +#else
  840. +$ac_func();
  841. +#endif
  842. +
  843. +; return 0; }
  844. +EOF
  845. +if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  846. + rm -rf conftest*
  847. + eval "ac_cv_func_$ac_func=yes"
  848. +else
  849. + echo "configure: failed program was:" >&5
  850. + cat conftest.$ac_ext >&5
  851. + rm -rf conftest*
  852. + eval "ac_cv_func_$ac_func=no"
  853. +fi
  854. +rm -f conftest*
  855. +fi
  856. +
  857. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  858. + echo "$ac_t""yes" 1>&6
  859. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  860. + cat >> confdefs.h <<EOF
  861. +#define $ac_tr_func 1
  862. +EOF
  863. +
  864. +else
  865. + echo "$ac_t""no" 1>&6
  866. +LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
  867. +fi
  868. +done
  869. +
  870. +
  871. + if test x$ac_cv_func_copysignl = x"yes"; then
  872. + for ac_func in __signbitl
  873. +do
  874. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  875. +echo "configure:4578: checking for $ac_func" >&5
  876. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  877. + echo $ac_n "(cached) $ac_c" 1>&6
  878. +else
  879. + cat > conftest.$ac_ext <<EOF
  880. +#line 4583 "configure"
  881. +#include "confdefs.h"
  882. +/* System header to define __stub macros and hopefully few prototypes,
  883. + which can conflict with char $ac_func(); below. */
  884. +#include <assert.h>
  885. +/* Override any gcc2 internal prototype to avoid an error. */
  886. +/* We use char because int might match the return type of a gcc2
  887. + builtin and then its argument prototype would still apply. */
  888. +char $ac_func();
  889. +
  890. +int main() {
  891. +
  892. +/* The GNU C library defines this for functions which it implements
  893. + to always fail with ENOSYS. Some functions are actually named
  894. + something starting with __ and the normal name is an alias. */
  895. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  896. +choke me
  897. +#else
  898. +$ac_func();
  899. +#endif
  900. +
  901. +; return 0; }
  902. +EOF
  903. +if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  904. + rm -rf conftest*
  905. + eval "ac_cv_func_$ac_func=yes"
  906. +else
  907. + echo "configure: failed program was:" >&5
  908. + cat conftest.$ac_ext >&5
  909. + rm -rf conftest*
  910. + eval "ac_cv_func_$ac_func=no"
  911. +fi
  912. +rm -f conftest*
  913. +fi
  914. +
  915. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  916. + echo "$ac_t""yes" 1>&6
  917. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  918. + cat >> confdefs.h <<EOF
  919. +#define $ac_tr_func 1
  920. +EOF
  921. +
  922. +else
  923. + echo "$ac_t""no" 1>&6
  924. +LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
  925. +fi
  926. +done
  927. +
  928. + fi
  929. +
  930. + if test -n "$LIBMATHOBJS"; then
  931. + need_libmath=yes
  932. + fi
  933. +
  934. +
  935. +
  936. +if test "$need_libmath" = yes; then
  937. + GLIBCPP_BUILD_LIBMATH_TRUE=
  938. + GLIBCPP_BUILD_LIBMATH_FALSE='#'
  939. +else
  940. + GLIBCPP_BUILD_LIBMATH_TRUE='#'
  941. + GLIBCPP_BUILD_LIBMATH_FALSE=
  942. +fi
  943. +
  944. +
  945. + enable_wchar_t=no
  946. +
  947. + echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
  948. +echo "configure:4651: checking for mbstate_t" >&5
  949. + cat > conftest.$ac_ext <<EOF
  950. +#line 4653 "configure"
  951. +#include "confdefs.h"
  952. +#include <wchar.h>
  953. +int main() {
  954. +mbstate_t teststate;
  955. +; return 0; }
  956. +EOF
  957. +if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  958. + rm -rf conftest*
  959. + have_mbstate_t=yes
  960. +else
  961. + echo "configure: failed program was:" >&5
  962. + cat conftest.$ac_ext >&5
  963. + rm -rf conftest*
  964. + have_mbstate_t=no
  965. +fi
  966. +rm -f conftest*
  967. + echo "$ac_t""$have_mbstate_t" 1>&6
  968. + if test x"$have_mbstate_t" = xyes; then
  969. + cat >> confdefs.h <<\EOF
  970. +#define HAVE_MBSTATE_T 1
  971. +EOF
  972. +
  973. + fi
  974. +
  975. + for ac_hdr in wchar.h
  976. +do
  977. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  978. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  979. +echo "configure:4682: checking for $ac_hdr" >&5
  980. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  981. + echo $ac_n "(cached) $ac_c" 1>&6
  982. +else
  983. + cat > conftest.$ac_ext <<EOF
  984. +#line 4687 "configure"
  985. +#include "confdefs.h"
  986. +#include <$ac_hdr>
  987. +EOF
  988. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  989. +{ (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  990. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  991. +if test -z "$ac_err"; then
  992. + rm -rf conftest*
  993. + eval "ac_cv_header_$ac_safe=yes"
  994. +else
  995. + echo "$ac_err" >&5
  996. + echo "configure: failed program was:" >&5
  997. + cat conftest.$ac_ext >&5
  998. + rm -rf conftest*
  999. + eval "ac_cv_header_$ac_safe=no"
  1000. +fi
  1001. +rm -f conftest*
  1002. +fi
  1003. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1004. + echo "$ac_t""yes" 1>&6
  1005. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1006. + cat >> confdefs.h <<EOF
  1007. +#define $ac_tr_hdr 1
  1008. +EOF
  1009. + ac_has_wchar_h=yes
  1010. +else
  1011. + echo "$ac_t""no" 1>&6
  1012. +ac_has_wchar_h=no
  1013. +fi
  1014. +done
  1015. +
  1016. + for ac_hdr in wctype.h
  1017. +do
  1018. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1019. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1020. +echo "configure:4723: checking for $ac_hdr" >&5
  1021. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1022. + echo $ac_n "(cached) $ac_c" 1>&6
  1023. +else
  1024. + cat > conftest.$ac_ext <<EOF
  1025. +#line 4728 "configure"
  1026. +#include "confdefs.h"
  1027. +#include <$ac_hdr>
  1028. +EOF
  1029. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1030. +{ (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1031. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1032. +if test -z "$ac_err"; then
  1033. + rm -rf conftest*
  1034. + eval "ac_cv_header_$ac_safe=yes"
  1035. +else
  1036. + echo "$ac_err" >&5
  1037. + echo "configure: failed program was:" >&5
  1038. + cat conftest.$ac_ext >&5
  1039. + rm -rf conftest*
  1040. + eval "ac_cv_header_$ac_safe=no"
  1041. +fi
  1042. +rm -f conftest*
  1043. +fi
  1044. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1045. + echo "$ac_t""yes" 1>&6
  1046. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1047. + cat >> confdefs.h <<EOF
  1048. +#define $ac_tr_hdr 1
  1049. +EOF
  1050. + ac_has_wctype_h=yes
  1051. +else
  1052. + echo "$ac_t""no" 1>&6
  1053. +ac_has_wctype_h=no
  1054. +fi
  1055. +done
  1056. +
  1057. +
  1058. + if test x"$ac_has_wchar_h" = xyes &&
  1059. + test x"$ac_has_wctype_h" = xyes &&
  1060. + test x"$enable_c_mbchar" != xno; then
  1061. +
  1062. + echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
  1063. +echo "configure:4766: checking for WCHAR_MIN and WCHAR_MAX" >&5
  1064. + cat > conftest.$ac_ext <<EOF
  1065. +#line 4768 "configure"
  1066. +#include "confdefs.h"
  1067. +#include <wchar.h>
  1068. +int main() {
  1069. +int i = WCHAR_MIN; int j = WCHAR_MAX;
  1070. +; return 0; }
  1071. +EOF
  1072. +if { (eval echo configure:4775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1073. + rm -rf conftest*
  1074. + has_wchar_minmax=yes
  1075. +else
  1076. + echo "configure: failed program was:" >&5
  1077. + cat conftest.$ac_ext >&5
  1078. + rm -rf conftest*
  1079. + has_wchar_minmax=no
  1080. +fi
  1081. +rm -f conftest*
  1082. + echo "$ac_t""$has_wchar_minmax" 1>&6
  1083. +
  1084. + echo $ac_n "checking for WEOF""... $ac_c" 1>&6
  1085. +echo "configure:4788: checking for WEOF" >&5
  1086. + cat > conftest.$ac_ext <<EOF
  1087. +#line 4790 "configure"
  1088. +#include "confdefs.h"
  1089. +
  1090. + #include <wchar.h>
  1091. + #include <stddef.h>
  1092. +int main() {
  1093. +wint_t i = WEOF;
  1094. +; return 0; }
  1095. +EOF
  1096. +if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1097. + rm -rf conftest*
  1098. + has_weof=yes
  1099. +else
  1100. + echo "configure: failed program was:" >&5
  1101. + cat conftest.$ac_ext >&5
  1102. + rm -rf conftest*
  1103. + has_weof=no
  1104. +fi
  1105. +rm -f conftest*
  1106. + echo "$ac_t""$has_weof" 1>&6
  1107. +
  1108. + ac_wfuncs=yes
  1109. + for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
  1110. +do
  1111. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1112. +echo "configure:4815: checking for $ac_func" >&5
  1113. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1114. + echo $ac_n "(cached) $ac_c" 1>&6
  1115. +else
  1116. + cat > conftest.$ac_ext <<EOF
  1117. +#line 4820 "configure"
  1118. +#include "confdefs.h"
  1119. +/* System header to define __stub macros and hopefully few prototypes,
  1120. + which can conflict with char $ac_func(); below. */
  1121. +#include <assert.h>
  1122. +/* Override any gcc2 internal prototype to avoid an error. */
  1123. +/* We use char because int might match the return type of a gcc2
  1124. + builtin and then its argument prototype would still apply. */
  1125. +char $ac_func();
  1126. +
  1127. +int main() {
  1128. +
  1129. +/* The GNU C library defines this for functions which it implements
  1130. + to always fail with ENOSYS. Some functions are actually named
  1131. + something starting with __ and the normal name is an alias. */
  1132. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1133. +choke me
  1134. +#else
  1135. +$ac_func();
  1136. +#endif
  1137. +
  1138. +; return 0; }
  1139. +EOF
  1140. +if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1141. + rm -rf conftest*
  1142. + eval "ac_cv_func_$ac_func=yes"
  1143. +else
  1144. + echo "configure: failed program was:" >&5
  1145. + cat conftest.$ac_ext >&5
  1146. + rm -rf conftest*
  1147. + eval "ac_cv_func_$ac_func=no"
  1148. +fi
  1149. +rm -f conftest*
  1150. +fi
  1151. +
  1152. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1153. + echo "$ac_t""yes" 1>&6
  1154. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1155. + cat >> confdefs.h <<EOF
  1156. +#define $ac_tr_func 1
  1157. +EOF
  1158. +
  1159. +else
  1160. + echo "$ac_t""no" 1>&6
  1161. +\
  1162. + ac_wfuncs=no
  1163. +fi
  1164. +done
  1165. +
  1166. +
  1167. + for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
  1168. + fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
  1169. + vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
  1170. + mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
  1171. + wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
  1172. + wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
  1173. +do
  1174. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1175. +echo "configure:4878: checking for $ac_func" >&5
  1176. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1177. + echo $ac_n "(cached) $ac_c" 1>&6
  1178. +else
  1179. + cat > conftest.$ac_ext <<EOF
  1180. +#line 4883 "configure"
  1181. +#include "confdefs.h"
  1182. +/* System header to define __stub macros and hopefully few prototypes,
  1183. + which can conflict with char $ac_func(); below. */
  1184. +#include <assert.h>
  1185. +/* Override any gcc2 internal prototype to avoid an error. */
  1186. +/* We use char because int might match the return type of a gcc2
  1187. + builtin and then its argument prototype would still apply. */
  1188. +char $ac_func();
  1189. +
  1190. +int main() {
  1191. +
  1192. +/* The GNU C library defines this for functions which it implements
  1193. + to always fail with ENOSYS. Some functions are actually named
  1194. + something starting with __ and the normal name is an alias. */
  1195. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1196. +choke me
  1197. +#else
  1198. +$ac_func();
  1199. +#endif
  1200. +
  1201. +; return 0; }
  1202. +EOF
  1203. +if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1204. + rm -rf conftest*
  1205. + eval "ac_cv_func_$ac_func=yes"
  1206. +else
  1207. + echo "configure: failed program was:" >&5
  1208. + cat conftest.$ac_ext >&5
  1209. + rm -rf conftest*
  1210. + eval "ac_cv_func_$ac_func=no"
  1211. +fi
  1212. +rm -f conftest*
  1213. +fi
  1214. +
  1215. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1216. + echo "$ac_t""yes" 1>&6
  1217. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1218. + cat >> confdefs.h <<EOF
  1219. +#define $ac_tr_func 1
  1220. +EOF
  1221. +
  1222. +else
  1223. + echo "$ac_t""no" 1>&6
  1224. +\
  1225. + ac_wfuncs=no
  1226. +fi
  1227. +done
  1228. +
  1229. +
  1230. + echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
  1231. +echo "configure:4934: checking for ISO C99 wchar_t support" >&5
  1232. + if test x"$has_weof" = xyes &&
  1233. + test x"$has_wchar_minmax" = xyes &&
  1234. + test x"$ac_wfuncs" = xyes; then
  1235. + ac_isoC99_wchar_t=yes
  1236. + else
  1237. + ac_isoC99_wchar_t=no
  1238. + fi
  1239. + echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
  1240. +
  1241. + ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
  1242. +echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
  1243. +echo "configure:4946: checking for iconv.h" >&5
  1244. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1245. + echo $ac_n "(cached) $ac_c" 1>&6
  1246. +else
  1247. + cat > conftest.$ac_ext <<EOF
  1248. +#line 4951 "configure"
  1249. +#include "confdefs.h"
  1250. +#include <iconv.h>
  1251. +EOF
  1252. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1253. +{ (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1254. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1255. +if test -z "$ac_err"; then
  1256. + rm -rf conftest*
  1257. + eval "ac_cv_header_$ac_safe=yes"
  1258. +else
  1259. + echo "$ac_err" >&5
  1260. + echo "configure: failed program was:" >&5
  1261. + cat conftest.$ac_ext >&5
  1262. + rm -rf conftest*
  1263. + eval "ac_cv_header_$ac_safe=no"
  1264. +fi
  1265. +rm -f conftest*
  1266. +fi
  1267. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1268. + echo "$ac_t""yes" 1>&6
  1269. + ac_has_iconv_h=yes
  1270. +else
  1271. + echo "$ac_t""no" 1>&6
  1272. +ac_has_iconv_h=no
  1273. +fi
  1274. +
  1275. + ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  1276. +echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
  1277. +echo "configure:4980: checking for langinfo.h" >&5
  1278. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1279. + echo $ac_n "(cached) $ac_c" 1>&6
  1280. +else
  1281. + cat > conftest.$ac_ext <<EOF
  1282. +#line 4985 "configure"
  1283. +#include "confdefs.h"
  1284. +#include <langinfo.h>
  1285. +EOF
  1286. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1287. +{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1288. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1289. +if test -z "$ac_err"; then
  1290. + rm -rf conftest*
  1291. + eval "ac_cv_header_$ac_safe=yes"
  1292. +else
  1293. + echo "$ac_err" >&5
  1294. + echo "configure: failed program was:" >&5
  1295. + cat conftest.$ac_ext >&5
  1296. + rm -rf conftest*
  1297. + eval "ac_cv_header_$ac_safe=no"
  1298. +fi
  1299. +rm -f conftest*
  1300. +fi
  1301. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1302. + echo "$ac_t""yes" 1>&6
  1303. + ac_has_langinfo_h=yes
  1304. +else
  1305. + echo "$ac_t""no" 1>&6
  1306. +ac_has_langinfo_h=no
  1307. +fi
  1308. +
  1309. +
  1310. + echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  1311. +echo "configure:5014: checking for iconv in -liconv" >&5
  1312. +ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  1313. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1314. + echo $ac_n "(cached) $ac_c" 1>&6
  1315. +else
  1316. + ac_save_LIBS="$LIBS"
  1317. +LIBS="-liconv $LIBS"
  1318. +cat > conftest.$ac_ext <<EOF
  1319. +#line 5022 "configure"
  1320. +#include "confdefs.h"
  1321. +/* Override any gcc2 internal prototype to avoid an error. */
  1322. +/* We use char because int might match the return type of a gcc2
  1323. + builtin and then its argument prototype would still apply. */
  1324. +char iconv();
  1325. +
  1326. +int main() {
  1327. +iconv()
  1328. +; return 0; }
  1329. +EOF
  1330. +if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1331. + rm -rf conftest*
  1332. + eval "ac_cv_lib_$ac_lib_var=yes"
  1333. +else
  1334. + echo "configure: failed program was:" >&5
  1335. + cat conftest.$ac_ext >&5
  1336. + rm -rf conftest*
  1337. + eval "ac_cv_lib_$ac_lib_var=no"
  1338. +fi
  1339. +rm -f conftest*
  1340. +LIBS="$ac_save_LIBS"
  1341. +
  1342. +fi
  1343. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1344. + echo "$ac_t""yes" 1>&6
  1345. + libiconv="-liconv"
  1346. +else
  1347. + echo "$ac_t""no" 1>&6
  1348. +fi
  1349. +
  1350. + ac_save_LIBS="$LIBS"
  1351. + LIBS="$LIBS $libiconv"
  1352. +
  1353. + for ac_func in iconv_open iconv_close iconv nl_langinfo
  1354. +do
  1355. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1356. +echo "configure:5059: checking for $ac_func" >&5
  1357. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1358. + echo $ac_n "(cached) $ac_c" 1>&6
  1359. +else
  1360. + cat > conftest.$ac_ext <<EOF
  1361. +#line 5064 "configure"
  1362. +#include "confdefs.h"
  1363. +/* System header to define __stub macros and hopefully few prototypes,
  1364. + which can conflict with char $ac_func(); below. */
  1365. +#include <assert.h>
  1366. +/* Override any gcc2 internal prototype to avoid an error. */
  1367. +/* We use char because int might match the return type of a gcc2
  1368. + builtin and then its argument prototype would still apply. */
  1369. +char $ac_func();
  1370. +
  1371. +int main() {
  1372. +
  1373. +/* The GNU C library defines this for functions which it implements
  1374. + to always fail with ENOSYS. Some functions are actually named
  1375. + something starting with __ and the normal name is an alias. */
  1376. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1377. +choke me
  1378. +#else
  1379. +$ac_func();
  1380. +#endif
  1381. +
  1382. +; return 0; }
  1383. +EOF
  1384. +if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1385. + rm -rf conftest*
  1386. + eval "ac_cv_func_$ac_func=yes"
  1387. +else
  1388. + echo "configure: failed program was:" >&5
  1389. + cat conftest.$ac_ext >&5
  1390. + rm -rf conftest*
  1391. + eval "ac_cv_func_$ac_func=no"
  1392. +fi
  1393. +rm -f conftest*
  1394. +fi
  1395. +
  1396. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1397. + echo "$ac_t""yes" 1>&6
  1398. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1399. + cat >> confdefs.h <<EOF
  1400. +#define $ac_tr_func 1
  1401. +EOF
  1402. + \
  1403. + ac_XPG2funcs=yes
  1404. +else
  1405. + echo "$ac_t""no" 1>&6
  1406. +ac_XPG2funcs=no
  1407. +fi
  1408. +done
  1409. +
  1410. +
  1411. + LIBS="$ac_save_LIBS"
  1412. +
  1413. + echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
  1414. +echo "configure:5117: checking for XPG2 wchar_t support" >&5
  1415. + if test x"$ac_has_iconv_h" = xyes &&
  1416. + test x"$ac_has_langinfo_h" = xyes &&
  1417. + test x"$ac_XPG2funcs" = xyes; then
  1418. + ac_XPG2_wchar_t=yes
  1419. + else
  1420. + ac_XPG2_wchar_t=no
  1421. + fi
  1422. + echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
  1423. +
  1424. + if test x"$ac_isoC99_wchar_t" = xyes &&
  1425. + test x"$ac_XPG2_wchar_t" = xyes; then
  1426. + cat >> confdefs.h <<\EOF
  1427. +#define _GLIBCPP_USE_WCHAR_T 1
  1428. +EOF
  1429. +
  1430. + enable_wchar_t=yes
  1431. + fi
  1432. + fi
  1433. + echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
  1434. +echo "configure:5137: checking for enabled wchar_t specializations" >&5
  1435. + echo "$ac_t""$enable_wchar_t" 1>&6
  1436. +
  1437. +
  1438. +if test "$enable_wchar_t" = yes; then
  1439. + GLIBCPP_TEST_WCHAR_T_TRUE=
  1440. + GLIBCPP_TEST_WCHAR_T_FALSE='#'
  1441. +else
  1442. + GLIBCPP_TEST_WCHAR_T_TRUE='#'
  1443. + GLIBCPP_TEST_WCHAR_T_FALSE=
  1444. +fi
  1445. +
  1446. +
  1447. + cat >> confdefs.h <<\EOF
  1448. +#define HAVE_COPYSIGN 1
  1449. +EOF
  1450. +
  1451. + cat >> confdefs.h <<\EOF
  1452. +#define HAVE_FINITE 1
  1453. +EOF
  1454. +
  1455. + cat >> confdefs.h <<\EOF
  1456. +#define HAVE_FINITEF 1
  1457. +EOF
  1458. +
  1459. + cat >> confdefs.h <<\EOF
  1460. +#define HAVE_ISINF 1
  1461. +EOF
  1462. +
  1463. + cat >> confdefs.h <<\EOF
  1464. +#define HAVE_ISINFF 1
  1465. +EOF
  1466. +
  1467. + cat >> confdefs.h <<\EOF
  1468. +#define HAVE_ISNAN 1
  1469. +EOF
  1470. +
  1471. + cat >> confdefs.h <<\EOF
  1472. +#define HAVE_ISNANF 1
  1473. +EOF
  1474. + ;;
  1475. *-linux*)
  1476. os_include_dir="os/gnu-linux"
  1477. for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
  1478. diff -urN gcc-3.3.3-dist/libstdc++-v3/configure.in gcc-3.3.3/libstdc++-v3/configure.in
  1479. --- gcc-3.3.3-dist/libstdc++-v3/configure.in 2004-01-12 10:19:22.000000000 -0600
  1480. +++ gcc-3.3.3/libstdc++-v3/configure.in 2004-08-12 04:47:51.000000000 -0500
  1481. @@ -117,6 +117,36 @@
  1482. # GLIBCPP_CHECK_MATH_SUPPORT
  1483. case "$target" in
  1484. + *-uclibc*)
  1485. + os_include_dir="os/uclibc"
  1486. + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1487. + machine/endian.h machine/param.h sys/machine.h sys/types.h \
  1488. + fp.h locale.h float.h inttypes.h])
  1489. + SECTION_FLAGS='-ffunction-sections -fdata-sections'
  1490. + AC_SUBST(SECTION_FLAGS)
  1491. + GLIBCPP_CHECK_LINKER_FEATURES
  1492. + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
  1493. + GLIBCPP_CHECK_WCHAR_T_SUPPORT
  1494. +
  1495. + AC_DEFINE(HAVE_COPYSIGN)
  1496. + #AC_DEFINE(HAVE_COPYSIGNF)
  1497. + AC_DEFINE(HAVE_FINITE)
  1498. + AC_DEFINE(HAVE_FINITEF)
  1499. + #AC_DEFINE(HAVE_FREXPF)
  1500. + #AC_DEFINE(HAVE_HYPOTF)
  1501. + AC_DEFINE(HAVE_ISINF)
  1502. + AC_DEFINE(HAVE_ISINFF)
  1503. + AC_DEFINE(HAVE_ISNAN)
  1504. + AC_DEFINE(HAVE_ISNANF)
  1505. + #AC_DEFINE(HAVE_SINCOS)
  1506. + #AC_DEFINE(HAVE_SINCOSF)
  1507. + #if test x"long_double_math_on_this_cpu" = x"yes"; then
  1508. + #AC_DEFINE(HAVE_FINITEL)
  1509. + #AC_DEFINE(HAVE_HYPOTL)
  1510. + #AC_DEFINE(HAVE_ISINFL)
  1511. + #AC_DEFINE(HAVE_ISNANL)
  1512. + #fi
  1513. + ;;
  1514. *-linux*)
  1515. os_include_dir="os/gnu-linux"
  1516. AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1517. diff -urN gcc-3.3.3-dist/libstdc++-v3/configure.target gcc-3.3.3/libstdc++-v3/configure.target
  1518. --- gcc-3.3.3-dist/libstdc++-v3/configure.target 2003-10-01 14:07:07.000000000 -0500
  1519. +++ gcc-3.3.3/libstdc++-v3/configure.target 2004-08-12 04:47:51.000000000 -0500
  1520. @@ -133,6 +133,9 @@
  1521. freebsd*)
  1522. os_include_dir="os/bsd/freebsd"
  1523. ;;
  1524. + linux-uclibc*)
  1525. + os_include_dir="os/uclibc"
  1526. + ;;
  1527. gnu* | linux*)
  1528. os_include_dir="os/gnu-linux"
  1529. ;;
  1530. diff -urN gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h
  1531. --- gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
  1532. +++ gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h 2004-08-12 04:47:51.000000000 -0500
  1533. @@ -101,9 +101,11 @@
  1534. using ::labs;
  1535. using ::ldiv;
  1536. using ::malloc;
  1537. +#if _GLIBCPP_USE_WCHAR_T
  1538. using ::mblen;
  1539. using ::mbstowcs;
  1540. using ::mbtowc;
  1541. +#endif
  1542. using ::qsort;
  1543. using ::rand;
  1544. using ::realloc;
  1545. @@ -112,8 +114,10 @@
  1546. using ::strtol;
  1547. using ::strtoul;
  1548. using ::system;
  1549. +#if _GLIBCPP_USE_WCHAR_T
  1550. using ::wcstombs;
  1551. using ::wctomb;
  1552. +#endif
  1553. inline long
  1554. abs(long __i) { return labs(__i); }
  1555. diff -urN gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h
  1556. --- gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
  1557. +++ gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h 2004-08-12 04:47:51.000000000 -0500
  1558. @@ -165,7 +165,9 @@
  1559. using ::wcscoll;
  1560. using ::wcscpy;
  1561. using ::wcscspn;
  1562. +#ifdef HAVE_WCSFTIME
  1563. using ::wcsftime;
  1564. +#endif
  1565. using ::wcslen;
  1566. using ::wcsncat;
  1567. using ::wcsncmp;
  1568. diff -urN gcc-3.3.3-dist/libtool.m4 gcc-3.3.3/libtool.m4
  1569. --- gcc-3.3.3-dist/libtool.m4 2003-09-09 03:04:17.000000000 -0500
  1570. +++ gcc-3.3.3/libtool.m4 2004-08-12 04:47:51.000000000 -0500
  1571. @@ -687,6 +687,11 @@
  1572. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  1573. ;;
  1574. +linux-uclibc*)
  1575. + lt_cv_deplibs_check_method=pass_all
  1576. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  1577. + ;;
  1578. +
  1579. netbsd*)
  1580. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  1581. [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
  1582. diff -urN gcc-3.3.3-dist/ltconfig gcc-3.3.3/ltconfig
  1583. --- gcc-3.3.3-dist/ltconfig 2003-02-19 20:10:02.000000000 -0600
  1584. +++ gcc-3.3.3/ltconfig 2004-08-12 04:47:51.000000000 -0500
  1585. @@ -603,6 +603,7 @@
  1586. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  1587. case $host_os in
  1588. linux-gnu*) ;;
  1589. +linux-uclibc*) ;;
  1590. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  1591. esac
  1592. @@ -1247,6 +1248,24 @@
  1593. dynamic_linker='GNU/Linux ld.so'
  1594. ;;
  1595. +linux-uclibc*)
  1596. + version_type=linux
  1597. + need_lib_prefix=no
  1598. + need_version=no
  1599. + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1600. + soname_spec='${libname}${release}.so$major'
  1601. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1602. + shlibpath_var=LD_LIBRARY_PATH
  1603. + shlibpath_overrides_runpath=no
  1604. + # This implies no fast_install, which is unacceptable.
  1605. + # Some rework will be needed to allow for fast_install
  1606. + # before this can be enabled.
  1607. + # Note: copied from linux-gnu, and may not be appropriate.
  1608. + hardcode_into_libs=yes
  1609. + # Assume using the uClibc dynamic linker.
  1610. + dynamic_linker="uClibc ld.so"
  1611. + ;;
  1612. +
  1613. netbsd*)
  1614. need_lib_prefix=no
  1615. need_version=no