100-uclibc-conf.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. diff -urN gcc-3.4.0-dist/boehm-gc/configure gcc-3.4.0/boehm-gc/configure
  2. --- gcc-3.4.0-dist/boehm-gc/configure 2004-04-18 21:23:04.000000000 -0500
  3. +++ gcc-3.4.0/boehm-gc/configure 2004-08-12 16:51:15.000000000 -0500
  4. @@ -1947,6 +1947,11 @@
  5. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  6. ;;
  7. +linux-uclibc*)
  8. + lt_cv_deplibs_check_method=pass_all
  9. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  10. + ;;
  11. +
  12. netbsd*)
  13. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  14. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  15. diff -urN gcc-3.4.0-dist/boehm-gc/ltconfig gcc-3.4.0/boehm-gc/ltconfig
  16. --- gcc-3.4.0-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
  17. +++ gcc-3.4.0/boehm-gc/ltconfig 2004-08-12 16:51:15.000000000 -0500
  18. @@ -1981,6 +1981,23 @@
  19. fi
  20. ;;
  21. +linux-uclibc*)
  22. + version_type=linux
  23. + need_lib_prefix=no
  24. + need_version=no
  25. + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  26. + soname_spec='${libname}${release}.so$major'
  27. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  28. + shlibpath_var=LD_LIBRARY_PATH
  29. + shlibpath_overrides_runpath=no
  30. + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  31. + file_magic_cmd=/usr/bin/file
  32. + file_magic_test_file=`echo /lib/libuClibc-*.so`
  33. +
  34. + # Assume using the uClibc dynamic linker.
  35. + dynamic_linker="uClibc ld.so"
  36. + ;;
  37. +
  38. netbsd*)
  39. version_type=sunos
  40. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  41. diff -urN gcc-3.4.0-dist/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  42. --- gcc-3.4.0-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
  43. +++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-08-12 16:51:15.000000000 -0500
  44. @@ -81,6 +81,18 @@
  45. "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  46. #undef LINK_SPEC
  47. +#ifdef USE_UCLIBC
  48. +#define LINK_SPEC "%{h*} %{version:-v} \
  49. + %{b} %{Wl,*:%*} \
  50. + %{static:-Bstatic} \
  51. + %{shared:-shared} \
  52. + %{symbolic:-Bsymbolic} \
  53. + %{rdynamic:-export-dynamic} \
  54. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
  55. + -X \
  56. + %{mbig-endian:-EB}" \
  57. + SUBTARGET_EXTRA_LINK_SPEC
  58. +#else
  59. #define LINK_SPEC "%{h*} %{version:-v} \
  60. %{b} %{Wl,*:%*} \
  61. %{static:-Bstatic} \
  62. @@ -91,6 +103,7 @@
  63. -X \
  64. %{mbig-endian:-EB}" \
  65. SUBTARGET_EXTRA_LINK_SPEC
  66. +#endif
  67. #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  68. diff -urN gcc-3.4.0-dist/gcc/config/cris/linux.h gcc-3.4.0/gcc/config/cris/linux.h
  69. --- gcc-3.4.0-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
  70. +++ gcc-3.4.0/gcc/config/cris/linux.h 2004-08-12 16:51:15.000000000 -0500
  71. @@ -79,6 +79,25 @@
  72. #undef CRIS_DEFAULT_CPU_VERSION
  73. #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  74. +#ifdef USE_UCLIBC
  75. +
  76. +#undef CRIS_SUBTARGET_VERSION
  77. +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  78. +
  79. +#undef CRIS_LINK_SUBTARGET_SPEC
  80. +#define CRIS_LINK_SUBTARGET_SPEC \
  81. + "-mcrislinux\
  82. + -rpath-link include/asm/../..%s\
  83. + %{shared} %{static}\
  84. + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  85. + %{!shared: \
  86. + %{!static: \
  87. + %{rdynamic:-export-dynamic} \
  88. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  89. + %{!r:%{O2|O3: --gc-sections}}"
  90. +
  91. +#else /* USE_UCLIBC */
  92. +
  93. #undef CRIS_SUBTARGET_VERSION
  94. #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  95. @@ -93,6 +112,8 @@
  96. %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
  97. %{!r:%{O2|O3: --gc-sections}}"
  98. +#endif /* USE_UCLIBC */
  99. +
  100. /* Node: Run-time Target */
  101. diff -urN gcc-3.4.0-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.0/gcc/config/cris/t-linux-uclibc
  102. --- gcc-3.4.0-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  103. +++ gcc-3.4.0/gcc/config/cris/t-linux-uclibc 2004-08-12 16:51:15.000000000 -0500
  104. @@ -0,0 +1,3 @@
  105. +T_CFLAGS = -DUSE_UCLIBC
  106. +TARGET_LIBGCC2_CFLAGS += -fPIC
  107. +CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
  108. diff -urN gcc-3.4.0-dist/gcc/config/i386/linux.h gcc-3.4.0/gcc/config/i386/linux.h
  109. --- gcc-3.4.0-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
  110. +++ gcc-3.4.0/gcc/config/i386/linux.h 2004-08-12 16:51:15.000000000 -0500
  111. @@ -118,6 +118,15 @@
  112. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
  113. %{static:-static}}}"
  114. #else
  115. +#if defined USE_UCLIBC
  116. +#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  117. + %{!shared: \
  118. + %{!ibcs: \
  119. + %{!static: \
  120. + %{rdynamic:-export-dynamic} \
  121. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  122. + %{static:-static}}}"
  123. +#else
  124. #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  125. %{!shared: \
  126. %{!ibcs: \
  127. @@ -126,6 +135,7 @@
  128. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  129. %{static:-static}}}"
  130. #endif
  131. +#endif
  132. /* A C statement (sans semicolon) to output to the stdio stream
  133. FILE the assembler definition of uninitialized global DECL named
  134. diff -urN gcc-3.4.0-dist/gcc/config/mips/linux.h gcc-3.4.0/gcc/config/mips/linux.h
  135. --- gcc-3.4.0-dist/gcc/config/mips/linux.h 2004-02-19 15:45:21.000000000 -0600
  136. +++ gcc-3.4.0/gcc/config/mips/linux.h 2004-08-12 16:51:15.000000000 -0500
  137. @@ -109,6 +109,17 @@
  138. /* Borrowed from sparc/linux.h */
  139. #undef LINK_SPEC
  140. +#ifdef USE_UCLIBC
  141. +#define LINK_SPEC \
  142. + "%(endian_spec) \
  143. + %{shared:-shared} \
  144. + %{!shared: \
  145. + %{!ibcs: \
  146. + %{!static: \
  147. + %{rdynamic:-export-dynamic} \
  148. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  149. + %{static:-static}}}"
  150. +#else
  151. #define LINK_SPEC \
  152. "%(endian_spec) \
  153. %{shared:-shared} \
  154. @@ -118,6 +129,7 @@
  155. %{rdynamic:-export-dynamic} \
  156. %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
  157. %{static:-static}}}"
  158. +#endif
  159. #undef SUBTARGET_ASM_SPEC
  160. #define SUBTARGET_ASM_SPEC "\
  161. diff -urN gcc-3.4.0-dist/gcc/config/rs6000/linux.h gcc-3.4.0/gcc/config/rs6000/linux.h
  162. --- gcc-3.4.0-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
  163. +++ gcc-3.4.0/gcc/config/rs6000/linux.h 2004-08-12 16:51:15.000000000 -0500
  164. @@ -61,7 +61,11 @@
  165. #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
  166. #undef LINK_OS_DEFAULT_SPEC
  167. +#ifdef USE_UCLIBC
  168. +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
  169. +#else
  170. #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
  171. +#endif
  172. #define LINK_GCC_C_SEQUENCE_SPEC \
  173. "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
  174. diff -urN gcc-3.4.0-dist/gcc/config/rs6000/sysv4.h gcc-3.4.0/gcc/config/rs6000/sysv4.h
  175. --- gcc-3.4.0-dist/gcc/config/rs6000/sysv4.h 2004-03-02 16:34:58.000000000 -0600
  176. +++ gcc-3.4.0/gcc/config/rs6000/sysv4.h 2004-08-12 16:51:15.000000000 -0500
  177. @@ -952,6 +952,7 @@
  178. mcall-linux : %(link_os_linux) ; \
  179. mcall-gnu : %(link_os_gnu) ; \
  180. mcall-netbsd : %(link_os_netbsd) ; \
  181. + mcall-linux-uclibc : %(link_os_linux_uclibc); \
  182. mcall-openbsd: %(link_os_openbsd) ; \
  183. : %(link_os_default) }"
  184. @@ -1129,6 +1130,10 @@
  185. %{rdynamic:-export-dynamic} \
  186. %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
  187. +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
  188. + %{rdynamic:-export-dynamic} \
  189. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
  190. +
  191. #if defined(HAVE_LD_EH_FRAME_HDR)
  192. # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
  193. #endif
  194. @@ -1295,6 +1300,7 @@
  195. { "link_os_sim", LINK_OS_SIM_SPEC }, \
  196. { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
  197. { "link_os_linux", LINK_OS_LINUX_SPEC }, \
  198. + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
  199. { "link_os_gnu", LINK_OS_GNU_SPEC }, \
  200. { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
  201. { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
  202. diff -urN gcc-3.4.0-dist/gcc/config/sh/linux.h gcc-3.4.0/gcc/config/sh/linux.h
  203. --- gcc-3.4.0-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
  204. +++ gcc-3.4.0/gcc/config/sh/linux.h 2004-08-12 16:51:15.000000000 -0500
  205. @@ -73,12 +73,21 @@
  206. #undef SUBTARGET_LINK_EMUL_SUFFIX
  207. #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
  208. #undef SUBTARGET_LINK_SPEC
  209. +#ifdef USE_UCLIBC
  210. +#define SUBTARGET_LINK_SPEC \
  211. + "%{shared:-shared} \
  212. + %{!static: \
  213. + %{rdynamic:-export-dynamic} \
  214. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  215. + %{static:-static}"
  216. +#else
  217. #define SUBTARGET_LINK_SPEC \
  218. "%{shared:-shared} \
  219. %{!static: \
  220. %{rdynamic:-export-dynamic} \
  221. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  222. %{static:-static}"
  223. +#endif
  224. #undef LIB_SPEC
  225. #define LIB_SPEC \
  226. diff -urN gcc-3.4.0-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.0/gcc/config/sh/t-linux-uclibc
  227. --- gcc-3.4.0-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  228. +++ gcc-3.4.0/gcc/config/sh/t-linux-uclibc 2004-08-12 16:51:15.000000000 -0500
  229. @@ -0,0 +1,13 @@
  230. +T_CFLAGS = -DUSE_UCLIBC
  231. +
  232. +TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
  233. +LIB1ASMFUNCS_CACHE = _ic_invalidate
  234. +
  235. +LIB2FUNCS_EXTRA=
  236. +
  237. +MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
  238. +MULTILIB_DIRNAMES=
  239. +MULTILIB_MATCHES =
  240. +MULTILIB_EXCEPTIONS=
  241. +
  242. +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
  243. diff -urN gcc-3.4.0-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.0/gcc/config/sh/t-sh64-uclibc
  244. --- gcc-3.4.0-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
  245. +++ gcc-3.4.0/gcc/config/sh/t-sh64-uclibc 2004-08-12 16:51:15.000000000 -0500
  246. @@ -0,0 +1,13 @@
  247. +EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
  248. +
  249. +LIB1ASMFUNCS = \
  250. + _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
  251. + _shcompact_call_trampoline _shcompact_return_trampoline \
  252. + _shcompact_incoming_args _ic_invalidate _nested_trampoline \
  253. + _push_pop_shmedia_regs \
  254. + _udivdi3 _divdi3 _umoddi3 _moddi3
  255. +
  256. +MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
  257. +MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
  258. +MULTILIB_MATCHES=
  259. +MULTILIB_EXCEPTIONS=
  260. diff -urN gcc-3.4.0-dist/gcc/config/t-linux-uclibc gcc-3.4.0/gcc/config/t-linux-uclibc
  261. --- gcc-3.4.0-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  262. +++ gcc-3.4.0/gcc/config/t-linux-uclibc 2004-08-12 16:51:15.000000000 -0500
  263. @@ -0,0 +1,15 @@
  264. +T_CFLAGS = -DUSE_UCLIBC
  265. +
  266. +# Compile crtbeginS.o and crtendS.o with pic.
  267. +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
  268. +# Compile libgcc2.a with pic.
  269. +TARGET_LIBGCC2_CFLAGS = -fPIC
  270. +
  271. +# Override t-slibgcc-elf-ver to export some libgcc symbols with
  272. +# the symbol versions that glibc used.
  273. +SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
  274. +
  275. +# Use unwind-dw2-fde
  276. +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
  277. + $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
  278. +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
  279. diff -urN gcc-3.4.0-dist/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  280. --- gcc-3.4.0-dist/gcc/config.gcc 2004-04-16 21:28:24.000000000 -0500
  281. +++ gcc-3.4.0/gcc/config.gcc 2004-08-12 16:51:15.000000000 -0500
  282. @@ -664,6 +664,12 @@
  283. extra_parts=""
  284. use_collect2=yes
  285. ;;
  286. +arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
  287. + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  288. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
  289. + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  290. + gnu_ld=yes
  291. + ;;
  292. arm*-*-linux*) # ARM GNU/Linux with ELF
  293. tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  294. tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  295. @@ -725,6 +731,10 @@
  296. tmake_file="cris/t-cris cris/t-elfmulti"
  297. gas=yes
  298. ;;
  299. +cris-*-linux-uclibc*)
  300. + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  301. + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
  302. + ;;
  303. cris-*-linux*)
  304. tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  305. tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
  306. @@ -988,6 +998,11 @@
  307. thread_file='single'
  308. fi
  309. ;;
  310. +i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
  311. + # with ELF format using uClibc
  312. + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
  313. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
  314. + ;;
  315. i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
  316. # with ELF format using glibc 2
  317. # aka GNU/Linux C library 6
  318. @@ -1547,6 +1562,16 @@
  319. gnu_ld=yes
  320. gas=yes
  321. ;;
  322. +mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
  323. + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  324. + case ${target} in
  325. + mipsisa32*-*)
  326. + target_cpu_default="MASK_SOFT_FLOAT"
  327. + tm_defines="MIPS_ISA_DEFAULT=32"
  328. + ;;
  329. + esac
  330. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
  331. + ;;
  332. mips*-*-linux*) # Linux MIPS, either endian.
  333. tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  334. case ${target} in
  335. @@ -1764,6 +1789,10 @@
  336. tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
  337. tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
  338. ;;
  339. +powerpc-*-linux-uclibc*)
  340. + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  341. + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
  342. + ;;
  343. powerpc-*-linux*)
  344. tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  345. tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
  346. @@ -1916,7 +1945,7 @@
  347. tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
  348. ;;
  349. sh-*-linux* | sh[2346lbe]*-*-linux*)
  350. - tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
  351. + tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
  352. case ${target} in
  353. sh*be-*-* | sh*eb-*-*) ;;
  354. *)
  355. @@ -1924,9 +1953,17 @@
  356. tmake_file="${tmake_file} sh/t-le"
  357. ;;
  358. esac
  359. - tmake_file="${tmake_file} sh/t-linux"
  360. + case ${target} in
  361. + *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
  362. + *) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
  363. + esac
  364. tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
  365. case ${target} in
  366. + sh64*-*-linux-uclibc*)
  367. + tmake_file="${tmake_file} sh/t-sh64-uclibc"
  368. + tm_file="${tm_file} sh/sh64.h"
  369. + extra_headers="shmedia.h ushmedia.h sshmedia.h"
  370. + ;;
  371. sh64*)
  372. tmake_file="${tmake_file} sh/t-sh64"
  373. tm_file="${tm_file} sh/sh64.h"
  374. diff -urN gcc-3.4.0-dist/libtool.m4 gcc-3.4.0/libtool.m4
  375. --- gcc-3.4.0-dist/libtool.m4 2003-11-18 23:29:32.000000000 -0600
  376. +++ gcc-3.4.0/libtool.m4 2004-08-12 16:51:15.000000000 -0500
  377. @@ -689,6 +689,11 @@
  378. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  379. ;;
  380. +linux-uclibc*)
  381. + lt_cv_deplibs_check_method=pass_all
  382. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  383. + ;;
  384. +
  385. netbsd*)
  386. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  387. [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
  388. diff -urN gcc-3.4.0-dist/ltconfig gcc-3.4.0/ltconfig
  389. --- gcc-3.4.0-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
  390. +++ gcc-3.4.0/ltconfig 2004-08-12 16:51:15.000000000 -0500
  391. @@ -602,6 +602,7 @@
  392. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  393. case $host_os in
  394. +linux-uclibc*) ;;
  395. linux-gnu*) ;;
  396. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  397. esac
  398. @@ -1262,6 +1263,24 @@
  399. dynamic_linker='GNU/Linux ld.so'
  400. ;;
  401. +linux-uclibc*)
  402. + version_type=linux
  403. + need_lib_prefix=no
  404. + need_version=no
  405. + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  406. + soname_spec='${libname}${release}.so$major'
  407. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  408. + shlibpath_var=LD_LIBRARY_PATH
  409. + shlibpath_overrides_runpath=no
  410. + # This implies no fast_install, which is unacceptable.
  411. + # Some rework will be needed to allow for fast_install
  412. + # before this can be enabled.
  413. + # Note: copied from linux-gnu, and may not be appropriate.
  414. + hardcode_into_libs=yes
  415. + # Assume using the uClibc dynamic linker.
  416. + dynamic_linker="uClibc ld.so"
  417. + ;;
  418. +
  419. netbsd*)
  420. need_lib_prefix=no
  421. need_version=no