100-uclibc-conf.patch 50 KB

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