100-uclibc-conf.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. --- gcc-4.0.2/gcc/config/t-linux-uclibc
  2. +++ gcc-4.0.2/gcc/config/t-linux-uclibc
  3. @@ -0,0 +1,5 @@
  4. +# Remove glibc specific files added in t-linux
  5. +SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
  6. +
  7. +# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  8. +LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  9. --- gcc-4.0.2/gcc/config.gcc
  10. +++ gcc-4.0.2/gcc/config.gcc
  11. @@ -1778,7 +1778,7 @@
  12. ;;
  13. sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
  14. sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
  15. - sh-*-linux* | sh[346lbe]*-*-linux* | \
  16. + sh*-*-linux* | sh[346lbe]*-*-linux* | \
  17. sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
  18. sh64-*-netbsd* | sh64l*-*-netbsd*)
  19. tmake_file="${tmake_file} sh/t-sh sh/t-elf"
  20. @@ -2234,10 +2234,16 @@
  21. *)
  22. echo "*** Configuration ${target} not supported" 1>&2
  23. exit 1
  24. ;;
  25. esac
  26. +
  27. +# Rather than hook into each target, just do it after all the linux
  28. +# targets have been processed
  29. +case ${target} in
  30. +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  31. +esac
  32. case ${target} in
  33. i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
  34. tmake_file="${tmake_file} i386/t-gmm_malloc"
  35. ;;
  36. --- gcc-4.0.2/gcc/config/alpha/linux-elf.h
  37. +++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
  38. @@ -27,7 +27,11 @@
  39. #define SUBTARGET_EXTRA_SPECS \
  40. { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  41. +#ifdef USE_UCLIBC
  42. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  43. +#else
  44. #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  45. +#endif
  46. #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
  47. %{O*:-O3} %{!O*:-O1} \
  48. --- gcc-4.0.2/gcc/config/arm/linux-elf.h
  49. +++ gcc-4.0.2/gcc/config/arm/linux-elf.h
  50. @@ -81,14 +81,19 @@
  51. #define ENDFILE_SPEC \
  52. "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  53. +#ifdef USE_UCLIBC
  54. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  55. +#else
  56. +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  57. +#endif
  58. #undef LINK_SPEC
  59. #define LINK_SPEC "%{h*} %{version:-v} \
  60. %{b} %{Wl,*:%*} \
  61. %{static:-Bstatic} \
  62. %{shared:-shared} \
  63. %{symbolic:-Bsymbolic} \
  64. %{rdynamic:-export-dynamic} \
  65. - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  66. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  67. -X \
  68. %{mbig-endian:-EB}" \
  69. SUBTARGET_EXTRA_LINK_SPEC
  70. --- gcc-4.0.2/gcc/config/cris/linux.h
  71. +++ gcc-4.0.2/gcc/config/cris/linux.h
  72. @@ -79,6 +79,25 @@
  73. #undef CRIS_DEFAULT_CPU_VERSION
  74. #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  75. +#ifdef USE_UCLIBC
  76. +
  77. +#undef CRIS_SUBTARGET_VERSION
  78. +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  79. +
  80. +#undef CRIS_LINK_SUBTARGET_SPEC
  81. +#define CRIS_LINK_SUBTARGET_SPEC \
  82. + "-mcrislinux\
  83. + -rpath-link include/asm/../..%s\
  84. + %{shared} %{static}\
  85. + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  86. + %{!shared: \
  87. + %{!static: \
  88. + %{rdynamic:-export-dynamic} \
  89. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  90. + %{!r:%{O2|O3: --gc-sections}}"
  91. +
  92. +#else /* USE_UCLIBC */
  93. +
  94. #undef CRIS_SUBTARGET_VERSION
  95. #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  96. @@ -93,6 +112,8 @@
  97. %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
  98. %{!r:%{O2|O3: --gc-sections}}"
  99. +#endif /* USE_UCLIBC */
  100. +
  101. /* Node: Run-time Target */
  102. --- gcc-4.0.2/gcc/config/i386/linux.h
  103. +++ gcc-4.0.2/gcc/config/i386/linux.h
  104. @@ -107,6 +107,11 @@
  105. #define LINK_EMULATION "elf_i386"
  106. #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
  107. +#ifdef USE_UCLIBC
  108. +#undef DYNAMIC_LINKER
  109. +#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  110. +#endif
  111. +
  112. #undef SUBTARGET_EXTRA_SPECS
  113. #define SUBTARGET_EXTRA_SPECS \
  114. { "link_emulation", LINK_EMULATION },\
  115. --- gcc-4.0.2/gcc/config/i386/linux64.h
  116. +++ gcc-4.0.2/gcc/config/i386/linux64.h
  117. @@ -54,14 +54,21 @@
  118. When the -shared link option is used a final link is not being
  119. done. */
  120. +#ifdef USE_UCLIBC
  121. +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  122. +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
  123. +#else
  124. +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  125. +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
  126. +#endif
  127. #undef LINK_SPEC
  128. #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
  129. %{shared:-shared} \
  130. %{!shared: \
  131. %{!static: \
  132. %{rdynamic:-export-dynamic} \
  133. - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  134. - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
  135. + %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
  136. + %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
  137. %{static:-static}}"
  138. #define MULTILIB_DEFAULTS { "m64" }
  139. --- gcc-4.0.2/gcc/config/ia64/linux.h
  140. +++ gcc-4.0.2/gcc/config/ia64/linux.h
  141. @@ -37,13 +37,18 @@
  142. /* Define this for shared library support because it isn't in the main
  143. linux.h file. */
  144. +#ifdef USE_UCLIBC
  145. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  146. +#else
  147. +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
  148. +#endif
  149. #undef LINK_SPEC
  150. #define LINK_SPEC "\
  151. %{shared:-shared} \
  152. %{!shared: \
  153. %{!static: \
  154. %{rdynamic:-export-dynamic} \
  155. - %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
  156. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  157. %{static:-static}}"
  158. --- gcc-4.0.2/gcc/config/m68k/linux.h
  159. +++ gcc-4.0.2/gcc/config/m68k/linux.h
  160. @@ -127,12 +127,17 @@
  161. /* If ELF is the default format, we should not use /lib/elf. */
  162. +#ifdef USE_UCLIBC
  163. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  164. +#else
  165. +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
  166. +#endif
  167. #undef LINK_SPEC
  168. #define LINK_SPEC "-m m68kelf %{shared} \
  169. %{!shared: \
  170. %{!static: \
  171. %{rdynamic:-export-dynamic} \
  172. - %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
  173. + %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  174. %{static}}"
  175. /* For compatibility with linux/a.out */
  176. --- gcc-4.0.2/gcc/config/mips/linux.h
  177. +++ gcc-4.0.2/gcc/config/mips/linux.h
  178. @@ -108,14 +108,19 @@
  179. /* Borrowed from sparc/linux.h */
  180. #undef LINK_SPEC
  181. +#ifdef USE_UCLIBC
  182. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  183. +#else
  184. +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
  185. +#endif
  186. #define LINK_SPEC \
  187. "%(endian_spec) \
  188. %{shared:-shared} \
  189. %{!shared: \
  190. %{!ibcs: \
  191. %{!static: \
  192. %{rdynamic:-export-dynamic} \
  193. - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
  194. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  195. %{static:-static}}}"
  196. #undef SUBTARGET_ASM_SPEC
  197. --- gcc-4.0.2/gcc/config/pa/pa-linux.h
  198. +++ gcc-4.0.2/gcc/config/pa/pa-linux.h
  199. @@ -82,13 +82,18 @@
  200. /* Define this for shared library support because it isn't in the main
  201. linux.h file. */
  202. +#ifdef USE_UCLIBC
  203. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  204. +#else
  205. +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
  206. +#endif
  207. #undef LINK_SPEC
  208. #define LINK_SPEC "\
  209. %{shared:-shared} \
  210. %{!shared: \
  211. %{!static: \
  212. %{rdynamic:-export-dynamic} \
  213. - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
  214. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  215. %{static:-static}}"
  216. /* glibc's profiling functions don't need gcc to allocate counters. */
  217. --- gcc-4.0.2/gcc/config/rs6000/linux.h
  218. +++ gcc-4.0.2/gcc/config/rs6000/linux.h
  219. @@ -69,7 +69,11 @@
  220. #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
  221. #undef LINK_OS_DEFAULT_SPEC
  222. +#ifdef USE_UCLIBC
  223. +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
  224. +#else
  225. #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
  226. +#endif
  227. #define LINK_GCC_C_SEQUENCE_SPEC \
  228. "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
  229. --- gcc-4.0.2/gcc/config/rs6000/sysv4.h
  230. +++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
  231. @@ -949,6 +949,7 @@
  232. mcall-linux : %(link_os_linux) ; \
  233. mcall-gnu : %(link_os_gnu) ; \
  234. mcall-netbsd : %(link_os_netbsd) ; \
  235. + mcall-linux-uclibc : %(link_os_linux_uclibc); \
  236. mcall-openbsd: %(link_os_openbsd) ; \
  237. : %(link_os_default) }"
  238. @@ -1127,6 +1128,10 @@
  239. %{rdynamic:-export-dynamic} \
  240. %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
  241. +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
  242. + %{rdynamic:-export-dynamic} \
  243. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
  244. +
  245. #if defined(HAVE_LD_EH_FRAME_HDR)
  246. # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
  247. #endif
  248. @@ -1293,6 +1298,7 @@
  249. { "link_os_sim", LINK_OS_SIM_SPEC }, \
  250. { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
  251. { "link_os_linux", LINK_OS_LINUX_SPEC }, \
  252. + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
  253. { "link_os_gnu", LINK_OS_GNU_SPEC }, \
  254. { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
  255. { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
  256. --- gcc-4.0.2/gcc/config/s390/linux.h
  257. +++ gcc-4.0.2/gcc/config/s390/linux.h
  258. @@ -77,6 +77,13 @@
  259. #define MULTILIB_DEFAULTS { "m31" }
  260. #endif
  261. +#ifdef USE_UCLIBC
  262. +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  263. +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
  264. +#else
  265. +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
  266. +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
  267. +#endif
  268. #undef LINK_SPEC
  269. #define LINK_SPEC \
  270. "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
  271. @@ -86,8 +93,8 @@
  272. %{!static: \
  273. %{rdynamic:-export-dynamic} \
  274. %{!dynamic-linker: \
  275. - %{m31:-dynamic-linker /lib/ld.so.1} \
  276. - %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
  277. + %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
  278. + %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
  279. #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
  280. --- gcc-4.0.2/gcc/config/sh/linux.h
  281. +++ gcc-4.0.2/gcc/config/sh/linux.h
  282. @@ -67,11 +67,16 @@
  283. #undef SUBTARGET_LINK_EMUL_SUFFIX
  284. #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
  285. #undef SUBTARGET_LINK_SPEC
  286. +#ifdef USE_UCLIBC
  287. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  288. +#else
  289. +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  290. +#endif
  291. #define SUBTARGET_LINK_SPEC \
  292. "%{shared:-shared} \
  293. %{!static: \
  294. %{rdynamic:-export-dynamic} \
  295. - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  296. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  297. %{static:-static}"
  298. #undef LIB_SPEC
  299. --- gcc-4.0.2/gcc/config/sparc/linux.h
  300. +++ gcc-4.0.2/gcc/config/sparc/linux.h
  301. @@ -130,14 +130,19 @@
  302. /* If ELF is the default format, we should not use /lib/elf. */
  303. +#ifdef USE_UCLIBC
  304. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  305. +#else
  306. +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  307. +#endif
  308. #undef LINK_SPEC
  309. #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
  310. %{!mno-relax:%{!r:-relax}} \
  311. %{!shared: \
  312. %{!ibcs: \
  313. %{!static: \
  314. %{rdynamic:-export-dynamic} \
  315. - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  316. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  317. %{static:-static}}}"
  318. /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
  319. --- gcc-4.0.2/gcc/config/sparc/linux64.h
  320. +++ gcc-4.0.2/gcc/config/sparc/linux64.h
  321. @@ -167,12 +166,17 @@
  322. { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
  323. { "link_arch", LINK_ARCH_SPEC },
  324. +#ifdef USE_UCLIBC
  325. +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  326. +#else
  327. +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  328. +#endif
  329. #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
  330. %{!shared: \
  331. %{!ibcs: \
  332. %{!static: \
  333. %{rdynamic:-export-dynamic} \
  334. - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  335. + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
  336. %{static:-static}}} \
  337. "
  338. --- gcc-4.0.2/libtool.m4
  339. +++ gcc-4.0.2/libtool.m4
  340. @@ -682,6 +682,11 @@
  341. lt_cv_deplibs_check_method=pass_all
  342. ;;
  343. +linux-uclibc*)
  344. + lt_cv_deplibs_check_method=pass_all
  345. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  346. + ;;
  347. +
  348. netbsd* | knetbsd*-gnu)
  349. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  350. [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
  351. --- gcc-4.0.2/ltconfig
  352. +++ gcc-4.0.2/ltconfig
  353. @@ -603,6 +603,7 @@
  354. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  355. case $host_os in
  356. +linux-uclibc*) ;;
  357. linux-gnu*) ;;
  358. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  359. esac
  360. @@ -1274,6 +1275,23 @@
  361. dynamic_linker='GNU/Linux ld.so'
  362. ;;
  363. +linux-uclibc*)
  364. + version_type=linux
  365. + need_lib_prefix=no
  366. + need_version=no
  367. + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  368. + soname_spec='${libname}${release}.so$major'
  369. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  370. + shlibpath_var=LD_LIBRARY_PATH
  371. + shlibpath_overrides_runpath=no
  372. + # This implies no fast_install, which is unacceptable.
  373. + # Some rework will be needed to allow for fast_install
  374. + # before this can be enabled.
  375. + hardcode_into_libs=yes
  376. + # Assume using the uClibc dynamic linker.
  377. + dynamic_linker="uClibc ld.so"
  378. + ;;
  379. +
  380. netbsd*)
  381. need_lib_prefix=no
  382. need_version=no
  383. --- gcc-4.0.2/libffi/configure
  384. +++ gcc-4.0.2/libffi/configure
  385. @@ -3457,6 +3457,11 @@
  386. lt_cv_deplibs_check_method=pass_all
  387. ;;
  388. +linux-uclibc*)
  389. + lt_cv_deplibs_check_method=pass_all
  390. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  391. + ;;
  392. +
  393. netbsd* | knetbsd*-gnu)
  394. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  395. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  396. --- gcc-4.0.2/libgfortran/configure
  397. +++ gcc-4.0.2/libgfortran/configure
  398. @@ -3681,6 +3681,11 @@
  399. lt_cv_deplibs_check_method=pass_all
  400. ;;
  401. +linux-uclibc*)
  402. + lt_cv_deplibs_check_method=pass_all
  403. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  404. + ;;
  405. +
  406. netbsd* | knetbsd*-gnu)
  407. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  408. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  409. --- gcc-4.0.2/libjava/configure
  410. +++ gcc-4.0.2/libjava/configure
  411. @@ -4351,6 +4351,11 @@
  412. lt_cv_deplibs_check_method=pass_all
  413. ;;
  414. +linux-uclibc*)
  415. + lt_cv_deplibs_check_method=pass_all
  416. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  417. + ;;
  418. +
  419. netbsd* | knetbsd*-gnu)
  420. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  421. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  422. --- gcc-4.0.2/libmudflap/configure
  423. +++ gcc-4.0.2/libmudflap/configure
  424. @@ -5380,6 +5380,11 @@
  425. lt_cv_deplibs_check_method=pass_all
  426. ;;
  427. +linux-uclibc*)
  428. + lt_cv_deplibs_check_method=pass_all
  429. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  430. + ;;
  431. +
  432. netbsd* | knetbsd*-gnu)
  433. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  434. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  435. --- gcc-4.0.2/libobjc/configure
  436. +++ gcc-4.0.2/libobjc/configure
  437. @@ -3283,6 +3283,11 @@
  438. lt_cv_deplibs_check_method=pass_all
  439. ;;
  440. +linux-uclibc*)
  441. + lt_cv_deplibs_check_method=pass_all
  442. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  443. + ;;
  444. +
  445. netbsd* | knetbsd*-gnu)
  446. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  447. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  448. --- gcc-4.0.2/boehm-gc/configure
  449. +++ gcc-4.0.2/boehm-gc/configure
  450. @@ -4320,6 +4320,11 @@
  451. lt_cv_deplibs_check_method=pass_all
  452. ;;
  453. +linux-uclibc*)
  454. + lt_cv_deplibs_check_method=pass_all
  455. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  456. + ;;
  457. +
  458. netbsd* | knetbsd*-gnu)
  459. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  460. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  461. --- gcc-4.0.2/configure
  462. +++ gcc-4.0.2/configure
  463. @@ -1141,7 +1141,7 @@
  464. ;;
  465. "")
  466. case "${target}" in
  467. - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  468. + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  469. # Enable libmudflap by default in GNU and friends.
  470. ;;
  471. *-*-freebsd*)
  472. --- gcc-4.0.2/configure.in
  473. +++ gcc-4.0.2/configure.in
  474. @@ -350,7 +350,7 @@
  475. ;;
  476. "")
  477. case "${target}" in
  478. - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  479. + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  480. # Enable libmudflap by default in GNU and friends.
  481. ;;
  482. *-*-freebsd*)
  483. --- gcc-4.0.2/contrib/regression/objs-gcc.sh
  484. +++ gcc-4.0.2/contrib/regression/objs-gcc.sh
  485. @@ -105,6 +105,10 @@
  486. then
  487. make all-gdb all-dejagnu all-ld || exit 1
  488. make install-gdb install-dejagnu install-ld || exit 1
  489. +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
  490. + then
  491. + make all-gdb all-dejagnu all-ld || exit 1
  492. + make install-gdb install-dejagnu install-ld || exit 1
  493. elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
  494. make bootstrap || exit 1
  495. make install || exit 1
  496. --- gcc-4.0.2/zlib/configure
  497. +++ gcc-4.0.2/zlib/configure
  498. @@ -3426,6 +3426,11 @@
  499. lt_cv_deplibs_check_method=pass_all
  500. ;;
  501. +linux-uclibc*)
  502. + lt_cv_deplibs_check_method=pass_all
  503. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  504. + ;;
  505. +
  506. netbsd* | knetbsd*-gnu)
  507. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  508. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'