Loading toolchain/gcc/3.4.5/100-uclibc-conf.patch 0 → 100644 +462 −0 Original line number Diff line number Diff line --- gcc-3.4.1/gcc/config.gcc +++ gcc-3.4.1/gcc/config.gcc @@ -2310,10 +2310,16 @@ *) echo "*** Configuration ${target} not supported" 1>&2 exit 1 ;; esac + +# Rather than hook into each target, just do it after all the linux +# targets have been processed +case ${target} in +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" +esac # Support for --with-cpu and related options (and a few unrelated options, # too). case ${with_cpu} in yes | no) --- gcc-3.4.4/gcc/config/alpha/linux-elf.h +++ gcc-3.4.4/gcc/config/alpha/linux-elf.h @@ -27,7 +27,11 @@ #define SUBTARGET_EXTRA_SPECS \ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ %{O*:-O3} %{!O*:-O1} \ --- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600 +++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500 @@ -80,14 +80,19 @@ #define ENDFILE_SPEC \ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "%{h*} %{version:-v} \ %{b} %{Wl,*:%*} \ %{static:-Bstatic} \ %{shared:-shared} \ %{symbolic:-Bsymbolic} \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \ -X \ %{mbig-endian:-EB}" \ SUBTARGET_EXTRA_LINK_SPEC --- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600 +++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -79,6 +79,25 @@ #undef CRIS_DEFAULT_CPU_VERSION #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG +#ifdef USE_UCLIBC + +#undef CRIS_SUBTARGET_VERSION +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" + +#undef CRIS_LINK_SUBTARGET_SPEC +#define CRIS_LINK_SUBTARGET_SPEC \ + "-mcrislinux\ + -rpath-link include/asm/../..%s\ + %{shared} %{static}\ + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ + %{!r:%{O2|O3: --gc-sections}}" + +#else /* USE_UCLIBC */ + #undef CRIS_SUBTARGET_VERSION #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" @@ -93,6 +112,8 @@ %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ %{!r:%{O2|O3: --gc-sections}}" +#endif /* USE_UCLIBC */ + /* Node: Run-time Target */ --- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600 +++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -110,22 +110,21 @@ #undef LINK_SPEC #ifdef USE_GNULIBC_1 -#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ - %{static:-static}}}" +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.1" +#else +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" #else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif +#endif #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" -#endif /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named --- gcc-3.4.4/gcc/config/i386/linux64.h +++ gcc-3.4.4/gcc/config/i386/linux64.h @@ -54,14 +54,21 @@ When the -shared link option is used a final link is not being done. */ +#ifdef USE_UCLIBC +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" +#else +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ + %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ + %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ %{static:-static}}" #define MULTILIB_DEFAULTS { "m64" } --- gcc-3.4.4/gcc/config/ia64/linux.h +++ gcc-3.4.4/gcc/config/ia64/linux.h @@ -37,13 +37,18 @@ /* Define this for shared library support because it isn't in the main linux.h file. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "\ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}" --- gcc-3.4.4/gcc/config/m68k/linux.h +++ gcc-3.4.4/gcc/config/m68k/linux.h @@ -131,12 +131,17 @@ /* If ELF is the default format, we should not use /lib/elf. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC "-m m68kelf %{shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static}}" /* For compatibility with linux/a.out */ --- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500 +++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -109,14 +109,19 @@ /* Borrowed from sparc/linux.h */ #undef LINK_SPEC +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #define LINK_SPEC \ "%(endian_spec) \ %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" #undef SUBTARGET_ASM_SPEC --- gcc-3.4.4/gcc/config/pa/pa-linux.h +++ gcc-3.4.4/gcc/config/pa/pa-linux.h @@ -77,13 +77,18 @@ /* Define this for shared library support because it isn't in the main linux.h file. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC "\ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}" /* glibc's profiling functions don't need gcc to allocate counters. */ --- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600 +++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -69,7 +69,11 @@ #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" #undef LINK_OS_DEFAULT_SPEC +#ifdef USE_UCLIBC +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" +#else #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" +#endif #define LINK_GCC_C_SEQUENCE_SPEC \ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" --- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500 +++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500 @@ -947,6 +947,7 @@ mcall-linux : %(link_os_linux) ; \ mcall-gnu : %(link_os_gnu) ; \ mcall-netbsd : %(link_os_netbsd) ; \ + mcall-linux-uclibc : %(link_os_linux_uclibc); \ mcall-openbsd: %(link_os_openbsd) ; \ : %(link_os_default) }" @@ -1125,6 +1126,10 @@ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" + #if defined(HAVE_LD_EH_FRAME_HDR) # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #endif @@ -1291,6 +1296,7 @@ { "link_os_sim", LINK_OS_SIM_SPEC }, \ { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ { "link_os_linux", LINK_OS_LINUX_SPEC }, \ + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ { "link_os_gnu", LINK_OS_GNU_SPEC }, \ { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ --- gcc-3.4.4/gcc/config/s390/linux.h +++ gcc-3.4.4/gcc/config/s390/linux.h @@ -77,6 +77,13 @@ #define MULTILIB_DEFAULTS { "m31" } #endif +#ifdef USE_UCLIBC +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" +#else +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC \ "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ @@ -86,8 +93,8 @@ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker: \ - %{m31:-dynamic-linker /lib/ld.so.1} \ - %{m64:-dynamic-linker /lib/ld64.so.1}}}}" + %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ + %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" #define TARGET_ASM_FILE_END file_end_indicate_exec_stack --- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600 +++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -73,11 +73,16 @@ #undef SUBTARGET_LINK_EMUL_SUFFIX #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" #undef SUBTARGET_LINK_SPEC +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define SUBTARGET_LINK_SPEC \ "%{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}" #undef LIB_SPEC --- gcc-3.4.4/gcc/config/sparc/linux.h +++ gcc-3.4.4/gcc/config/sparc/linux.h @@ -162,13 +162,18 @@ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ %{static:-static}}}" #else +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!mno-relax:%{!r:-relax}} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" #endif --- gcc-3.4.4/gcc/config/sparc/linux64.h +++ gcc-3.4.4/gcc/config/sparc/linux64.h @@ -167,12 +166,17 @@ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}} \ " --- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500 +++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500 @@ -689,6 +689,11 @@ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] --- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600 +++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500 @@ -602,6 +602,7 @@ # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in +linux-uclibc*) ;; linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac @@ -1262,6 +1263,24 @@ dynamic_linker='GNU/Linux ld.so' ;; +linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + # Note: copied from linux-gnu, and may not be appropriate. + hardcode_into_libs=yes + # Assume using the uClibc dynamic linker. + dynamic_linker="uClibc ld.so" + ;; + netbsd*) need_lib_prefix=no need_version=no --- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500 +++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500 @@ -1947,6 +1947,11 @@ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' --- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600 +++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500 @@ -1981,6 +1981,23 @@ fi ;; +linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib/libuClibc-*.so` + + # Assume using the uClibc dynamic linker. + dynamic_linker="uClibc ld.so" + ;; + netbsd*) version_type=sunos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then toolchain/gcc/3.4.5/200-uclibc-locale.patch 0 → 100644 +3255 −0 File added.Preview size limit exceeded, changes collapsed. Show changes toolchain/gcc/3.4.5/300-libstdc++-pic.patch 0 → 100644 +47 −0 Original line number Diff line number Diff line # DP: Build and install libstdc++_pic.a library. --- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100 +++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100 @@ -224,6 +224,10 @@ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@ +install-exec-local: + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) + # Added bits to build debug library. if GLIBCPP_BUILD_DEBUG all-local: build_debug --- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100 +++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100 @@ -585,7 +585,7 @@ install-data-am: install-data-local -install-exec-am: install-toolexeclibLTLIBRARIES +install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local install-info: install-info-am @@ -618,6 +618,7 @@ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-data-local \ install-exec install-exec-am install-info install-info-am \ + install-exec-local \ install-man install-strip install-toolexeclibLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ @@ -707,6 +708,11 @@ install_debug: (cd ${debugdir} && $(MAKE) \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) + +install-exec-local: + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch 0 → 100644 +65 −0 Original line number Diff line number Diff line --- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500 +++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400 @@ -8810,13 +8810,16 @@ (set_attr "length" "4,8,8")] ) +; Try to convert LDR+LDR+arith into [add+]LDM+arith +; On XScale, LDM is always slower than two LDRs, so only do this if +; optimising for size. (define_insn "*arith_adjacentmem" [(set (match_operand:SI 0 "s_register_operand" "=r") (match_operator:SI 1 "shiftable_operator" [(match_operand:SI 2 "memory_operand" "m") (match_operand:SI 3 "memory_operand" "m")])) (clobber (match_scratch:SI 4 "=r"))] - "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])" + "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])" "* { rtx ldm[3]; @@ -8851,6 +8854,8 @@ } if (val1 && val2) { + /* This would be a loss on a Harvard core, but adjacent_mem_locations() + will prevent it from happening. */ rtx ops[3]; ldm[0] = ops[0] = operands[4]; ops[1] = XEXP (XEXP (operands[2], 0), 0); --- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400 +++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400 @@ -4838,6 +4841,11 @@ *load_offset = unsorted_offsets[order[0]]; } + /* For XScale a two-word LDM is a performance loss, so only do this if + size is more important. See comments in arm_gen_load_multiple. */ + if (nops == 2 && arm_tune_xscale && !optimize_size) + return 0; + if (unsorted_offsets[order[0]] == 0) return 1; /* ldmia */ @@ -5064,6 +5072,11 @@ *load_offset = unsorted_offsets[order[0]]; } + /* For XScale a two-word LDM is a performance loss, so only do this if + size is more important. See comments in arm_gen_load_multiple. */ + if (nops == 2 && arm_tune_xscale && !optimize_size) + return 0; + if (unsorted_offsets[order[0]] == 0) return 1; /* stmia */ --- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400 +++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400 @@ -381,6 +381,7 @@ printf ("#include \"recog.h\"\n"); printf ("#include \"except.h\"\n\n"); printf ("#include \"function.h\"\n\n"); + printf ("#include \"flags.h\"\n\n"); printf ("#ifdef HAVE_peephole\n"); printf ("extern rtx peep_operand[];\n\n"); toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch 0 → 100644 +42 −0 Original line number Diff line number Diff line The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from it that was causing problems and grabbed an updated version from upstream cvs. Index: gcc/config/arm/arm.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v retrieving revision 1.432 retrieving revision 1.433 diff -u -r1.432 -r1.433 --- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432 +++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433 @@ -5139,6 +5139,10 @@ int adjacent_mem_locations (rtx a, rtx b) { + /* We don't guarantee to preserve the order of these memory refs. */ + if (volatile_refs_p (a) || volatile_refs_p (b)) + return 0; + if ((GET_CODE (XEXP (a, 0)) == REG || (GET_CODE (XEXP (a, 0)) == PLUS && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT)) @@ -5178,6 +5182,17 @@ return 0; val_diff = val1 - val0; + + if (arm_ld_sched) + { + /* If the target has load delay slots, then there's no benefit + to using an ldm instruction unless the offset is zero and + we are optimizing for size. */ + return (optimize_size && (REGNO (reg0) == REGNO (reg1)) + && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4) + && (val_diff == 4 || val_diff == -4)); + } + return ((REGNO (reg0) == REGNO (reg1)) && (val_diff == 4 || val_diff == -4)); } Loading
toolchain/gcc/3.4.5/100-uclibc-conf.patch 0 → 100644 +462 −0 Original line number Diff line number Diff line --- gcc-3.4.1/gcc/config.gcc +++ gcc-3.4.1/gcc/config.gcc @@ -2310,10 +2310,16 @@ *) echo "*** Configuration ${target} not supported" 1>&2 exit 1 ;; esac + +# Rather than hook into each target, just do it after all the linux +# targets have been processed +case ${target} in +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" +esac # Support for --with-cpu and related options (and a few unrelated options, # too). case ${with_cpu} in yes | no) --- gcc-3.4.4/gcc/config/alpha/linux-elf.h +++ gcc-3.4.4/gcc/config/alpha/linux-elf.h @@ -27,7 +27,11 @@ #define SUBTARGET_EXTRA_SPECS \ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ %{O*:-O3} %{!O*:-O1} \ --- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600 +++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500 @@ -80,14 +80,19 @@ #define ENDFILE_SPEC \ "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "%{h*} %{version:-v} \ %{b} %{Wl,*:%*} \ %{static:-Bstatic} \ %{shared:-shared} \ %{symbolic:-Bsymbolic} \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \ -X \ %{mbig-endian:-EB}" \ SUBTARGET_EXTRA_LINK_SPEC --- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600 +++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -79,6 +79,25 @@ #undef CRIS_DEFAULT_CPU_VERSION #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG +#ifdef USE_UCLIBC + +#undef CRIS_SUBTARGET_VERSION +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" + +#undef CRIS_LINK_SUBTARGET_SPEC +#define CRIS_LINK_SUBTARGET_SPEC \ + "-mcrislinux\ + -rpath-link include/asm/../..%s\ + %{shared} %{static}\ + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ + %{!r:%{O2|O3: --gc-sections}}" + +#else /* USE_UCLIBC */ + #undef CRIS_SUBTARGET_VERSION #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" @@ -93,6 +112,8 @@ %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ %{!r:%{O2|O3: --gc-sections}}" +#endif /* USE_UCLIBC */ + /* Node: Run-time Target */ --- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600 +++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -110,22 +110,21 @@ #undef LINK_SPEC #ifdef USE_GNULIBC_1 -#define LINK_SPEC "-m elf_i386 %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ - %{static:-static}}}" +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.1" +#else +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" #else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif +#endif #define LINK_SPEC "-m elf_i386 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" -#endif /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named --- gcc-3.4.4/gcc/config/i386/linux64.h +++ gcc-3.4.4/gcc/config/i386/linux64.h @@ -54,14 +54,21 @@ When the -shared link option is used a final link is not being done. */ +#ifdef USE_UCLIBC +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" +#else +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ + %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ + %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ %{static:-static}}" #define MULTILIB_DEFAULTS { "m64" } --- gcc-3.4.4/gcc/config/ia64/linux.h +++ gcc-3.4.4/gcc/config/ia64/linux.h @@ -37,13 +37,18 @@ /* Define this for shared library support because it isn't in the main linux.h file. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" +#endif #undef LINK_SPEC #define LINK_SPEC "\ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}" --- gcc-3.4.4/gcc/config/m68k/linux.h +++ gcc-3.4.4/gcc/config/m68k/linux.h @@ -131,12 +131,17 @@ /* If ELF is the default format, we should not use /lib/elf. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC "-m m68kelf %{shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static}}" /* For compatibility with linux/a.out */ --- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500 +++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -109,14 +109,19 @@ /* Borrowed from sparc/linux.h */ #undef LINK_SPEC +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #define LINK_SPEC \ "%(endian_spec) \ %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" #undef SUBTARGET_ASM_SPEC --- gcc-3.4.4/gcc/config/pa/pa-linux.h +++ gcc-3.4.4/gcc/config/pa/pa-linux.h @@ -77,13 +77,18 @@ /* Define this for shared library support because it isn't in the main linux.h file. */ +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC "\ %{shared:-shared} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}" /* glibc's profiling functions don't need gcc to allocate counters. */ --- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600 +++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -69,7 +69,11 @@ #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" #undef LINK_OS_DEFAULT_SPEC +#ifdef USE_UCLIBC +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" +#else #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" +#endif #define LINK_GCC_C_SEQUENCE_SPEC \ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" --- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500 +++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500 @@ -947,6 +947,7 @@ mcall-linux : %(link_os_linux) ; \ mcall-gnu : %(link_os_gnu) ; \ mcall-netbsd : %(link_os_netbsd) ; \ + mcall-linux-uclibc : %(link_os_linux_uclibc); \ mcall-openbsd: %(link_os_openbsd) ; \ : %(link_os_default) }" @@ -1125,6 +1126,10 @@ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" + #if defined(HAVE_LD_EH_FRAME_HDR) # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #endif @@ -1291,6 +1296,7 @@ { "link_os_sim", LINK_OS_SIM_SPEC }, \ { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ { "link_os_linux", LINK_OS_LINUX_SPEC }, \ + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ { "link_os_gnu", LINK_OS_GNU_SPEC }, \ { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ --- gcc-3.4.4/gcc/config/s390/linux.h +++ gcc-3.4.4/gcc/config/s390/linux.h @@ -77,6 +77,13 @@ #define MULTILIB_DEFAULTS { "m31" } #endif +#ifdef USE_UCLIBC +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" +#else +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" +#endif #undef LINK_SPEC #define LINK_SPEC \ "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ @@ -86,8 +93,8 @@ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker: \ - %{m31:-dynamic-linker /lib/ld.so.1} \ - %{m64:-dynamic-linker /lib/ld64.so.1}}}}" + %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ + %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" #define TARGET_ASM_FILE_END file_end_indicate_exec_stack --- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600 +++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500 @@ -73,11 +73,16 @@ #undef SUBTARGET_LINK_EMUL_SUFFIX #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" #undef SUBTARGET_LINK_SPEC +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define SUBTARGET_LINK_SPEC \ "%{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}" #undef LIB_SPEC --- gcc-3.4.4/gcc/config/sparc/linux.h +++ gcc-3.4.4/gcc/config/sparc/linux.h @@ -162,13 +162,18 @@ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \ %{static:-static}}}" #else +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!mno-relax:%{!r:-relax}} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}}" #endif --- gcc-3.4.4/gcc/config/sparc/linux64.h +++ gcc-3.4.4/gcc/config/sparc/linux64.h @@ -167,12 +166,17 @@ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, +#ifdef USE_UCLIBC +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#else +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#endif #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ %{static:-static}}} \ " --- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500 +++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500 @@ -689,6 +689,11 @@ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] --- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600 +++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500 @@ -602,6 +602,7 @@ # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in +linux-uclibc*) ;; linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac @@ -1262,6 +1263,24 @@ dynamic_linker='GNU/Linux ld.so' ;; +linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + # Note: copied from linux-gnu, and may not be appropriate. + hardcode_into_libs=yes + # Assume using the uClibc dynamic linker. + dynamic_linker="uClibc ld.so" + ;; + netbsd*) need_lib_prefix=no need_version=no --- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500 +++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500 @@ -1947,6 +1947,11 @@ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' --- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600 +++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500 @@ -1981,6 +1981,23 @@ fi ;; +linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + file_magic_cmd=/usr/bin/file + file_magic_test_file=`echo /lib/libuClibc-*.so` + + # Assume using the uClibc dynamic linker. + dynamic_linker="uClibc ld.so" + ;; + netbsd*) version_type=sunos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
toolchain/gcc/3.4.5/200-uclibc-locale.patch 0 → 100644 +3255 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
toolchain/gcc/3.4.5/300-libstdc++-pic.patch 0 → 100644 +47 −0 Original line number Diff line number Diff line # DP: Build and install libstdc++_pic.a library. --- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100 +++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100 @@ -224,6 +224,10 @@ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@ +install-exec-local: + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) + # Added bits to build debug library. if GLIBCPP_BUILD_DEBUG all-local: build_debug --- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100 +++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100 @@ -585,7 +585,7 @@ install-data-am: install-data-local -install-exec-am: install-toolexeclibLTLIBRARIES +install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local install-info: install-info-am @@ -618,6 +618,7 @@ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-data-local \ install-exec install-exec-am install-info install-info-am \ + install-exec-local \ install-man install-strip install-toolexeclibLTLIBRARIES \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ @@ -707,6 +708,11 @@ install_debug: (cd ${debugdir} && $(MAKE) \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) + +install-exec-local: + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT:
toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch 0 → 100644 +65 −0 Original line number Diff line number Diff line --- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500 +++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400 @@ -8810,13 +8810,16 @@ (set_attr "length" "4,8,8")] ) +; Try to convert LDR+LDR+arith into [add+]LDM+arith +; On XScale, LDM is always slower than two LDRs, so only do this if +; optimising for size. (define_insn "*arith_adjacentmem" [(set (match_operand:SI 0 "s_register_operand" "=r") (match_operator:SI 1 "shiftable_operator" [(match_operand:SI 2 "memory_operand" "m") (match_operand:SI 3 "memory_operand" "m")])) (clobber (match_scratch:SI 4 "=r"))] - "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])" + "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])" "* { rtx ldm[3]; @@ -8851,6 +8854,8 @@ } if (val1 && val2) { + /* This would be a loss on a Harvard core, but adjacent_mem_locations() + will prevent it from happening. */ rtx ops[3]; ldm[0] = ops[0] = operands[4]; ops[1] = XEXP (XEXP (operands[2], 0), 0); --- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400 +++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400 @@ -4838,6 +4841,11 @@ *load_offset = unsorted_offsets[order[0]]; } + /* For XScale a two-word LDM is a performance loss, so only do this if + size is more important. See comments in arm_gen_load_multiple. */ + if (nops == 2 && arm_tune_xscale && !optimize_size) + return 0; + if (unsorted_offsets[order[0]] == 0) return 1; /* ldmia */ @@ -5064,6 +5072,11 @@ *load_offset = unsorted_offsets[order[0]]; } + /* For XScale a two-word LDM is a performance loss, so only do this if + size is more important. See comments in arm_gen_load_multiple. */ + if (nops == 2 && arm_tune_xscale && !optimize_size) + return 0; + if (unsorted_offsets[order[0]] == 0) return 1; /* stmia */ --- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400 +++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400 @@ -381,6 +381,7 @@ printf ("#include \"recog.h\"\n"); printf ("#include \"except.h\"\n\n"); printf ("#include \"function.h\"\n\n"); + printf ("#include \"flags.h\"\n\n"); printf ("#ifdef HAVE_peephole\n"); printf ("extern rtx peep_operand[];\n\n");
toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch 0 → 100644 +42 −0 Original line number Diff line number Diff line The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from it that was causing problems and grabbed an updated version from upstream cvs. Index: gcc/config/arm/arm.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v retrieving revision 1.432 retrieving revision 1.433 diff -u -r1.432 -r1.433 --- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432 +++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433 @@ -5139,6 +5139,10 @@ int adjacent_mem_locations (rtx a, rtx b) { + /* We don't guarantee to preserve the order of these memory refs. */ + if (volatile_refs_p (a) || volatile_refs_p (b)) + return 0; + if ((GET_CODE (XEXP (a, 0)) == REG || (GET_CODE (XEXP (a, 0)) == PLUS && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT)) @@ -5178,6 +5182,17 @@ return 0; val_diff = val1 - val0; + + if (arm_ld_sched) + { + /* If the target has load delay slots, then there's no benefit + to using an ldm instruction unless the offset is zero and + we are optimizing for size. */ + return (optimize_size && (REGNO (reg0) == REGNO (reg1)) + && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4) + && (val_diff == 4 || val_diff == -4)); + } + return ((REGNO (reg0) == REGNO (reg1)) && (val_diff == 4 || val_diff == -4)); }